I recently was 'upgraded' to a different server on my web host. Following the move, the entire site appeared to work including my UC store.
A few days ago, we began uploading new holiday products only to find that any new products did not display their images correctly.
All products that were added prior to the move display their images correctly. The path those images are displayed by way of is (for example):
http://villacollectionsdesign.com/files/imagecache/product_full/a1265979...
Newly added products such as http://villacollectionsdesign.com/content/fire-hydrant-glass-ornament seem to have changed the image path to (for example):
http://villacollectionsdesign.com/files/imagecache/product_full/files/CI...
Basically, it appears that the new path structure is inserting a second 'files' into the image path.
mydomain/files/imagecache/product_full/files/CIMG9659_0.JPG
No changes have been made to any admin settings, or anywhere for that matter, it was a straight server transfer.
Any thoughts? I have looked everywhere and can't figure it out...
Also, I added a 'files' folder as a subdirectory of files/imagecache/product_full (product, thumbnails, uc_thumbnails, etc) / 'files' folder but it seemed to have no effect.
I looked through imagecache's settings and found no area where I would set or modify the storage path...does anyone have any idea in regards to where this additional 'files' subfolder is coming from?
Thanks in advance :)
Comments
Comment #1
bstrange commentedI have 'sort of' figured this out. The original Drupal install had the file system (/admin/settings/file-system) set to simply 'files' in the root directory. This was done before the installation of imagecache and UC. Basically, Drupal created the path mydomain/files/
Then when imagecache and UC were installed it added additional directories to the default upload path i.e mydomain/files/product_full/uploaded image, or mydomain/files/product/uploaded image
When the site got moved, it was moved as a whole with both imagecache and UC 'technically' installed (as they did an inplace transfer), so when drupal set it's location for uploaded files, it did so after the additional imagecache paths (or more accurately, with the imagecache paths already in existance) ie:
mydomain/files/product_full/files (new default files location following move because imagepath directory product_full already existed)/uploaded image
So basically, the default path for uploaded files was set before imagecache path information in the original site install, and after the move the default path for uploaded files was set with imagecache paths already in existence...
The problem now is I have no clue how to resolve the situation :(
Anyone have any ideas?
Thanks in advance!
Comment #2
bstrange commentedOk so I tried disabling imagecache and then resaved the default path under admin/settings/file-system and then re-enabled imagecache but no joy... :(
I am out of ideas...
Comment #3
bstrange commentedFollowing some other similar threads, I have tried: disabling and re-enabling GD2, setting file system to private and then back to public, opening views and changing the image field format to a different format, nothing seems to work.
I have checked the imagecache presets and the path listed is the original upload path i.e mysite/files/imagecache/preset/uploadedimage.jpg so nothing has changed within imagecache.
Opening FTP on the server, it appears all new image uploads are going to public_html/files/files.
I believe this second 'files' is what is causing the problem and also what results in the second 'files' in the image upload path:
mysite/files/imagecache/preset/files/uploadedimage.jpg
I am at a loss....
Comment #4
bstrange commentedI found the solution! I found a very old issue in FileField's queue (http://drupal.org/node/655842) that led me to both a workaround solution and a 'true' solution.
The workaround solution was to simply chmod the additional files folder to 000. This worked; however, it didn't correct or address why the extra 'files' directory was created in the first place. Reading further I found:
By going to admin/content/types and choosing the affected content type (in my case product), and then manage fields, I found the Image field (field_image_cache) as initially configured by UC & ImageCache and chose to configure it. Under admin/content/node-type/product/fields/field_image_cache I opened the additional Path Settings and found that in the "File path:" field, 'files' had been entered. By deleting that entry, the image display for products returned to normal exactly as described by furamag (#7) in the issue I linked.
I don't know if 'files' had always been present in admin/content/node-type/product/fields/field_image_cache's path settings and was just ignored prior to the server transfer, if it was added automatically by one of the modules involved following the transfer, or accidentally by a careless employee (unlikely as there are very few people with the proper permissions), but whatever the case, removing the 'files' entry in the File path field remedied the problem.
I am also not sure exactly which module this 'bug' pertains to (core, FileField, ImageCache, or UberCart) but hopefully, if anyone else finds themselves in a similar situation they will have an easier time finding my posts on the symptoms than I had finding the issue from '09.
Oh, and a HUGE THANK YOU to furamag! :)
Comment #5
fizk commented