Zen Cart Logo
Forums / All Other Contributions/Addons / Image Handler 5 (for v1.5.5 - v1.5.8) Support Thread

Image Handler 5 (for v1.5.5 - v1.5.8) Support Thread

Sticky

Views: 158,860

Results 1 to 20 of 756
15 Oct 2017, 3:54 PM
#1
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,097
Plugin Contributions:
56

Image Handler 5 (for v1.5.5 - v1.5.8) Support Thread

Welcome to the new support thread for Image Handler 5, v5.00.

I don't have a download link yet, but will post back once this version of the plugin has been uploaded to the Zen Cart plugins. Anyone wanting to try the v5.0.0-beta4 version can download that zip-file from the plugin's GitHub repository.

Image Handler 5 will be submitted as a new add-on with a new name to minimize confusion so this new *clean *support thread could be started. The bugs/issues reported in the old support thread have been addressed in this new version, and the readme has been revamped to provide more information upfront to those who use this plugin which will (hopefully) address some of the usual install and configuration questions.

This version of Image Handler removes all core-file changes required by previous IH versions, requiring only two (2) template-override file updates. Those updates are both comprised of added "notifiers", allowing Image Handler and associated large-image display plugins (like Fual Slimbox and ColorBox) interoperation.

The previous support threads can be found here:

All support related questions for Image Handler 5 for v1.5.5 should be posted on THIS support thread.

  • The Image Handler 4 Support thread will continue to serve as the support thread for Image Handler 4 for v1.5.x (for ZC v1.5.0 through 1.5.4).
  • The Image Handler 3 Support thread will continue to serve as the support thread for Image Handler 3 for v1.3.x (for ZC v1.3.9).
  • The Image Handler 2 Support thread will continue to serve as the support thread for those who are using Image Handler 2 for v1.3.x (ZC v1.3.8).

Any IH2, IH3 or IH4 questions posted here will be (gently or not so gently) re-directed back to the appropriate support thread ... and vice versa.

17 Oct 2017, 6:40 PM
#2
heathenmagic avatar

heathenmagic

Totally Zenned

Join Date:
May 2005
Location:
England
Posts:
733
Plugin Contributions:
0

Re: Image Handler 5 (for v1.5.5 - v1.5.8) Support Thread

Hi there,
Thanks for this update. I am upgraded from v4 on 1.55e zencart, so perhaps it is upgrade related. Everything else seems okay. I get a blank page for adding a second image, and the following in error log:-

[17-Oct-2017 18:26:35 UTC] PHP Fatal error: Uncaught Error: Call to undefined function find_additional_images() in /home//public_html//includes/ih_manager.php:119
Stack trace:
#0 /home/*****/public_html//image_handler.php(53): require()
#1 {main}
thrown in /home/
/public_html/****/includes/ih_manager.php on line 119[/QUOTE]

But I am using the beta and latest version, so perhaps this is not an issue in pending download version. I did overwrite of files and tried finding that function with developer tool kit. Everything else seems okay, am using colorbox if it makes any difference and it installed perfectly.

17 Oct 2017, 7:13 PM
#3
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,097
Plugin Contributions:
56

Re: Image Handler 5 (for v1.5.5 - v1.5.8) Support Thread

Oopsie! Thanks for the report.

You can correct the issue by changing lines 119-120 to the following:

$ih_manager->findAdditionalImages($array, DIR_FS_CATALOG . DIR_WS_IMAGES . $data['imgBaseDir'], 
          $data['imgExtension'], $data['imgBase'] );
19 Oct 2017, 4:11 PM
#4
heathenmagic avatar

heathenmagic

Totally Zenned

Join Date:
May 2005
Location:
England
Posts:
733
Plugin Contributions:
0

Re: Image Handler 5 (for v1.5.5 - v1.5.8) Support Thread

Thats okay - hope you are well btw.

I tried the edit and also latest repository, but it is still the same at the moment. But it could be upgrade issue or remnants from IH 4.

19 Oct 2017, 4:24 PM
#5
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,097
Plugin Contributions:
56

