Results 1 to 7 of 7

Threaded View

  1. #1
    Join Date
    Jun 2010
    Location
    Las Palmas de Gran Canaria, Spain
    Posts
    5
    Plugin Contributions
    0

    bug zen_image ambiguous value for $src parameter

    Hi,

    First time posting but searched the site and FAQs and found no love, so here's my question/report.

    Problem: The value for $src (first parameter of zen_image) is sometimes expected to be web site-relative and other times filesystem-relative

    Precondition: mod_rewrite is enabled and functioning (or some other method is used to append subdirectories to store URL - e.g. http://mysite.com/store/index.php becomes http://mysite.com/store/clothes/men/index.php)

    1. call zen_image with a $src value of 'images/medium/myProductImage_MED.jpg'

    Expected Result: an IMG tag with the width and height set to the actual width and height of the selected image

    Actual Result: an IMG tag with width and height of the default (small) product image

    Workaround: I am unaware of a way to work-around this.

    I see in zen_image that there are a few calls to file_exists($src) (line 232, for example) but if the $src value provided is web site-relative (as, I assume, it should be) or if the site is using any kind of virtual file structure, such a value will always return false.

    In my case I'm pretty sure the code is failing when calling @getimagesize($src) (lines 257 and 277 of includes/functions/html_output.php) and is then defaulting the the small image size. I can't think of any way to work around this and I've been racking my brain for a couple hours on this one issue.

    Any suggestions/thoughts would be greatly appreciated (even including suggesting to not use zen_image).

    Thanks.

    Ted Stresen-Reuter
    http://chicagoitsystems.com

    Zen-Cart: 1.5.1
    PHP 5.3.4
    MySQL: 5.1.30
    Apache: 2.2something
    No add-ons installed
    No customizations to core files
    Last edited by chicagoitsystems; 19 Dec 2012 at 12:27 PM. Reason: Added system version details

 

 

Similar Threads

  1. v151 Option Value URL parameter?
    By philip937 in forum General Questions
    Replies: 13
    Last Post: 14 Dec 2014, 05:58 AM
  2. Replies: 2
    Last Post: 24 Nov 2012, 02:48 AM
  3. v150 How to set Title different as Alt for zen_image?
    By tips007 in forum General Questions
    Replies: 3
    Last Post: 29 Oct 2012, 08:44 PM
  4. how to modify the image SRC for image-handler images?
    By jason1116 in forum All Other Contributions/Addons
    Replies: 4
    Last Post: 2 Sep 2009, 01:00 PM
  5. IH2 bug: zen_image doesnt take parameter
    By yellow1912 in forum All Other Contributions/Addons
    Replies: 3
    Last Post: 9 Dec 2008, 06:00 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg