8 replies [Last post]
gboethin's picture
Offline
Joined: 08/17/2009
Juice: 9
Was this information Helpful?

Hi all. I'm a first time Ubercart user, but I'm impressed with what I've seen it do. I have it installed and running now. The problem is that when I go to add a product, the thumb images for the uploaded images aren't created, and the full-sized images aren't created either. On a preview the images will show as not being found (classic box with an "x" in it). When you click to display the full-sized pic, it doesn't come up either.

Also, if you try to delete any uploaded images, you get the following error:

"An unrecoverable error occurred. The uploaded file likely exceeded the maximum file size (2 MB) that this server supports."

which is not accurate, since this doesn't occur during an image upload, and the images are very small, anyway.

Thumbs ARE created in the "sites/default/files directory", which show up on the edit page. The publicly viewable thumbs are supposed to be stored in "sites/default/files/imagefield_thumbs", and the full-sized in "sites/default/files/imagecache/product_full/", but no images are created there. When I first looked the "imagecache" directory hadn't been created (and consequently neither had "product_full"), so I checked the error log to see if this had been the result of read/write privileges. There were no permission errors, so I manually created the directories and made sure everything was writeable.

The fact that there have been no permission errors and no errors trying to create files in non-existent paths tells me that for whatever reason the thumbs/full-sized images simply aren't being created.

Any advice would be greatly appreciated.

Thanks,
Gregg

Lyle's picture
Offline
AdministratoreLiTe!
Joined: 08/07/2007
Juice: 6846
Re: Problem uploading images on product creation

Get the latest version of Ubercart, or stop using Internet Explorer or Opera to upload images.

There's an interesting conflict in the way JavaScript works (but only in those two browsers), and the fact that one of the input elements on that page is named "length". The fix made was to call it "dim_length" instead, avoiding the conflict so that images can be uploaded normally.

gboethin's picture
Offline
Joined: 08/17/2009
Juice: 9
Re: Re: Problem uploading images on product creation

Thanks for the advice. This is the version of Ubercart I'm using:
6.x-2.0-rc3
Is there a more recent version?

I tried using Firefox and found that I could delete images without the problems. Still, the thumbs and full-sized images aren't created where they're supposed to be (using Firefox), and there are no errors in the error log related to paths, or for that matter anything related to drupal, ubercart, or php.

While administrating the Imagecache module you'll see a sample image that's supposed to be at:
sites/default/files/imagecache/product/imagecache_sample.png

It's actually here:
sites/default/files/imagecache_sample.png
and was placed there automatically. So, it was placed in a different directory than the current configuration thinks it's supposed to be.

I might have given some wrong info in my first post. There are thumbs in the:
/sites/default/files/imagefield_thumbs/
directory, and these are displayed on the edit page.

On the preview or view page, once again the images are supposed to be at:
/sites/default/files/imagecache/product_thumbs/,
but they're not, and the full-sized imaged aren't where they're supposed to be either.

Thanks again!
Gregg

gboethin's picture
Offline
Joined: 08/17/2009
Juice: 9
Re: Re: Re: Problem uploading images on product creation

OK, after some further messing around I figured out for sure what's going on:
All product images are being put directly into:
/sites/default/files

But on the product view pages, the src for the images is:
/sites/default/files/imagecache/product_thumbs

Also, I suspect that because the full-sized images and the thumbs are named the same way, and they're being written in the same directory, that the full-sized ones are overwriting the thumbs.

So, I just need to figure out how to have the thumbs and fullsize images created in the right place. They are being created, just not in the right place.

Thanks,
Gregg

TR
TR's picture
Offline
Bug FinderFAQ ModeratorGetting busy with the Ubercode.
Joined: 11/05/2007
Juice: 3424
gboethin wrote: OK, after
gboethin wrote:

OK, after some further messing around I figured out for sure what's going on:
All product images are being put directly into:
/sites/default/files

