If this is your first visit, check our documentation. To post, register or login.
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

Started by lat9 on 15 Oct 2017, 3:54 PM · Views: 160,515

Results 601 to 620 of 774
4 Jun 2024, 6:23 PM
#601
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,974
Plugin Contributions:
8

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

retched:

PHP 8.3.7 // ZC 2.0.1 // Image Handler 5.3.4 (as last available in the plugin directory)

I've since reinstalled and cleared the add on, but still am treated to the same error message. I'm 99% sure this is because I'm running PHP 8 but don't know what change to make here to make this PHP 8 safe.

Any help here with this warning debug message I've received?

are you sure this file in your install is the same as this one?

https://github.com/zencart/zencart/blob/v2.0.1/admin/includes/modules/products_previous_next.php

author of square Webpay, now with Apple Pay and Google Pay.
mXworks
donations: venmo or paypal accepted.
premium consistent excellent support. available for hire.

4 Jun 2024, 6:49 PM
#603
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,974
Plugin Contributions:
8

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

it looks like you have a category with no products.

all of the vars get set in this section of code:

https://github.com/zencart/zencart/blob/b44bb30e2009afe194391f55425e2f783a3fdc3e/admin/includes/modules/products_previous_next.php#L75-L92

so your id_array is 0; ie no products in the category, based on the sql results from a little above.

probably something that needs to be looked at.

best.

author of square Webpay, now with Apple Pay and Google Pay.
mXworks
donations: venmo or paypal accepted.
premium consistent excellent support. available for hire.

4 Jun 2024, 6:54 PM
#604
retched avatar

retched

Totally Zenned

Join Date:
Jun 2007
Location:
Bronx, New York, United States
Posts:
949
Plugin Contributions:
3

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

carlwhat:

it looks like you have a category with no products.

all of the vars get set in this section of code:

https://github.com/zencart/zencart/blob/b44bb30e2009afe194391f55425e2f783a3fdc3e/admin/includes/modules/products_previous_next.php#L75-L92

so your id_array is 0; ie no products in the category, based on the sql results from a little above.

probably something that needs to be looked at.

best.

Yup that's what I'm look at as well, but what's odd is that the same line of code is still showing a list of the products. The Previous button recognizes it's at the top of the list and proceeds to cycle to the end of the list. The next button works when there is a product selected but it's not going through when nothing is selected in the combo box at the default.

4 Jun 2024, 7:03 PM
#605
retched avatar

retched

Totally Zenned

Join Date:
Jun 2007
Location:
Bronx, New York, United States
Posts:
949
Plugin Contributions:
3

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

carlwhat:

it looks like you have a category with no products.

all of the vars get set in this section of code:

https://github.com/zencart/zencart/blob/b44bb30e2009afe194391f55425e2f783a3fdc3e/admin/includes/modules/products_previous_next.php#L75-L92

so your id_array is 0; ie no products in the category, based on the sql results from a little above.

probably something that needs to be looked at.

best.

Not sure that is true. There is a list of products being returned, see the Combo Box, but for some reason the "next_item" isn't being set to the first item despite the previous button is going backwards to the last item of the list.

4 Jun 2024, 10:34 PM
#606
lat9 avatar

lat9

Administrator

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

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

What's the associated URL (from the browser's address bar)? I've been fussing with various display options and can't trigger those warnings.

5 Jun 2024, 5:40 AM
#607
retched avatar

retched

Totally Zenned

Join Date:
Jun 2007
Location:
Bronx, New York, United States
Posts:
949
Plugin Contributions:
3

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

lat9:

What's the associated URL (from the browser's address bar)? I've been fussing with various display options and can't trigger those warnings.

This one:

https://www.localhost.com/justuptown/justoffice/index.php?cmd=image_handler

No anything selected.

5 Jun 2024, 10:58 AM
#608
lat9 avatar

lat9

Administrator

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

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

retched:

This one:

https://www.localhost.com/justuptown/justoffice/index.php?cmd=image_handler

No anything selected.
So I updated my local XAMPP installation to use PHP 8.3.7 in the hopes that that would bring those logs to light, but no-go.

I reset the sort-order for the Test Examples category in the demo products to 0 so that a category with products would be the first to load (like in your screenshot). I get the same-ish display when I navigate to that URL via Tools :: Image Handler-5, but still no PHP warnings.

