Hello.

I am using Drupal Core 5 along with Ubercart.

When I first uploaded my product images, everything worked fine. I then went into the image cache and tried to change the sizes to make the pics a little bigger and fill in blank area. I then cleared the cache and all the pictures when offline. When I edit the product, I am able to see the correct image so I know that it is looking in the correct spot. Is there anyway to force the image cache to do a complete rebuild on command. This issue happened last night and the pics are still down.

Any help?
Thanks

-- The pics are still on the server, however they are no longer in the image cache folder. Is there any batch command I can run to resize everything and populate this folder again?

Comments

criznach’s picture

I believe if imagecache is working properly it should rebuild the cache folder as the nodes are viewed. I think there was also a bug at one time related to your temp folder. Try cleaning out your temp folder.

Also, try creating a new product with new images and see if the images are generated. If so, you know imagecache is partly working. If not, maybe some part of your configuration has changed. Make sure apache can write to the imagecache folders and subfolders.

Chris.

frank.sposaro’s picture

Yes. It seems like I'm having problems with permission issues inside of the image cache folder. I tried to paste image files in the /drupal-5.7/imagecache/product/drupal-5.7/ and my ftp give me an error. At first I was using Filezilla and even tried using coreFPT. Still same issue. I'm only able to write into the drupal-5.7/imagecache/ but no further. I also tried deleting the folders in this directory and remaking them. I wasn't even able to delete them. Of course I checked all my permission and everything looks like it should be fine.
All my temp folders are also empty.

Any more suggestions?
Any specific conf files that I should be looking at?

-Thanks Chris

frank.sposaro’s picture

I just noticed another issue in a different area. I had a photo album on the site. I just checked is and those pics are down also. I can view the pic name on the album cover, but when I click it I get the following error:
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 6848 bytes) in site.com/includes/image.inc on line 326.

When I resized my images I tried using percent values. I then reverted to using the pixel values and nothing.

frank.sposaro’s picture

So. I created this site on my localhost first and then did an import/export to the server. I used firebug to find broken links and tried to view the pics in my imagecache through the browser bar. I was surprised at some of the errors.

# The selected file drupal-5.7/HP020001.jpg could not be uploaded, because the destination c:/wamp/tmp/product_listHP020001.jpg is not properly configured.
# warning: getimagesize(c:/wamp/tmp/product_listHP020001.jpg) [function.getimagesize]: failed to open stream: No such file or directory in site.com/modules/imagecache/imagecache.module on line 191.
# warning: getimagesize(c:/wamp/tmp/product_listHP020001.jpg) [function.getimagesize]: failed to open stream: No such file or directory in site.com/modules/imagecache/imagecache.module on line 191.

For some reason the "c:/wamp/tmp" did not update when I moved it to the server. It's looking like this is top candidate for the cause of my problems. Any ideas on how/where to change this config?

hollybeary’s picture

I've also run into this problem with ubercart and image cache. I tried to create a new preset and then evereything broke. Couldn't upload images anymore. So I deleted my preset and still it wasn't working. I believe we had to completely reinstall imagecache and start over. Haven't found a fix for it yet but it's really frustrating that I can't change any image sizes or create new presets...

frank.sposaro’s picture

I tried deleting the temp folder that Chris was talking about, no luck. I'm now stuck on the problem that I'm unable to change the directory to look for images. I've saw many posts about this problem, but still unable to find a fix. Tomorrow it looks like I'm giving in and I will re-install the image and imagecache mods. I still haven't gave up on being able to resize my product images in Ubercart. As is, the thumbnails are way to small and the blown up version is way to big. The only way I can think up off the top of my head as to making my thumbnails bigger is to make my original image huge. Hopefully this will be a last resort and can get the sizing presets working properly. I'll keep posting my progress.

criznach’s picture

Any time I move a site from windows to linux, etc, one thing I do is delete the "file_directory_temp" record from the variables table. Drupal will auto-detect the correct value when it sees that it is missing. That might fix part or all of your problem.

Not being able to delete php-created folders may be related to your host's apache configuration. I think it can be difficult to work around and I don't know the solution off hand.

Later,
Chris.

frank.sposaro’s picture

I just tried reinstalling the image and imagecache module. The pics came back online for a min, but they were very very big. I tried changing a imagecache preset again and they all went down right away. After the second reinstall I'm not able to get anything back up.

Can anybody suggest another module that I can use for displaying images with products. I'm starting to run out of ideas.

Or. Is there something I'm missing on the reinstall? I disabled the image and image cache. Uninstalled, deleted module folders and then unzipped and enabled. Is there another module I should reinstall also?

hollybeary’s picture

I'm pretty sure ubercart requires imagecache to display product images. I do remeber reading somewhere that ubercart works best with imagecache1.5 so check your version. Also if you go to the actual ubercart website they have drupal installs there that come with all the recommended modules, might want to look into that if you run out of other ideas.

criznach’s picture

Can you see which user owns the imagecache-created dirs? On my VPS they're owned by apache rather than the account user. I can't delete them with FTP. This is a server-specific quirk that I've never figured out completely. I generally SSH in and chown them to the account owner and make them 777 so apache can read/write to them. Maybe not the best solution, but it's the only one I've found so far.

Chris.

frank.sposaro’s picture

OK. So I think I found what was causing my first issue. In the .htaccess file I had to increase the php memory limit. see post http://drupal.org/node/264042.

However, I think I may have created further issues while trying to move pictures around and change,reinstall other modules. My final solution was to download the drupal module pre-configured with Ubercart.

Thanks for all you help

wireyourworld’s picture

I just have this problem. I loaded two products last night, all was fine. This morning I learned how to resize them in Imagecache, and the photos in the actual product listing are gone. The category photos are still there though. Huh?

And worse, when I go to edit those products, the image field to upload an image, is gone. Same with creating a new product, the field is gone! NOW WTF drupal???? Did I pick the wrong CMS?