But on the product view pages, the src for the images is:
/sites/default/files/imagecache/product_thumbs

Also, I suspect that because the full-sized images and the thumbs are named the same way, and they're being written in the same directory, that the full-sized ones are overwriting the thumbs.

So, I just need to figure out how to have the thumbs and fullsize images created in the right place. They are being created, just not in the right place.

Thanks,
Gregg

No, that's not it. You don't understand how imagecache works. Read http://drupal.org/node/224913 for details and tips on how to debug imagecache.

If you let Ubercart set up image handling, by clicking the link at admin/store/status, thumbnails will work properly. Ubercart does not define a "product_thumbs" preset, so I infer that you're trying to roll your own thumbnail solution. That won't work.

<tr>.
Homskillit's picture
Offline
Joined: 06/21/2009
Juice: 62
Re: Problem uploading images on product creation

I had this exact same problem. I just did a complete re-install of drupal and ubercart and now it works fine. I was getting the exact same error you are getting. It was user error on my part as I was moving too fast with setting up Ubercart rather than being patient with it all.

I was using my hosting file upload program to upload the modules and it stunk! Now I use FILEZILLA client and everything works smooth.
I banged my head against the wall for days trying to figure out what was wrong so I know how frustrating it is.

If you arent too far into your project I would reccommend just doing a complete re-install of everything even the database. Just wipe it clean and start over. Its kind of a pain and I had to do that but now my site works perfect. I cant tell you how happy I was when the thumbnails finally uploaded with no problems. I searched these forums for days on this topic.

Hope this helps you out.

Dano

Dano
Tribal Tattoos @ www.DanoTats.com

gboethin's picture
Offline
Joined: 08/17/2009
Juice: 9
Re: Re: Problem uploading images on product creation

Thanks for everyone who replied to this topic. The last two replies actually gave me the info I needed to figure out what was going on. Here's what the problem was, in case anyone else runs into this problem.

Evidently the Imagecache requires that "Clean URLs" be enabled. I had planned on getting around to enabling that after I got some more basic things taken care of. After enabling clean URLs everything started working fine.

I'm sure that was in some documentation somewhere that I didn't take the time to read. Instructions are always a last resort for me.

As homskillit mentioned, you need to be careful in the way you transfer the drupal installation files to your server. In order for clean URLs to work properly the Apache conf file should be properly configured to allow clean URLs. Assuming that this won't be done in many cases, and that many people with shared hosting don't have access to this, the Drupal people included directives to enable clean URLs in a .htaccess file.

The thing is that the .htaccess file needs to be in your root directory. Depending on how you go about copying files to your root directory, it may not end up there. In my case, I used wget to download the package, unzipped and untarred in a temporary directory, then used a simple cp -r * /rootdirectory to copy the files to my root directory. But this didn't copy the .htaccess file, and that was the cause of the problem all along.

Thanks again for the replies.

Summit_drupal's picture
Offline
Joined: 12/11/2010
Juice: 137
Hi, I have a same sort of

Hi,
I have a same sort of problem. I configured imagecache as documented. I check admin/store/status and it says Ubercart handles my images.
But when I use firebug and look at the image It shows the following folder, which doesn't exist:
/sites/default/files/imagecache/product/sites/default/files/RIVS Basics Shawl Mokka 1.jpg

It needs to be /sites/default/files/imagecache/product/RIVS Basics Shawl Mokka 1.jpg

Whats going on please?

greetings,
Martijn

Timerider's picture
Offline
Joined: 12/09/2011
Juice: 7
SOLVED image upload thumbnail not in files/imagefield_thumbs

Thanks to you all - the hint about reading admin/reports/dblog solved it: A simpe Permission_denied.

This was actually due to my provider changing permissions and separating webserver and ftp users.

A quick
chmod g+w sites/default/files/imagefield_thumbs
solved it!!

THANKS to all my predecessors for your groundwork!!

Barry