I'm quickly running out of ideas.

5 Jun 2024, 2:44 PM
#609
retched avatar

retched

Totally Zenned

Join Date:
Jun 2007
Location:
Bronx, New York, United States
Posts:
949
Plugin Contributions:
3

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

lat9:

So I updated my local XAMPP installation to use PHP 8.3.7 in the hopes that that would bring those logs to light, but no-go.

I reset the sort-order for the Test Examples category in the demo products to 0 so that a category with products would be the first to load (like in your screenshot). I get the same-ish display when I navigate to that URL via Tools :: Image Handler-5, but still no PHP warnings.

I'm quickly running out of ideas.

Likewise.

So far I have:

  • Uninstalled and reinstalled IH5. (Completely remove the files and the configurations.)
  • Went back and overwrote the files mentioned within the log with the newest version of each one from the respective git repository. (Both ZenCart 2.0.1 and Image Handler.)

Still receiving the error/warnings. I'm almost tempted to spin up a fresh 2.0.1 and try it there.

The Attributes Controller which uses a similar Next/Previous display doesn't display these errors.

5 Jun 2024, 4:12 PM
#610
lat9 avatar

lat9

Administrator

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

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

retched:

Likewise.

So far I have:

  • Uninstalled and reinstalled IH5. (Completely remove the files and the configurations.)
  • Went back and overwrote the files mentioned within the log with the newest version of each one from the respective git repository. (Both ZenCart 2.0.1 and Image Handler.)

Still receiving the error/warnings. I'm almost tempted to spin up a fresh 2.0.1 and try it there.

The Attributes Controller which uses a similar Next/Previous display doesn't display these errors.
If you do a database gzipped/zipped export and PM me a link through which I can download that file, I can inspect locally to see what I can see.

5 Jun 2024, 5:06 PM
#611
retched avatar

retched

Totally Zenned

Join Date:
Jun 2007
Location:
Bronx, New York, United States
Posts:
949
Plugin Contributions:
3

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

lat9:

If you do a database gzipped/zipped export and PM me a link through which I can download that file, I can inspect locally to see what I can see.

Sent via PM.

5 Jun 2024, 5:50 PM
#612
lat9 avatar

lat9

Administrator

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

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

retched:

Sent via PM.
Got it! I'll review later today.

6 Jun 2024, 12:23 AM
#613
lat9 avatar

lat9

Administrator

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

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

Found it. The category being initially displayed has products that are still 'registered' in the site's products_to_categories table but not in the products_description.

Find this code on lines 29-62 of admin/includes/ih_manager.php

// set categories and products if not set
if ($products_filter == '' && $current_category_id > 0) {
    $new_product_query = $db->Execute(
        "SELECT ptc.products_id FROM " . TABLE_PRODUCTS_TO_CATEGORIES . " ptc
            LEFT JOIN " . TABLE_PRODUCTS_DESCRIPTION . " pd
                ON ptc.products_id = pd.products_id
               AND pd.language_id = " . (int)$_SESSION['languages_id'] . "
          WHERE ptc.categories_id = " . (int)$current_category_id . "
       ORDER BY pd.products_name"
    );
    $products_filter = ($new_product_query->EOF) ? '' : $new_product_query->fields['products_id'];
    if ($products_filter !== '') {
        zen_redirect(zen_href_link(FILENAME_IMAGE_HANDLER, 'ih_page=manager&products_filter=' . $products_filter . '&current_category_id=' . $current_category_id));
    }
} else {
    if ($products_filter == '' && $current_category_id == '') {
        $reset_categories_id = zen_get_category_tree('', '', '0', '', '', true);
        $current_category_id = $reset_categories_id[0]['id'];
        $new_product_query = $db->Execute(
            "SELECT ptc.products_id FROM " . TABLE_PRODUCTS_TO_CATEGORIES . " ptc
                LEFT JOIN " . TABLE_PRODUCTS_DESCRIPTION . " pd
                    ON ptc.products_id = pd.products_id
                   AND pd.language_id = " . (int)$_SESSION['languages_id'] . "
              WHERE ptc.categories_id = " . (int)$current_category_id . "
           ORDER BY pd.products_name"
        );
        $products_filter = ($new_product_query->EOF) ? null : $new_product_query->fields['products_id'];
        if ($products_filter === null) {
            unset($_GET['products_filter']);
        } else {
            $_GET['products_filter'] = $products_filter;
        }
    }
}

