Keyword

[SOLVED] Local file doesn't exist

  • mike cartwright
  • mike cartwright's Avatar Topic Author
  • Offline
  • Junior Member
More
12 years 9 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
12 years 9 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
12 years 9 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
12 years 9 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
12 years 9 months ago - 12 years 9 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
12 years 9 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
12 years 7 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
12 years 7 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
12 years 7 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
12 years 7 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.


Powered by Kunena Forum