- Posts: 2
COMMUNITY FORUM
Local file doesn't exist.
- ryan corbin
-
Topic Author
- Offline
- New Member
All Im trying to do is make the attachments work from media manager.
Everytime I choose a file (like a PDF) that I have uploaded into the media manager to attach it to my K2 item, I get the message "Local file doesn't exist."
Inside Media Manager I created a folder in the IMAGES root called "Library". Inside the LIBRARY folder I have other category folders.
When I choose to attach a file using the attachments tab/ add attachments field/ select a file on the server/ media manager
My filelink is correct when it chooses it from the media manager. I have tested the file link in a browser to see if the file will open and it does. Permissions for the file in the media manager show that it is "read and write". I originally uploaded the file using Joomla media manager.
However, when I try and save the article it fails and gives me the error message. No file is attached.
What is the problem?
Please Log in or Create an account to join the conversation.
- ryan corbin
-
Topic Author
- Offline
- New Member
- Posts: 2
A file title can not have spaces in the name or you will get the error.
As soon as I removed the spaces and replaced with underscores the file now works in K2.
Why is this the case? Why does K2 not like spaces in the file names for attachments?
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
Web servers do not like spaces and characters like !#$ etc..
Please Log in or Create an account to join the conversation.
- nalk
-
- Offline
- New Member
- Posts: 3
I have uploaded a number of PDF files to the media manager. I have a main folder. Inside this folder are folders with names of various products. Inside each of these folders reside the PDF files.
When I point the attachment tab in an item to a PDF in one of the folders in the media manager and try downloading it via the download button in the attachment tab I get a "file does not exist".
The same when I try downloading the file from the frontend.
For some odd reason when i use the attachment tab and upload the file into the item directly from my computer i can download the file from the frontend.
It is not the spaces in the names because there are no spaces.
I have tried previeweing the files in the media manager right before attaching them. They do work.
I have tried moving one file to the root of the manager. Still does not work.
I have tried putting one in a folder in the stories folder. No luck.
I cannot for the life of me figure out what is wrong. Anybody? Help will be much appreciated.
Please Log in or Create an account to join the conversation.
- lydianp18
-
- Offline
- New Member
- Posts: 9
Same versions, and no spaces in the file names.
Thanks.
Please Log in or Create an account to join the conversation.
- Franz Wohlkönig
-
- Offline
- Platinum Member
- Posts: 529
had similous problems with attach-tab: uploaded files via jce or media-manager i could attach, but same file attach to another article i get a duplicated file.
my solution: i dont use attach-tab, set attach-links in jce.
Greetings
Please Log in or Create an account to join the conversation.
- nalk
-
- Offline
- New Member
- Posts: 3
Please Log in or Create an account to join the conversation.
- Franz Wohlkönig
-
- Offline
- Platinum Member
- Posts: 529
Please Log in or Create an account to join the conversation.
- lydianp18
-
- Offline
- New Member
- Posts: 9
I want them cloaked AND I need the "fill in the blank" solution for my client.
Please Log in or Create an account to join the conversation.
- Franz Wohlkönig
-
- Offline
- Platinum Member
- Posts: 529
youre right. i want a better solution too. maybe we find together one?
Greetings
Please Log in or Create an account to join the conversation.
- cyberbill
-
- Offline
- New Member
- Posts: 2
Running v2.6.7
In: administrator/components/com_k2/models/item.php
file is stored in DB with full path eg: /var/www/html/... ($attachment->filename)
then $savepath is being prepended to it.
Line 1066:
Before:
$file = $savepath.DS.$attachment->filename;
After: (make sure we stay in JPATH_ROOT to avoid pulling system files)
$file = $attachment->filename;
if (strpos($file, JPATH_ROOT) !== 0) {
$file = $savepath.DS.$attachment->filename;
}
Added to Issue tracker:
code.google.com/p/getk2/issues/detail?id=624
Please Log in or Create an account to join the conversation.
- lydianp18
-
- Offline
- New Member
- Posts: 9
Please Log in or Create an account to join the conversation.
- Jo
-
- Offline
- New Member
- Posts: 15
Been searching for hours and this is the only fix that worked for me .
Please Log in or Create an account to join the conversation.