Re: Image Handler 5 (for v1.5.5 - v1.5.8) Support Thread

HeathenMagic:

Thats okay - hope you are well btw.

I tried the edit and also latest repository, but it is still the same at the moment. But it could be upgrade issue or remnants from IH 4.
All's good here! Would you do a search, using your admin's Tools->Developers Tool Kit, to see where find_additional_images is being used in the admin-level PHP files?

19 Oct 2017, 5:54 PM
#6
heathenmagic avatar

heathenmagic

Totally Zenned

Join Date:
May 2005
Location:
England
Posts:
733
Plugin Contributions:
0

Re: Image Handler 5 (for v1.5.5 - v1.5.8) Support Thread

I have the following result:-

/home/****/public_html/includes/ih_manager.php

Line #118 : find_additional_images($array, DIR_FS_CATALOG . DIR_WS_IMAGES . $data['imgBaseDir'],

Which I didn't see before so it seems to have the function mentioned okay. I am able to delete and add new photos etc, and testing everything else seems okay.

19 Oct 2017, 7:17 PM
#7
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,097
Plugin Contributions:
56

Re: Image Handler 5 (for v1.5.5 - v1.5.8) Support Thread

HeathenMagic:

I have the following result:-

Which I didn't see before so it seems to have the function mentioned okay. I am able to delete and add new photos etc, and testing everything else seems okay.
Right, you need to change /admin/ih_manager.php on those lines, changing find_additional_images to $ih_manager->findAdditionalImages. That should correct the debug-log generated.

21 Oct 2017, 7:49 AM
#8
gerrim avatar

gerrim

New Zenner

Join Date:
Jul 2013
Location:
Brisbane, Australia
Posts:
39
Plugin Contributions:
0

Re: Image Handler 5 (for v1.5.5 - v1.5.8) Support Thread

lat9:

Right, you need to change /admin/ih_manager.php on those lines, changing find_additional_images to $ih_manager->findAdditionalImages. That should correct the debug-log generated.

Hi lat9. Great work that you & the ZC team are doing! My sincere thanks for your time & effort helping those of us (like me) with only enough coding experience to be dangerous :bigups:.
I've been experiencing a similar problem to HeathMagic tho my error log shows findAdditionalImages instead of **find_additional_images:

[21-Oct-2017 17:10:09 Australia/Brisbane] PHP Fatal error: Call to a member function findAdditionalImages() on null in C:\wamp64\www\MY_ADMIN\includes\ih_manager.php on line 119
[21-Oct-2017 17:10:09 Australia/Brisbane] PHP Stack trace:
[21-Oct-2017 17:10:09 Australia/Brisbane] PHP 1. {main}() C:\wamp64\www\MY_ADMIN\image_handler.php:0
[21-Oct-2017 17:10:09 Australia/Brisbane] PHP 2. require() C:\wamp64\www\MY_ADMIN\image_handler.php:53
Nothing showed up in my search for instances of find_additional_images as you suggested in post #5
. **I searched for any instances of findAdditionalImages and the only instance of this without **$ih_manager-> **was at Line # 26 of C:\wamp64\www\MY_ADMIN/includes/classes/ImageHandlerAdmin.php. I tried altering this, but when it caused the whole IH5 admin to fail to appear and a bug report stated and unexpected '$ih_manager', I reverted back to the original file.

Any ideas?

My system:

  • zen-cart-v1.5.5e running on WAMP with SSL installed
  • Template: a clone of responsive_sheffield_blue_2.0 with all the code changes I've been able to find to make it consistent with ZC1.5.5
  • A range of plugins:ckeditor-for-zencart_v3.7, Direct Bank Deposit V1.5.revised, one_page_checkout-1.4.0, aupost.2.2.1, backup_mysql_plugin_v5c
  • originally had IH4 installed (downloaded from Github 4 Oct) but had to uninstall it as I think it was the culprit messing up my drop-down menus
    Thanks in advance.

Thanks again

21 Oct 2017, 11:48 AM
#9
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,097
Plugin Contributions:
56

