One of my clients' estores is generating many error log files due to missing constant: LARGE_IMAGE_WIDTH
Here's an example of the error:
Code:
PHP Warning: Use of undefined constant LARGE_IMAGE_WIDTH - assumed 'LARGE_IMAGE_WIDTH' (this will throw an Error in a future version of PHP) in /path/to/store/includes/templates/MYTEMPLATE/templates/tpl_modules_main_product_image.php on line 24.
I did some digging in Developers Toolkit to see where this constant should be set and found some code in includes/classes/observers/FualSlimboxObserver.php which looks like it should be setting this constant:
PHP Code:
/ The constants LARGE_IMAGE_WIDTH/HEIGHT are supplied by neither Zen Cart nor Image Handler -- they're a
// LightBox 'legacy', I believe. In any case, need to deal with the condition where those constants
// haven't been defined previously, using the IH defaults as fall-back values.
//
if (!defined('LARGE_IMAGE_WIDTH')) {
define('LARGE_IMAGE_WIDTH', (defined('LARGE_IMAGE_MAX_WIDTH')) ? LARGE_IMAGE_MAX_WIDTH : 750);
}
if (!defined('LARGE_IMAGE_HEIGHT')) {
define('LARGE_IMAGE_HEIGHT', (defined('LARGE_IMAGE_MAX_HEIGHT')) ? LARGE_IMAGE_MAX_HEIGHT : 550);
}
The client's shop does have Image Handler 5 installed. Wondering if I can set this constant somewhere else at least temporarily to stop the barrage of error log files. But also wonder why this doesn't seem to be firing
Any advice on how to track this error down and resolve it?
Bookmarks