Keyword

[SOLVED] Local file doesn't exist

  • mike cartwright
  • mike cartwright's Avatar Topic Author
  • Offline
  • Junior Member
More
13 years 4 months ago #61006 by mike cartwright
[SOLVED] Local file doesn't exist was created by mike cartwright
I am unable to use images which are already on the server. Anytime I try, I am able to browse the server, find the file, and the select it, but when I save the item I get the message "Local file doesn't exist."

I tried a different template (beez), and had the same result. I am on Rochen as a host. K2 is v2.5.4. I am running Joomla 1.7.3. The files I try to use are either .jpg or .png and are optimized for the web - usually less than 50kb.

I am able to use the exact same images from the exact same server folder if I use a joomla article (I use JCE) without issue. It only appears to be an issue for K2 items.

I tried giving the entire k2 directory 755 permissions (after backing up the original!), but that made no difference and I reverted to the backup.

I can work around the issue by uploading files from my computer, but the images I use are already on the server and I would like to avoid the duplication as this is part of my workflow. I used the exact same setup in websites that I built on Joomla 1.5.23 and the functionality was fine.

Anyone have any ideas?

Please Log in or Create an account to join the conversation.

More
13 years 4 months ago #61007 by william white
Replied by william white on topic Re: Local file doesn't exist
This seems to work on my server with 1.7/k2 2.5.4
what versions are you using?

Please Log in or Create an account to join the conversation.

  • mike cartwright
  • mike cartwright's Avatar Topic Author
  • Offline
  • Junior Member
More
13 years 4 months ago #61008 by mike cartwright
Replied by mike cartwright on topic Re: Local file doesn't exist
Hi William, thanks for the response! What versions other than original post do you need? I will provide any versions you need, but I am not sure what versions are needed beyond the K2 version and Joomla version.

I am using a Gavick template (coffe) and have Gavick news show pro, RS forms, JCE, Markitup, editor switcher plugin, and a slideshow installed. All are latest revisions.

I have tried renaming the .htaccess. I have accounts with Rochen and Hostgator, the issue is the same on both servers with totally different installs. The only common element is Joomla1.7 with K2.

When you tried, did you use a picture already resident on the server? That is where the issue is - there is no problem when choosing a local file and doing an upload.

Same issue on Firefox, Chrome, IE and Opera.

Just to have everything covered, here is the system info:

PHP Built On Linux austin.directrouter.com 2.6.18-274.12.1.el5 #1 SMP Tue Nov 29 13:37:46 EST 2011 x86_64
Database Version 5.1.56
Database Collation utf8_general_ci
PHP Version 5.3.6
Web Server Apache
WebServer to PHP Interface cgi-fcgi
Joomla! Version Joomla! 1.7.3 Stable [ Ember ] 14-Nov-2011 14:00 GMT
Joomla! Platform Version Joomla Platform 11.2.0 Stable+Modified [ Omar ] 27-Jul-2011 00:00 GMT

Please Log in or Create an account to join the conversation.

  • mike cartwright
  • mike cartwright's Avatar Topic Author
  • Offline
  • Junior Member
More
13 years 4 months ago #61009 by mike cartwright
Replied by mike cartwright on topic Re: Local file doesn't exist
I just did a complete new install of Joomla 1.7, and loaded K2. No other extensions, no template other than the default. I created one category and added one item. When i tried to save the item with a server resident image, I got the message "Local file doesn't exist".

This is looking like a very repeatable K2 Bug.

Please Log in or Create an account to join the conversation.

  • mike cartwright
  • mike cartwright's Avatar Topic Author
  • Offline
  • Junior Member
More
13 years 4 months ago - 13 years 4 months ago #61010 by mike cartwright
Replied by mike cartwright on topic Re: Local file doesn't exist
I have narrowed the issue down and I now know what the problem is, although I do not know where the errant code resides (yet). All of the sites where I have had this issue has Joomla installed in a subfolder - not in the root. I do this when I am developing so as not to affect the live site.

I just added K2 to the live site and there were no issues.

So the problem is the way K2 is addressing the server resident images. K2 Is assuming it is installed in the root and not using the actual install path.

So the real question is, where is the controlling code? It would take seconds to correct the code, but finding it could take a long time.