Re: Image Handler 5 (for v1.5.5 - v1.5.8) Support Thread

GerriM:

Hi lat9. Great work that you & the ZC team are doing! My sincere thanks for your time & effort helping those of us (like me) with only enough coding experience to be dangerous :bigups:.
I've been experiencing a similar problem to HeathMagic tho my error log shows findAdditionalImages instead of [B]find_additional_images:

Nothing showed up in my search for instances of find_additional_images as you suggested in post #5**. **I searched for any instances of findAdditionalImages and the only instance of this without **$ih_manager-> **was at Line # 26 of C:\wamp64\www\MY_ADMIN/includes/classes/ImageHandlerAdmin.php. I tried altering this, but when it caused the whole IH5 admin to fail to appear and a bug report stated and unexpected '$ih_manager', I reverted back to the original file.

Any ideas?

My system:

  • zen-cart-v1.5.5e running on WAMP with SSL installed
  • Template: a clone of responsive_sheffield_blue_2.0 with all the code changes I've been able to find to make it consistent with ZC1.5.5
  • A range of plugins:ckeditor-for-zencart_v3.7, Direct Bank Deposit V1.5.revised, one_page_checkout-1.4.0, aupost.2.2.1, backup_mysql_plugin_v5c
  • originally had IH4 installed (downloaded from Github 4 Oct) but had to uninstall it as I think it was the culprit messing up my drop-down menus

Thanks in advance.

Thanks again
My bad, the correction should have been changing find_additional_images to $ih_admin->findAdditionalImages.

P.S. I'll get that change updated on GitHub, too. Thanks for the report.

21 Oct 2017, 1:50 PM
#10
heathenmagic avatar

heathenmagic

Totally Zenned

Join Date:
May 2005
Location:
England
Posts:
733
Plugin Contributions:
0

Re: Image Handler 5 (for v1.5.5 - v1.5.8) Support Thread

Thanks, that worked, I can confirm additional images are uploaded :-)

21 Oct 2017, 5:47 PM
#11
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,097
Plugin Contributions:
56

Re: Image Handler 5 (for v1.5.5 - v1.5.8) Support Thread

HeathenMagic:

Thanks, that worked, I can confirm additional images are uploaded :-)
Thanks, again, for the report ... and the follow-up that I got it right this time!:blush:

21 Oct 2017, 9:03 PM
#12
gerrim avatar

gerrim

New Zenner

Join Date:
Jul 2013
Location:
Brisbane, Australia
Posts:
39
Plugin Contributions:
0

Re: Image Handler 5 (for v1.5.5 - v1.5.8) Support Thread

Thanks lat9: the additional images uploaded in IH5 Admin for me also.
However a different error log was generated in my case (seems related to my zen_colourbox.php file) and on the product page, only one product image showed up and the product description disappeared:

[22-Oct-2017 06:38:20 Australia/Brisbane] Request URI: /index.php?main_page=product_info&cPath=66&products_id=180, IP address: ::1
#1 ColorBoxObserver::update() called at [C:\wamp64\www\includes\classes\observers\ColorBoxObserver.php:41]
#2 ColorBoxObserver->update() called at [C:\wamp64\www\includes\classes\class.base.php:103]
#3 base->notify() called at [C:\wamp64\www\includes\modules\MY_TEMPLATE\additional_images.php:165]
#4 require(C:\wamp64\www\includes\modules\MY_TEMPLATE\additional_images.php) called at [C:\wamp64\www\includes\templates\template_default\templates\tpl_modules_additional_images.php:13]
#5 require(C:\wamp64\www\includes\templates\template_default\templates\tpl_modules_additional_images.php) called at [C:\wamp64\www\includes\templates\MY_TEMPLATE\templates\tpl_product_info_display.php:84]
#6 require(C:\wamp64\www\includes\templates\MY_TEMPLATE\templates\tpl_product_info_display.php) called at [C:\wamp64\www\includes\modules\pages\product_info\main_template_vars.php:178]
#7 require(C:\wamp64\www\includes\modules\pages\product_info\main_template_vars.php) called at [C:\wamp64\www\includes\templates\MY_TEMPLATE\common\tpl_main_page.php:251]
#8 require(C:\wamp64\www\includes\templates\MY_TEMPLATE\common\tpl_main_page.php) called at [C:\wamp64\www\index.php:97]

[22-Oct-2017 06:38:20 Australia/Brisbane] PHP Warning: require(includes/modules/zen_colorbox.php): failed to open stream: No such file or directory in C:\wamp64\www\includes\classes\observers\ColorBoxObserver.php on line 41
[22-Oct-2017 06:38:20 Australia/Brisbane] PHP Stack trace:
[22-Oct-2017 06:38:20 Australia/Brisbane] PHP 1. {main}() C:\wamp64\www\index.php:0
[22-Oct-2017 06:38:20 Australia/Brisbane] PHP 2. require() C:\wamp64\www\index.php:97
[22-Oct-2017 06:38:20 Australia/Brisbane] PHP 3. require() C:\wamp64\www\includes\templates\MY_TEMPLATE\common\tpl_main_page.php:251
[22-Oct-2017 06:38:20 Australia/Brisbane] PHP 4. require() C:\wamp64\www\includes\modules\pages\product_info\main_template_vars.php:178
[22-Oct-2017 06:38:20 Australia/Brisbane] PHP 5. require() C:\wamp64\www\includes\templates\MY_TEMPLATE\templates\tpl_product_info_display.php:84
[22-Oct-2017 06:38:20 Australia/Brisbane] PHP 6. require() C:\wamp64\www\includes\templates\template_default\templates\tpl_modules_additional_images.php:13
[22-Oct-2017 06:38:20 Australia/Brisbane] PHP 7. base->notify() C:\wamp64\www\includes\modules\MY_TEMPLATE\additional_images.php:165
[22-Oct-2017 06:38:20 Australia/Brisbane] PHP 8. ColorBoxObserver->update() C:\wamp64\www\includes\classes\class.base.php:103
[22-Oct-2017 06:38:20 Australia/Brisbane] PHP Fatal error: require(): Failed opening required 'includes/modules/zen_colorbox.php' (include_path='.;C:\php\pear') in C:\wamp64\www\includes\classes\observers\ColorBoxObserver.php on line 41
[22-Oct-2017 06:38:20 Australia/Brisbane] PHP Stack trace:
[22-Oct-2017 06:38:20 Australia/Brisbane] PHP 1. {main}() C:\wamp64\www\index.php:0
[22-Oct-2017 06:38:20 Australia/Brisbane] PHP 2. require() C:\wamp64\www\index.php:97
[22-Oct-2017 06:38:20 Australia/Brisbane] PHP 3. require() C:\wamp64\www\includes\templates\MY_TEMPLATE\common\tpl_main_page.php:251
[22-Oct-2017 06:38:20 Australia/Brisbane] PHP 4. require() C:\wamp64\www\includes\modules\pages\product_info\main_template_vars.php:178
[22-Oct-2017 06:38:20 Australia/Brisbane] PHP 5. require() C:\wamp64\www\includes\templates\MY_TEMPLATE\templates\tpl_product_info_display.php:84
[22-Oct-2017 06:38:20 Australia/Brisbane] PHP 6. require() C:\wamp64\www\includes\templates\template_default\templates\tpl_modules_additional_images.php:13
[22-Oct-2017 06:38:20 Australia/Brisbane] PHP 7. base->notify() C:\wamp64\www\includes\modules\MY_TEMPLATE\additional_images.php:165
[22-Oct-2017 06:38:20 Australia/Brisbane] PHP 8. ColorBoxObserver->update() C:\wamp64\www\includes\classes\class.base.php:103

Getting there :smile:. Thanks

22 Oct 2017, 12:10 PM
#13
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,097
Plugin Contributions:
56

Re: Image Handler 5 (for v1.5.5 - v1.5.8) Support Thread