and change to

// set categories and products if not set
if ($products_filter == '' && $current_category_id > 0) {
    $new_product_query = $db->Execute(
        "SELECT ptc.products_id FROM " . TABLE_PRODUCTS_TO_CATEGORIES . " ptc
            [B]INNER JOIN " . TABLE_PRODUCTS . " p
                ON p.products_id = ptc.products_id
            INNER[/B][B] JOIN[/B] " . TABLE_PRODUCTS_DESCRIPTION . " pd
                ON ptc.products_id = pd.products_id
               AND pd.language_id = " . (int)$_SESSION['languages_id'] . "
          WHERE ptc.categories_id = " . (int)$current_category_id . "
       ORDER BY pd.products_name"
    );
    $products_filter = ($new_product_query->EOF) ? '' : $new_product_query->fields['products_id'];
    if ($products_filter !== '') {
        zen_redirect(zen_href_link(FILENAME_IMAGE_HANDLER, 'ih_page=manager&products_filter=' . $products_filter . '&current_category_id=' . $current_category_id));
    }
} else {
    if ($products_filter == '' && $current_category_id == '') {
        $reset_categories_id = zen_get_category_tree('', '', '0', '', '', true);
        $current_category_id = $reset_categories_id[0]['id'];
        $new_product_query = $db->Execute(
            "SELECT ptc.products_id FROM " . TABLE_PRODUCTS_TO_CATEGORIES . " ptc
                [B]INNER JOIN " . TABLE_PRODUCTS . " p
                    ON p.products_id = ptc.products_id
                INNER[/B] JOIN " . TABLE_PRODUCTS_DESCRIPTION . " pd
                    ON ptc.products_id = pd.products_id
                   AND pd.language_id = " . (int)$_SESSION['languages_id'] . "
              WHERE ptc.categories_id = " . (int)$current_category_id . "
           ORDER BY pd.products_name"
        );
        $products_filter = ($new_product_query->EOF) ? null : $new_product_query->fields['products_id'];
        if ($products_filter === null) {
            unset($_GET['products_filter']);
        } else {
            $_GET['products_filter'] = $products_filter;
        }
    }
}

That'll be included in a forth-coming v5.3.5 of IH-5; see this GitHub issue for tracking: https://github.com/lat9/zen_Image-Handler/issues/16

6 Jun 2024, 6:03 AM
#614
retched avatar

retched

Totally Zenned

Join Date:
Jun 2007
Location:
Bronx, New York, United States
Posts:
949
Plugin Contributions:
3

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

lat9:

That'll be included in a forth-coming v5.3.5 of IH-5; see this GitHub issue for tracking: https://github.com/lat9/zen_Image-Handler/issues/16

That works! Thanks for the help.

15 Jun 2024, 10:22 PM
#615
jeff_mash avatar

jeff_mash

Totally Zenned

Join Date:
Aug 2004
Posts:
745
Plugin Contributions:
0

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

Any idea why I would see this error in the logs:

[15-Jun-2024 15:01:17 America/Los_Angeles] Request URI: /store/pl-cups-and-balls-by-pl-trick-p-28122.html, IP address: 66.249.66.83, Language id 1
#0 [internal function]: zen_debug_error_handler()
#1 /home/domain/public_html/store/includes/classes/bmz_image_handler.class.php(953): imagecreatefrompng()
#2 /home/domain/public_html/store/includes/classes/bmz_image_handler.class.php(750): ih_image->load_imageGD()
#3 /home/domain/public_html/store/includes/classes/bmz_image_handler.class.php(430): ih_image->resize_imageGD()
#4 /home/domain/public_html/store/includes/classes/bmz_image_handler.class.php(282): ih_image->get_resized_image()
#5 /home/domain/public_html/store/includes/functions/extra_functions/functions_bmz_image_handler.php(154): ih_image->get_local()
#6 /home/domain/public_html/store/includes/functions/html_output.php(215): handle_image()
#7 /home/domain/public_html/store/includes/modules/bootstrap/centerboxes/also_purchased_products.php(54): zen_image()
#8 /home/domain/public_html/store/includes/templates/bootstrap/centerboxes/tpl_modules_also_purchased_products.php(16): require('/home/domain/...')
#9 /home/domain/public_html/store/includes/templates/bootstrap/templates/tpl_product_info_display.php(707): require('/home/domain/...')
#10 /home/domain/public_html/store/includes/modules/pages/product_info/main_template_vars.php(160): require('/home/domain/...')
#11 /home/domain/public_html/store/includes/templates/bootstrap/common/tpl_main_page.php(268): require('/home/domain/...')
#12 /home/domain/public_html/store/index.php(94): require('/home/domain/...')
--> PHP Warning: imagecreatefrompng(): gd-png: libpng warning: iCCP: known incorrect sRGB profile in /home/domain/public_html/store/includes/classes/bmz_image_handler.class.php on line 953.

  • Jeff