This is definitely a bug in K2 that will only affect users who have installed in a subfolder and should be reported. I have no idea who to report the bug to, other than this post. I will post the fix if I am able to locate the code.

Please Log in or Create an account to join the conversation.

  • mike cartwright
  • mike cartwright's Avatar Topic Author
  • Offline
  • Junior Member
More
13 years 4 months ago #61011 by mike cartwright
Replied by mike cartwright on topic Re: Local file doesn't exist
All is working now. The problem, in my case at least, was the media manager configuration. The default configuration is images in the /images folder. I use a photo database which stores images in a different location. So I had changed the media manager defaults, for both files and images. I used the same folder for both files and images. That seems to be where the problem is. Even though the default config is to have both in the same folder, it appears that images MUST be in a subfolder of the files path. The tool tip says it can be in the same folder or as subfolder, but that is what causes the error to be thrown.

Either the tool tip is wrong or the logic is wrong, but the error "Local file does not exist" will be thrown unless the images path is in a subfolder of the files folder.

Please Log in or Create an account to join the conversation.

More
13 years 2 months ago #61012 by FidelGonzales
Replied by FidelGonzales on topic Re: Local file doesn't exist
I just upgraded to K2 v2.5.4 on Joomla 1.5 and am now receiving this error. While I haven't uploaded an attachment in a while, prior to the upgrade, I did not receive the error. I have tried ZIP as well as PDF files and both render the same error and did not attach anything to the post.

Could you please be more specific on the fix for your specific issue?

In K2 parameters configuration > Advanced, the field was blank for default. I made several changes referencing the default folder manually and others I created, and attachments still did not work. Though, when I did add a new directory under (media/k2/attachments) such as (media/k2/attachments/test), the error went away and the item showed on the front end and back end that it attached, but the was not there in the test directory and on the front end it rendered a 404 error.

Any help is greatly appreciated. Thanks.

Please Log in or Create an account to join the conversation.

More
13 years 2 months ago #61013 by FidelGonzales
Replied by FidelGonzales on topic Re: Local file doesn't exist
I tried the upload via the media manager, which I have never done, and it is still not working. The resulting link renders a 404 error, which seems to attributed to SEF URLs, but again, I have not had this issue before.

I'll leave this link and the download active until solved in hopes this will help. Thanks.

www.liveondirt.com/motorsports/racing/score/item/898-score-release-course-map-gps-downloads-2012-san-felipe-250-desert-race

Please Log in or Create an account to join the conversation.

More
13 years 2 months ago #61014 by Aaron
Replied by Aaron on topic Re: Local file doesn't exist
I have another topic which I think it related!!

getk2.org/community/New-to-K2-Ask-here-first%21/8700-files-moving-magically

@Mike - What is being said here makes sense as I am also using a dev site from a subdomain. I haven't tried to change my default media manager to the media/k2 folder


Aaron :)

Please Log in or Create an account to join the conversation.

More
13 years 2 months ago #61015 by Aaron
Replied by Aaron on topic Re: Local file doesn't exist
Okay.. here is my update:

1. I switched the default folder for the Joomla media manager to the media folder.
- It appears that when I had it defaulting in the images folder, K2 would MOVE the files to the media folder. So syncing up what K2 wanted with Joomla, no more issues
2. All attachments, pictures, videos all work now
3. THIS IS WITH A SUBDOMAIN so I am NOT sure how it is supposed to work on the parent domain...
4. I am using Joomla 2.5 and K2 2.5.4

Hope this helps!


Aaron :)

Please Log in or Create an account to join the conversation.

More
13 years 4 weeks ago #61016 by Aaron
Replied by Aaron on topic Re: Local file doesn't exist
Sigh... I am writing this in hopes of maybe helping myself and others...

Current versions: Joomla 2.5.4 and K2 2.5.6

Error: K2_FILE_DOES_NOT_EXIST

I had it working on my development site but when I started putting everything on staging, it stopped working.

and... just checked my DEV site.. now I am getting the SAME error.. I am SO puzzled...

Even though the file is attached in both the front end and the admin end... it will NOT let me download it. Both give an error that file does not exist.

So... without ANY changes to the DEV site, it all breaks...

On staging, I checked/fixed the joomla database and reinstalled K2 over the current install.

Now... I can attach a jpg and I can download it from the admin end but the front end still gives me the error.