@GerriM, thanks for the report. I'll get that change in the works.

22 Oct 2017, 12:19 PM
#14
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,097
Plugin Contributions:
56

Re: Image Handler 5 (for v1.5.5 - v1.5.8) Support Thread

lat9:

@GerriM, thanks for the report. I'll get that change in the works.
Here's the preview, I'll be updating GitHub shortly. Change /includes/classes/observers/ColorBoxObserver.php, adding the bits highlighted:

<?php
// -----
// An observer-class to enable the "Colorbox" plugin to operate with the notification updates in the
// main_product_image and additional_images processing, provided by "Image Handler" v5.0.0 and later.
//
// Copyright (c) 2017 Vinos de Frutas Tropicales
//
class ColorBoxObserver extends base 
{
    public function __construct() 
    {
        if (defined('ZEN_COLORBOX_STATUS') && ZEN_COLORBOX_STATUS == 'true') {
            $this->attach(
                $this,
                array(
                    //- From /includes/modules/additional_images.php
                    'NOTIFY_MODULES_ADDITIONAL_IMAGES_SCRIPT_LINK',
                )
            );
        }
    }

    public function update(&$class, $eventID, $p1, &$p2, &$p3, &$p4, &$p5, &$p6, &$p7, &$p8, &$p9) 
    {
        switch ($eventID) {
            // -----
            // This notifier gives notice that an additional image's script link is requested.  A monitoring observer sets
            // the $p2 value to boolean true if it has provided an alternate form of that link; otherwise, the base code will
            // create that value.
            //
            // $p1 ... (r/o) ... An associative array, containing the 'flag_display_large', 'products_name', 'products_image_large', 'large_link' and 'thumb_slashes' values.
            // $p2 ... (r/w) ... A reference to the $script_link value, set initially to boolean false; if an observer modifies that value, the
            //                     the default module's processing is bypassed.
            //
            case 'NOTIFY_MODULES_ADDITIONAL_IMAGES_SCRIPT_LINK':
                $flag_display_large = $p1['flag_display_large'];
                $products_name = $p1['products_name'];
                $products_image_large = $p1['products_image_large'];
                $thumb_slashes = $p1['thumb_slashes'];
                $large_link = $p1['large_link'];
                require DIR_WS_MODULES . [B]zen_get_module_directory([/B]'zen_colorbox.php'[B])[/B];
                if (isset($script_link)) {
                    $p2 = $script_link;
                }
                break;

            default:
                break;
        }
    }
}
22 Oct 2017, 12:27 PM
#15
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,097
Plugin Contributions:
56

Re: Image Handler 5 (for v1.5.5 - v1.5.8) Support Thread

I've got v5.0.0-beta5 packaged up (https://github.com/DivaVocals/zen_Image-Handler/releases/tag/v5.0.0-beta5) for additional pre-testing. This includes the corrections for the issues reported by @HeathenMagic and @GerriM as well as the changes provided by @Design75 to re-instate the search function.

22 Oct 2017, 1:03 PM
#16
gerrim avatar

gerrim

New Zenner

Join Date:
Jul 2013
Location:
Brisbane, Australia
Posts:
39
Plugin Contributions:
0

Re: Image Handler 5 (for v1.5.5 - v1.5.8) Support Thread

lat9:

I've got v5.0.0-beta5 packaged up (https://github.com/DivaVocals/zen_Image-Handler/releases/tag/v5.0.0-beta5) for additional pre-testing. This includes the corrections for the issues reported by @HeathenMagic and @GerriM as well as the changes provided by @Design75 to re-instate the search function.
Thanks, Lat9. I'll let you know how it goes...and apologies if there's a few days delay.

24 Oct 2017, 12:28 PM
#17
gerrim avatar

gerrim

New Zenner

Join Date:
Jul 2013
Location:
Brisbane, Australia
Posts:
39
Plugin Contributions:
0

Re: Image Handler 5 (for v1.5.5 - v1.5.8) Support Thread

lat9:

