Zen Cart Logo
Forums / Bug Reports / [Not a ZC bug] Fix for certain multiple images not showing

[Not a ZC bug] Fix for certain multiple images not showing

Locked

Views: 2,159

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
2 Apr 2008, 10:13 PM
#1
jerbroo avatar

jerbroo

New Zenner

Join Date:
Aug 2004
Location:
Austin
Posts:
47
Plugin Contributions:
0

[Not a ZC bug] Fix for certain multiple images not showing

The problem: multiple images would not show up even though they're named and placed correctly.

Debian Linux
Apache 2.5
php5
mysql5
This affected my install of 1.3.8 install 3/25/08.
These contribs are installed:
editor__fckeditor_plugin_2-5
image-handler_2.0-zc137
ultimate_seo_urls_2-106
fast_and_easy_checkout
short_description
zen_lightbox_1-4

Around line 25 of additional_images.php:

$products_image_base = str_replace($products_image_extension . '$', '', $products_image);

replaced with...

$extensionReg = '/' . $products_image_extension . '$/';
$products_image_base = preg_replace($extensionReg, '', $products_image);

str_replace doesn't accept regular expression args... preg_replace does.

I now see multiple images in on page and in the lightbox.

cross-posted from here:http://www.zen-cart.com/forum/showthread.php?p=531021#post531021

1 Jul 2008, 8:34 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: [Not a ZC bug] Fix for certain multiple images not showing

You are correct that str_replace doesn't accept regular expression args.
That's why Zen Cart doesn't mix them. (I just did a fresh download to be sure my files are the same as what's published on SF).

However, one or both of two of your contributions do specifically alter the file you mentioned, and thus are the likely culprits:

  • image handler
  • zen_lightbox

I know the image-handler mod does attempt to introduce regex args, and thus it's the primary suspect IMO.

1 Oct 2008, 7:11 PM
#3
oneworldstudios avatar

oneworldstudios

New Zenner

Join Date:
May 2007
Posts:
47
Plugin Contributions:
0

Re: [Not a ZC bug] Fix for certain multiple images not showing

nice fix! i'm running lightbox and had given up on this nagging issue. cheers!:clap: