Images not showing in page or list view, with Private File Transfer and no GD Library

Posts: 29
Joined: 08/18/2007

I hope someone can help us with this. We are going to go LIVE with our uberCart store next week!! - and we have a problem we need to fix first:

We have uberCart 5.x-1.0-alpha7c installed (this was a problem on the previous versions too) with Drupal 5.2 on php 4. I have all the required image modules enabled:

Content Construction Kit (CCK)
Image Field
Imagecache
Thickbox

We can upload images to a product node, but they only show up on the edit page. They do not show up on the view page at all, and on list views they show up as blank or a broken image.

Here's the relevant info from the admin/logs/status page:

File Download Method Private Downloads
Imagecache will not operate properly using Private Files. Please enable Public File Transfer.
File system Writable (private download method)
GD library Not installed
The GD library for PHP is missing or outdated. Please check the PHP image documentation for information on how to correct this.
MySQL database 4.1.22
PHP 4.4.7

Here's what I get on the uberCart admin page:

* The expected Imagecache presets ("product", "product_list", "thumbnail", "category", "cart", "manufacturer") have not been created.
* The Imagecache presets do not contain actions to perform on images. Images may be displayed in their original formats.

So, here's our situation: First, It would be very problematic to switch to Public File Transfer method (and, I'm surprised -- given the security value of the private file transfer method -- that the Imagecache system would rely on the Public method). Second, I don't think I will be able to install GD on our server before we launch our UberCart store next week (but-- it doesn't affect the images we have installed all over the rest of our Drupal site).

Does this mean we will not be able to use images for our UberCart products (both on the page and the list views)? That would be unfortunate, and I've heard so little about this on forums that I'm surprised -- I figure more people would encounter this problem.

Thanks in advance for enlightening us!

Posts: 144
Joined: 08/14/2007
Uber DonorBug FinderEarly adopter... addicted to alphas.Cool profile pic award.Internationalizationizer

Hi somatics. In many ways you could claim that it's "unfortunate" that übercart depends on image cache and clean urls, just because it's a pain to set it up and get it working right Smiling

First of all, you do need to use public file transfer and you do need to install GD on the server for this to work (correct me if i'm wrong). What image cache does is this:
1) You define a number of presets that you want to use on the site. Like thumbnail, prewiev and full view.
2) When requesting one of the presets, image cache dynamically edit your image and saves it (caches it) on the server. There are operations like resizing, cropping etc. These are image functions that require a graphical library to work (like GD). So without GD you'll not be able to actually create the preset versions of the product image.

You also need to check your modrewrite settings thoroughly as that is one of the most common problems with fresh übercart installations.

The überguys may know of some way to make images work without images cache, but I doubt it :/

If I were you, i'd start configuring the server right away:)

______________
Best regards,
Thomas Kulvik
Ny Media AS
www.nymedia.no

Posts: 116
Joined: 08/07/2007
Uber DonorBug FinderEarly adopter... addicted to alphas.Spreading the word - Ubercart for president.

This is a long shot, but you might want to try it:

1. In Drupal, make sure that you have clean URLs set; otherwise, imagecache will not work.

2. Then, set you file transfer method to public here: admin/settings/file-system. This will tell you if this particular setting solves the problem.

3. If so, then look at a discussion of imagecache/file transfer here: http://drupal.org/node/141127

Please let us know what happens.

Posts: 144
Joined: 08/14/2007
Uber DonorBug FinderEarly adopter... addicted to alphas.Cool profile pic award.Internationalizationizer

I don't think this can work without GD, but give it a go anyway Smiling

______________
Best regards,
Thomas Kulvik
Ny Media AS
www.nymedia.no

Posts: 2244
Joined: 08/07/2007
AdministratoreLiTe!

You can use ImageMagick instead of GD. The Image module contains the library file to map Drupal's imaging functions to ImageMagick. The README.txt file has instructions on how to get Drupal to recognize it.

Imagecache absolutely needs the public files directory to function. It causes apache to write directories and files to that location, and it just can't do that with the private method.

If this is a big enough problem for you, you don't really have to use imagecache. Instead of letting Übercart handle the image display, you can let CCK do it. In the Product Field Settings, you can turn off the image field, and in the Content Types settings for CCK, you can enable the display of "field_image_cache" which Übercart created for you.

Posts: 29
Joined: 08/18/2007

Well, I bit the bullet and changed from Private to Public file method in Drupal. Right off the bat, I could see the images. Then, I was faced with the prospect of installing GD Toolkit from the command line, with some risks and details I wasn't looking forward to. Instead, I downloaded and installed the famous Marc Liyanage's package for a GUI install of PHP 5.2.4, thus giving me newer PHP with lots of cool features and GD as well, no fuss no muss. All the status messages in Drupal say everything is installed just fine.

All the joy of that aside, however, there still seems to be some problems: Ryan was at our site and mentioned in a message to us "...it doesn't appear to me that images are being resized in your product catalog."

When I go to the UberCart admin page, one of the status messages is:

-------
Click here to create defaults for the following problems:
The expected Imagecache presets ("product", "product_list", "thumbnail", "category", "cart", "manufacturer") have not been created.
The Imagecache presets do not contain actions to perform on images. Images may be displayed in their original formats.
-------

When I click on the link "Click here to create...", it gives me the store administration page again with the exact same status message still there.

Does anyone know why this is happening? Why won't the defaults get created, and why aren't images resizing?

Posts: 15
Joined: 09/14/2007

I have just installed the latest build (5.x-1.0-alpha7c.) and no imagecache presets were created.

On the catalog page, the source indicates that it is checking what appear to be the correct paths for the images - i.e.

/files/imagecache/product_list/files/image.jpg

I created my own imagecache preset (so not stored in the ubercart_images folder - the only one automatically created on install) and have this showing in teaser and full view.

Anyone able to comment on the imagecache presets not being installed?

There are a number of threads referring to this, including http://www.ubercart.org/forum/support/591/scattered_files_catalog_produc... and http://www.ubercart.org/forum/support/650/images_not_displaying_path_pro... * though not resolved

I am assuming it is not a mod_rewrite issue (??) as i can create my own imagecache presets, the ubercart_images folder was automatically created, etc.

* references to views when views is not required can be confusing... (or am i missing something)

Posts: 2244
Joined: 08/07/2007
AdministratoreLiTe!

Did you see the link in the Store administration page? It should be able to create the presets for you. If it doesn't work, you can create those presets manually. Once they're all made, the status should change to "OK".

The presets might not be made automatically because the Imagecache module was enabled after the Product module.

Posts: 116
Joined: 08/08/2007
Brain Stormer

my 2 cents.

i've seen this same topic come up repeatedly over the last 8? months or so.

that should be a dead ringer clue that something is not right about it. Either the install, the interface or the documentation.

Personally, i recall the option to enable / generate the initial imagecache stuff "hidden" on the main uc configuration page. Once it's set up it seems to work fine but it probably needs to made more obvious. Either on a separate configuration page and or with an adjoining documentation page to cover all the necessary steps to get it working and where to find the initial setup page.

Then when posts like these come up, you simply point users to the doc link. end of story.

Anyway, you can leave it the way it is and keep answering forum question but i'd estimate it is probably the most frequently asked question on these forums so you have an opportunity to cut your support work down considerably if you address it.

just my observation.

Posts: 15
Joined: 09/14/2007

i did write out a detailed reply days ago - i must not have hit submit...

I will try to recall what i wrote and re-write