I've got v5.0.0-beta5 packaged up (https://github.com/DivaVocals/zen_Image-Handler/releases/tag/v5.0.0-beta5)….

Well done, Lat9! I've tested my system, and you solved the issue I had. Thank you.

My delayed in testing/replying was because I detected another problem not long after posting #12 and was busy uninstalling/reinstalling plugins to try and find out if that was being caused by IH5 or another plugin. It may be both since, although I can't pinpoint exactly when this issue started occurring, I can confirm OPC was working OK while IH4 was loaded. Please let me know if I should, instead post this on the OPC support thread

This issue occurs during the One Page Checkout Confirm Button: During a customer sale, on the Select Shipping/Payment and Confirm Your Order page, when I click the Confirm Order / Review Order button (which depends on Payment Methods Requiring Confirmation setting), the button changes from black to blue but doesn’t cause transfer to the final checkout page. No error log is generated and I can return to shopping but checkout won't progress to completion.

The OPC and IH4 support threads refer to an incompatibility issue which I believe was addressed in IH5 (tho the error symptoms weren't identical). In any case, I tried a few things with no luck:

  1. uninstall OPC 1.4.0 and installed OPC 1.4.1
  2. tried processing orders without OPC turned on: the orders were processed completely - no error
  3. uninstalled IH5Beta4 and installed IH5Beta5. OPC Confirm Order button still didn’t work.
  4. turned on the OPC debug. This generated two files. I’ve attached the one citing multiple Notices.
    Can you help, please? Thanks.
24 Oct 2017, 12:47 PM
#18
gerrim avatar

gerrim

New Zenner

Join Date:
Jul 2013
Location:
Brisbane, Australia
Posts:
39
Plugin Contributions:
0

Re: Image Handler 5 (for v1.5.5 - v1.5.8) Support Thread

lat9:

I've got v5.0.0-beta5 packaged up (https://github.com/DivaVocals/zen_Image-Handler/releases/tag/v5.0.0-beta5)….

Well done, Lat9! The Beta5 version solved the issue I had. Thank you.

My delayed in testing/replying was because I detected another problem not long after posting #12 and was busy uninstalling/reinstalling plugins to try and find out if that was being caused by IH5 or another plugin. I think it’s both because, while I can't pinpoint exactly when this issue started occurring, I can confirm I was successfully using OPC while IH4 was loaded.…
A problem occurs during the One-Page Checkout: At the Select Shipping/Payment and Confirm Your Order page, when I click the Confirm Order / Review Order button (which depends on Payment Methods Requiring Confirmation setting), the button changes from black to blue but doesn’t cause transfer to the final checkout page. No error log is generated and I can return to shopping but checkout won't progress to completion.

The OPC and IH4 support threads refer to an incompatibility issue between these which I believe was addressed in IH5 (tho the error symptoms weren't identical). In any case, I tried a few things with no luck:

  1. uninstall OPC 1.4.0 and installed OPC 1.4.1
  2. tried processing orders without OPC turned on: orders were processed completely - no error
  3. uninstalled IH5Beta4 and installed IH5Beta5. OPC’s Confirm Order button still didn’t work.
  4. turned on the OPC debug. This generated two files. I’ve attached the one citing multiple Notices.
    Can you help, please? Thanks.
    [Attachment no longer available]
24 Oct 2017, 1:31 PM
#19
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,097
Plugin Contributions:
56

Re: Image Handler 5 (for v1.5.5 - v1.5.8) Support Thread

@GerriM, I just installed OPC v1.4.1 along with IH5-beta4 on a vanilla ZC1.5.5e and checked out with no issue so the problem that you're having is not an OPC/IH interoperation issue.

You can continue any discussion regarding the OPC issue over in that plugin's support thread.

24 Oct 2017, 8:09 PM
#20
gerrim avatar

gerrim

New Zenner

Join Date:
Jul 2013
Location:
Brisbane, Australia
Posts:
39
Plugin Contributions:
0

Re: Image Handler 5 (for v1.5.5 - v1.5.8) Support Thread

Thanks for that info, lat9. At least I know now it's not IH5.