5 replies [Last post]
Nick's picture
Offline
Joined: 08/17/2007
Juice: 95
Was this information Helpful?

Is there any kind of workaround for imagecache to get it to display images without enabling clean urls? (IIS does not support cleanurls, I would suggest my company switch to apache... but they have too many things running on asp pages).

If not, does anyone know what I would have to edit to manually add images to the catalog page?

Thanks

Lyle's picture
Offline
AdministratoreLiTe!
Joined: 08/07/2007
Juice: 6846
Re: Ubercart, Imagecache, and Clean URLs

As far as I know, Imagecache has to have clean URLs to work right.

You can override theme_uc_catalog_browse() to use whatever method you want display the category images. You only need to change one line, but you still have to copy the new function into yourtheme_uc_catalog_browse() to put in your template.php file. The line you want to change is

<?php
 
if ($catalog->image){
   
$output .= theme('imagecache', 'thumbnail', $catalog->image['filepath'], $catalog->name, $catalog->name, array('class' => 'category'));
  }
?>

Without imagecache, you'll have to use

<?php
$file
= uc_catalog_image_load($catalog->tid);
$info = image_get_info($file->filepath);
?>

to get information about the image. $catalog->image won't exist without the imagecache module. That's bad coding on my part, so I'm changing the code in the repository as a result.

Tanjerine's picture
Offline
Bug FinderInternationalizationizerNot KulvikThe other woman.
Joined: 08/31/2007
Juice: 235
Re: Ubercart, Imagecache, and Clean URLs

hi, for whatever it's worth, i have successfully (so far, as far as i know) used imagecache-5.x-2.0 with non-cleanurls on IIS6.

a few things:

1 - just make sure you do install imageapi before updating to imagecache 2.

2 - as of yesterday, i had to patch thickbox as per this thread BEFORE running the drupal update script otherwise you get the blank white screen of something gone horribly wrong.

3 - run the drupal update script.

4 - configure to your heart's delight and the images will now be accessible at the non-cleanURL url. (index.php?q=files/imagecache/something/files/image.jpg)

hope this helps.

-- sarah

veganline's picture
Offline
Joined: 08/22/2009
Juice: 25
Is it true that Ubercart needs clean urls for images usually?

I'm just trying to make sense of an installation glitch and a large number of threads about the image directory problems I share.

Does anyone know if it is true that images can only work with clean urls or else with the care and knowledge above?
regards
John

Andy's picture
Offline
Administrator
Joined: 08/07/2007
Juice: 1076
Re: Is it true that Ubercart needs clean urls for images usually

The thread above is pretty old. It looks like imagecache no longer requires clean urls. (http://www.ubercart.org/forum/support/1341/imagecahe_without_clean_urls) although I have not tested it to be 100% certain.

shv_rk's picture
Offline
Joined: 08/16/2010
Juice: 112
Hi there, I can't the

Hi there,

I can't the imagecache working without clean urls either.

IIS 6 + drupal 6 + ubercert 2

I am unable to see product thubnails in the cart, upsell and so on.
in the admin> imagecache > uc_thumbnail > view > preview .. shows empty page

any suggestions?