When I try:
JPG: downloads from the backend, not the front end
ZIP: downloads from the backend, not the front end
MP3: Shows up in the list but all columns are blank. Does not show in the front end as an attachment. The strange thing about the mp3s are that when I attach them from the server, they disappear entirely from the attachment folder.

My site is supposed to go live on May4th and this is a key element.. any advice would be greatly appreciated...

Some more background information:
Media manager:
1. I have added mp3 to legal file extensions
2. Changed path to files folder to media
3. Even added mp3 to the legal image extensions

K2 Media manager:
1. Change root attachments folder: media/k2/attachments


Aaron :)

Please Log in or Create an account to join the conversation.

More
13 years 4 weeks ago #61017 by Aaron
Replied by Aaron on topic Re: Local file doesn't exist
Okay... so I uninstalled Joomla and reinstalled it.
I then reinstalled K2 so right now I have Joomla 2.5.4 and K2 2.5.6
I also installed allvideos plugin v4.4

I have a FRESH install. I have not installed any other components, modules or plugins..

I ran several User Acceptance Tests (UAT) and found that if the file is already on the server and it is in an m4a, K2 deletes it. I have tried several other file formats.. mp3s work fine.

Is this a known issue with certain file types or did I really space a setting somewhere?

Checkout the XLS for details about my UAT


Aaron :)

Please Log in or Create an account to join the conversation.

More
13 years 3 weeks ago #61018 by Aaron
Replied by Aaron on topic Re: Local file doesn't exist WILLIAM?
Okay.. before I put this on the bug list, would love for someone else to try and M4a as an attachment...

maybe it is just me and I would love nothing more because then I can troubleshoot ME and get it working lol


Aaron :)

Please Log in or Create an account to join the conversation.

More
12 years 6 months ago #61019 by Wouter van Vliet
Replied by Wouter van Vliet on topic Re: Local file doesn't exist WILLIAM?
I experienced the same problem, but was able to relate it to pathnames with spaces. What worked for me was to add three lines of code to the file "administrator/components/com_k2/lib/class.upload.php". Even though one could have done it.
Log in  or Create an account to join the conversation.

More
12 years 6 months ago #61020 by william white
Replied by william white on topic Re: Local file doesn't exist WILLIAM?

Please Log in or Create an account to join the conversation.

More
12 years 5 months ago #61021 by Carlo Greco
Replied by Carlo Greco on topic Re: Local file doesn't exist WILLIAM?
I have the same problem with images having spaces in their name.
Your solution look definitely the right one, could you please specify the position where you added those code lines? Or attach your file if you prefer.

Thank you very much!

Please Log in or Create an account to join the conversation.

More
12 years 5 months ago - 12 years 5 months ago #61022 by Sean Grünböck
Replied by Sean Grünböck on topic Re: Local file doesn't exist WILLIAM?
Hi Wouter.

Can you specify where you put those lines?
I'd like to try your solution..

thanks,
Sean.

Please Log in or Create an account to join the conversation.

  • Blue Heron Acupuncture & TCM
  • Blue Heron Acupuncture & TCM's Avatar
  • Offline
  • New Member
More
12 years 2 months ago #61023 by Blue Heron Acupuncture & TCM
Replied by Blue Heron Acupuncture & TCM on topic Re: Local file doesn't exist
Hi I know it's an old post but I just came across this problem myself with K2 Version 2.6.5 and Joomla 2.5 - solution for me was simply to reinstall K2 and then everything was fine.

Please Log in or Create an account to join the conversation.

More
12 years 1 month ago #61024 by Aron Day
Replied by Aron Day on topic Re: Local file doesn't exist
I am having this problem after updating to the newest version of K2.

Please Log in or Create an account to join the conversation.

More
11 years 5 months ago #61025 by Jeremy Fryman
Replied by Jeremy Fryman on topic Re: Local file doesn't exist
This one is a real pain. It caught me.
However with a bit of perseverance, (yes more K2 perseverance!) I think I have sorted it.

Rigorous file names! NO SPACES, No funny characters including &. Under slash is OK. Not too long.
If you can see the filed and it still fails to tag, then use the media manager to download (make a change) and then re upload.

I had to re-name over 400 files! There were still a few with orphan spaces.

Lost a few hairs, torn out in exasperation but I think all is now well. :)

Please Log in or Create an account to join the conversation.