16 Jun 2024, 2:41 AM
#616
lat9 avatar

lat9

Administrator

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

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

Jeff_Mash:

Any idea why I would see this error in the logs:

[15-Jun-2024 15:01:17 America/Los_Angeles] Request URI: /store/pl-cups-and-balls-by-pl-trick-p-28122.html, IP address: 66.249.66.83, Language id 1
#0 [internal function]: zen_debug_error_handler()
#1 /home/domain/public_html/store/includes/classes/bmz_image_handler.class.php(953): imagecreatefrompng()
#2 /home/domain/public_html/store/includes/classes/bmz_image_handler.class.php(750): ih_image->load_imageGD()
#3 /home/domain/public_html/store/includes/classes/bmz_image_handler.class.php(430): ih_image->resize_imageGD()
#4 /home/domain/public_html/store/includes/classes/bmz_image_handler.class.php(282): ih_image->get_resized_image()
#5 /home/domain/public_html/store/includes/functions/extra_functions/functions_bmz_image_handler.php(154): ih_image->get_local()
#6 /home/domain/public_html/store/includes/functions/html_output.php(215): handle_image()
#7 /home/domain/public_html/store/includes/modules/bootstrap/centerboxes/also_purchased_products.php(54): zen_image()
#8 /home/domain/public_html/store/includes/templates/bootstrap/centerboxes/tpl_modules_also_purchased_products.php(16): require('/home/domain/...')
#9 /home/domain/public_html/store/includes/templates/bootstrap/templates/tpl_product_info_display.php(707): require('/home/domain/...')
#10 /home/domain/public_html/store/includes/modules/pages/product_info/main_template_vars.php(160): require('/home/domain/...')
#11 /home/domain/public_html/store/includes/templates/bootstrap/common/tpl_main_page.php(268): require('/home/domain/...')
#12 /home/domain/public_html/store/index.php(94): require('/home/domain/...')
--> PHP Warning: imagecreatefrompng(): gd-png: libpng warning: iCCP: known incorrect sRGB profile in /home/domain/public_html/store/includes/classes/bmz_image_handler.class.php on line 953.
Something in the PHP base does like that .png image.

16 Jun 2024, 2:35 PM
#617
lat9 avatar

lat9

Administrator

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

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

lat9:

Something in the PHP base does like that .png image.
Exactly, sounds like the .png file is corrupted.

17 Jun 2024, 5:57 PM
#618
jeff_mash avatar

jeff_mash

Totally Zenned

Join Date:
Aug 2004
Posts:
745
Plugin Contributions:
0

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

lat9:

Exactly, sounds like the .png file is corrupted.

That's what I thought but it's displaying just fine. This is the link to the product (it has the main image and one additional image) and both load just fine:

https://www.mjmmagic.com/store/pl-cups-and-balls-by-pl-trick-p-28122.html

Is it possible that the image can be corrupted and yet, still display just fine?

  • Jeff
17 Jun 2024, 6:25 PM
#619
gothstone avatar

gothstone

Zen Follower

Join Date:
Jun 2005
Posts:
330
Plugin Contributions:
0

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

yes. I have run into that with a JPG that had been incorrectly renamed to PNG. Chrome could figure it out, but not GD.

2 + 2 = 5 for extremely large values of 2

Pez Collectors Store •••••••• My Plugins List

21 Jun 2024, 3:28 PM
#620
lat9 avatar

lat9

Administrator

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

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

v5.3.5 of Image Handler 5 is now available for download: https://www.zen-cart.com/downloads.php?do=file&id=2169

This release corrects issue #16: Correct product dropdown handling when products are misconfigured.