are you sure this file in your install is the same as this one?
https://github.com/zencart/zencart/b...vious_next.php
Printable View
are you sure this file in your install is the same as this one?
https://github.com/zencart/zencart/b...vious_next.php
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/b...xt.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.
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.
https://i.imgur.com/rJr9FQb.png
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...=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.
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.
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
and change toCode:// 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 . '¤t_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;
}
}
}
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/16Code:// 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
INNER JOIN " . TABLE_PRODUCTS . " p
ON p.products_id = ptc.products_id
INNER 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 . '¤t_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
INNER JOIN " . TABLE_PRODUCTS . " p
ON p.products_id = ptc.products_id
INNER 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;
}
}
}
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.
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-cu...k-p-28122.html
Is it possible that the image can be corrupted and yet, still display just fine?
yes. I have run into that with a JPG that had been incorrectly renamed to PNG. Chrome could figure it out, but not GD.
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.
Running zc v2.0.1 and error log shows:
PHP Warning: imagecreatefrompng(): gd-png: libpng warning: iCCP: known incorrect sRGB profile in /.../includes/classes/bmz_image_handler.class.php on line 953.
Make sure your image has the correct RGB colour profile.
You can set it e.g. in GIMP
Options are Grayscale, Indexed and RGB.
Go with "RGB" which is a full bandwith colour profile supported by convert libraries.
This also applies to other image formats. You're going to have trouble when you work witg Grayscale or Indexed colour profiles. If you want a B/W image, just reduce the saturation instead of changing the colour profile.
If you're using other image editing software it doesn't matter which Full bandwith RGB profile you choose. They are just a kind of Lookup Table.
It's important your image file is not indexed with reduced colours (4 bit, 8 bit and so on).
GIMP is really handy for this kind of fixing files to match standards conversion libraries often need.
Running zc v2.0.1 and error log shows a new error:
--> PHP Warning: Undefined array key 1 in /...htdocs/includes/classes/bmz_image_handler.class.php on line 1055.
--> PHP Warning: Undefined array key 2 in /.../htdocs/includes/classes/bmz_image_handler.class.php on line 1055.
Thank you in advance!
Here are the full logs:
Request URI: /index.php?main_page=product_info&cPath=5_6&products_id=425, IP address: 54.36.148.169, Language id 2
#0 /.../htdocs/includes/classes/bmz_image_handler.class.php(1055): zen_debug_error_handler()
#1 /.../htdocs/includes/classes/bmz_image_handler.class.php(856): ih_image->get_background_rgb()
#2 /.../htdocs/includes/classes/bmz_image_handler.class.php(430): ih_image->resize_imageGD()
#3 /.../htdocs/includes/classes/bmz_image_handler.class.php(282): ih_image->get_resized_image()
#4 /.../htdocs/includes/functions/extra_functions/functions_bmz_image_handler.php(154): ih_image->get_local()
#5 /.../htdocs/includes/functions/html_output.php(215): handle_image()
#6 /.../htdocs/includes/templates/bootstrap/templates/tpl_modules_main_product_image.php(19): zen_image()
#7 /.../htdocs/includes/templates/bootstrap/templates/tpl_product_info_display.php(61): require('/data01/virt991...')
#8 /.../htdocs/includes/modules/pages/product_info/main_template_vars.php(140): require('/data01/virt991...')
#9 /.../htdocs/includes/templates/bootstrap/common/tpl_main_page.php(227): require('/data01/virt991...')
#10 /.../htdocs/index.php(94): require('/data01/virt991...')
--> PHP Warning: Undefined array key 1 in /.../htdocs/includes/classes/bmz_image_handler.class.php on line 1055.
Request URI: /index.php?main_page=product_info&cPath=5_6&products_id=425, IP address: 54.36.148.169, Language id 2
#0 /.../htdocs/includes/classes/bmz_image_handler.class.php(1055): zen_debug_error_handler()
#1 /.../htdocs/includes/classes/bmz_image_handler.class.php(856): ih_image->get_background_rgb()
#2 /.../htdocs/includes/classes/bmz_image_handler.class.php(430): ih_image->resize_imageGD()
#3 /.../htdocs/includes/classes/bmz_image_handler.class.php(282): ih_image->get_resized_image()
#4 /.../htdocs/includes/functions/extra_functions/functions_bmz_image_handler.php(154): ih_image->get_local()
#5 /.../htdocs/includes/functions/html_output.php(215): handle_image()
#6 /.../htdocs/includes/templates/bootstrap/templates/tpl_modules_main_product_image.php(19): zen_image()
#7 /.../htdocs/includes/templates/bootstrap/templates/tpl_product_info_display.php(61): require('/data01/virt991...')
#8 /.../htdocs/includes/modules/pages/product_info/main_template_vars.php(140): require('/data01/virt991...')
#9 /.../htdocs/includes/templates/bootstrap/common/tpl_main_page.php(227): require('/data01/virt991...')
#10 /.../htdocs/index.php(94): require('/data01/virt991...')
--> PHP Warning: Undefined array key 2 in /.../htdocs/includes/classes/bmz_image_handler.class.php on line 1055.
Here is the screenshot:
Attachment 20672
Thanks for that! It looks like the 'transparent' setting for those 3 values is the root-cause of those logs. I'll be further investigating and have created a GitHub issue (https://github.com/lat9/zen_Image-Handler/issues/17) to track associated changes.
I have currently solved it by replacing part on the code around line 1055:
/**
* @param $bg
*
* @return array|false
*/
protected function get_background_rgb($bg)
{
$color = false;
$bg = trim(str_replace('transparent', '', $bg));
list($red, $green, $blue)= preg_split('/[, :]/', $bg);
if (preg_match('/\d+/', $red.$green.$blue)) {
$red = min((int)$red, 255);
$green = min((int)$green, 255);
$blue = min((int)$blue, 255);
$color = ['r' => $red, 'g' => $green, 'b' => $blue];
}
return $color;
}
Replaced with:
protected function get_background_rgb($bg)
{
$color = false;
$bg = trim(str_replace('transparent', '', $bg));
$components = preg_split('/[, :]/', $bg);
if (count($components) === 3 && preg_match('/^\d+$/', $components[0]) && preg_match('/^\d+$/', $components[1]) && preg_match('/^\d+$/', $components[2])) {
$red = min((int)$components[0], 255);
$green = min((int)$components[1], 255);
$blue = min((int)$components[2], 255);
$color = ['r' => $red, 'g' => $green, 'b' => $blue];
}
return $color;
}
im getting this error on zen version 1.56c
PHP Warning: imagecreatefrompng(): '/var/www/clients/client1/web3/web/images/product_pictures/3 Commercial Stair NosingBA_01.png' is not a valid PNG file in /var/www/clients/client1/web3/web/includes/classes/bmz_image_handler.class.php on line 919.
Code:[17-Aug-2024 18:58:20 UTC] Request URI: /Metal_Trim_Transitions/Carpet_Carpet_Tile_Solutions/Carpet_Stair_Nosing/3_Commercial_Stair_Nosing/Futura_CM_609_3_Commercial_Stair_Nosing_12_Length_Buffed_Aluminum, IP address: 193.116.224.72
#1 imagecreatefrompng() called at [/var/www/clients/client1/web3/web/includes/classes/bmz_image_handler.class.php:919]
#2 ih_image->load_imageGD() called at [/var/www/clients/client1/web3/web/includes/classes/bmz_image_handler.class.php:717]
#3 ih_image->resize_imageGD() called at [/var/www/clients/client1/web3/web/includes/classes/bmz_image_handler.class.php:400]
#4 ih_image->get_resized_image() called at [/var/www/clients/client1/web3/web/includes/classes/bmz_image_handler.class.php:258]
#5 ih_image->get_local() called at [/var/www/clients/client1/web3/web/includes/functions/extra_functions/functions_bmz_image_handler.php:123]
#6 handle_image() called at [/var/www/clients/client1/web3/web/includes/functions/html_output.php:202]
#7 zen_image() called at [/var/www/clients/client1/web3/web/includes/modules/marcus/additional_images.php:150]
#8 require(/var/www/clients/client1/web3/web/includes/modules/marcus/additional_images.php) called at [/var/www/clients/client1/web3/web/includes/templates/marcus/templates/tpl_modules_additional_images.php:13]
#9 require(/var/www/clients/client1/web3/web/includes/templates/marcus/templates/tpl_modules_additional_images.php) called at [/var/www/clients/client1/web3/web/includes/templates/marcus/templates/tpl_product_info_display.php:47]
#10 require(/var/www/clients/client1/web3/web/includes/templates/marcus/templates/tpl_product_info_display.php) called at [/var/www/clients/client1/web3/web/includes/modules/pages/product_info/main_template_vars.php:281]
#11 require(/var/www/clients/client1/web3/web/includes/modules/pages/product_info/main_template_vars.php) called at [/var/www/clients/client1/web3/web/includes/templates/marcus/common/tpl_main_page.php:261]
#12 require(/var/www/clients/client1/web3/web/includes/templates/marcus/common/tpl_main_page.php) called at [/var/www/clients/client1/web3/web/index.php:97]
--> PHP Warning: imagecreatefrompng(): '/var/www/clients/client1/web3/web/images/product_pictures/3 Commercial Stair NosingBA_01.png' is not a valid PNG file in /var/www/clients/client1/web3/web/includes/classes/bmz_image_handler.class.php on line 919.
i am getting thousands of theses in logs and each1 is a different picture
Code:[10-Sep-2024 12:45:35 UTC] Request URI: /Flooring/Tile_Stone/SFI_Porcelain_Wood_Plank/SFI_Porcelain_Wood_Plank_Bullnose/Townhouse_Bullnose_Collection/Townhouse_Bullnose_6_x_24_Wood_Barrel_TY03BN, IP address: 85.208.96.194
#1 imagecreatefromjpeg() called at [/var/www/clients/client1/web3/web/includes/classes/bmz_image_handler.class.php:926]
#2 ih_image->load_imageGD() called at [/var/www/clients/client1/web3/web/includes/classes/bmz_image_handler.class.php:717]
#3 ih_image->resize_imageGD() called at [/var/www/clients/client1/web3/web/includes/classes/bmz_image_handler.class.php:400]
#4 ih_image->get_resized_image() called at [/var/www/clients/client1/web3/web/includes/classes/bmz_image_handler.class.php:258]
#5 ih_image->get_local() called at [/var/www/clients/client1/web3/web/includes/functions/extra_functions/functions_bmz_image_handler.php:123]
#6 handle_image() called at [/var/www/clients/client1/web3/web/includes/functions/extra_functions/pzen_marcus_template_functions.php:74]
#7 pzen_marcus_image() called at [/var/www/clients/client1/web3/web/includes/functions/extra_functions/pzen_marcus_template_functions.php:601]
#8 pzen_marcus_additional_images() called at [/var/www/clients/client1/web3/web/includes/functions/extra_functions/pzen_marcus_template_functions.php:704]
#9 get_pzen_marcus_product_content() called at [/var/www/clients/client1/web3/web/includes/templates/marcus/templates/tpl_modules_related_products.php:65]
#10 require(/var/www/clients/client1/web3/web/includes/templates/marcus/templates/tpl_modules_related_products.php) called at [/var/www/clients/client1/web3/web/includes/templates/marcus/templates/tpl_product_info_display.php:657]
#11 require(/var/www/clients/client1/web3/web/includes/templates/marcus/templates/tpl_product_info_display.php) called at [/var/www/clients/client1/web3/web/includes/modules/pages/product_info/main_template_vars.php:281]
#12 require(/var/www/clients/client1/web3/web/includes/modules/pages/product_info/main_template_vars.php) called at [/var/www/clients/client1/web3/web/includes/templates/marcus/common/tpl_main_page.php:261]
#13 require(/var/www/clients/client1/web3/web/includes/templates/marcus/common/tpl_main_page.php) called at [/var/www/clients/client1/web3/web/index.php:97]
--> PHP Warning: imagecreatefromjpeg(): gd-jpeg: JPEG library reports unrecoverable error: Not a JPEG file: starts with 0x89 0x50 in /var/www/clients/client1/web3/web/includes/classes/bmz_image_handler.class.php on line 926.
[10-Sep-2024 12:45:35 UTC] Request URI: /Flooring/Tile_Stone/SFI_Porcelain_Wood_Plank/SFI_Porcelain_Wood_Plank_Bullnose/Townhouse_Bullnose_Collection/Townhouse_Bullnose_6_x_24_Wood_Barrel_TY03BN, IP address: 85.208.96.194
#1 imagecreatefromjpeg() called at [/var/www/clients/client1/web3/web/includes/classes/bmz_image_handler.class.php:926]
#2 ih_image->load_imageGD() called at [/var/www/clients/client1/web3/web/includes/classes/bmz_image_handler.class.php:717]
#3 ih_image->resize_imageGD() called at [/var/www/clients/client1/web3/web/includes/classes/bmz_image_handler.class.php:400]
#4 ih_image->get_resized_image() called at [/var/www/clients/client1/web3/web/includes/classes/bmz_image_handler.class.php:258]
#5 ih_image->get_local() called at [/var/www/clients/client1/web3/web/includes/functions/extra_functions/functions_bmz_image_handler.php:123]
#6 handle_image() called at [/var/www/clients/client1/web3/web/includes/functions/extra_functions/pzen_marcus_template_functions.php:74]
#7 pzen_marcus_image() called at [/var/www/clients/client1/web3/web/includes/functions/extra_functions/pzen_marcus_template_functions.php:601]
#8 pzen_marcus_additional_images() called at [/var/www/clients/client1/web3/web/includes/functions/extra_functions/pzen_marcus_template_functions.php:704]
#9 get_pzen_marcus_product_content() called at [/var/www/clients/client1/web3/web/includes/templates/marcus/templates/tpl_modules_related_products.php:65]
#10 require(/var/www/clients/client1/web3/web/includes/templates/marcus/templates/tpl_modules_related_products.php) called at [/var/www/clients/client1/web3/web/includes/templates/marcus/templates/tpl_product_info_display.php:657]
#11 require(/var/www/clients/client1/web3/web/includes/templates/marcus/templates/tpl_product_info_display.php) called at [/var/www/clients/client1/web3/web/includes/modules/pages/product_info/main_template_vars.php:281]
#12 require(/var/www/clients/client1/web3/web/includes/modules/pages/product_info/main_template_vars.php) called at [/var/www/clients/client1/web3/web/includes/templates/marcus/common/tpl_main_page.php:261]
#13 require(/var/www/clients/client1/web3/web/includes/templates/marcus/common/tpl_main_page.php) called at [/var/www/clients/client1/web3/web/index.php:97]
--> PHP Warning: imagecreatefromjpeg(): '/var/www/clients/client1/web3/web/images/product_pictures/LL04.jpg' is not a valid JPEG file in /var/www/clients/client1/web3/web/includes/classes/bmz_image_handler.class.php on line 926.
what color profile do the jpg files e.g. LL04.jpg have?
You can send it to me via mail if you don't know how to check it.
0x89 0x50 means that the image is actually a png file, but is misnammed with a jpg extension.
Possible, but a lot of work. And if you go there you might as well add in removing invalid characters, fixing double extensions, etc. Certainly wouldn't be bad if someone wants to spend the time coding it.
In case someone does, png starts with 0x89 0x50
Jpg is 0xFF 0xD8
Gif is 0x47 0x49 0x46
here is picture https://jnsflooringandsupplies.com/F...ded_Vista_LL04
I download from manufacturers website
https://www.southlandfloors.com/d/sf...ista-tile/ll04
then I upload to https://bulkresizephotos.com/en?exte...ckground=false
and resize.
jimmie,
you downloaded a png and renamed it a jpg.
not sure what else to say about that.
from manufacturers website:
from your website:Code:<div title="Langley by Sfi - Ll04 Wooded Vista" style="background-image: url("https://images.floorforce.com/Textures/16028/Ceramic-and-Porcelain/30cdc42f-a774-4604-8756-13bc3a4b1592/Images/LL04--LANGLEYLL04_500x500.png"); height: 400px; width: 100%; background-size: cover; background-position: center center;"></div>
Code:<div class="fotorama__stage__frame fotorama__loaded fotorama__loaded--img fotorama__active" style="left: 0px;">
<img src="images/product_pictures/LL04.jpg" class="fotorama__img" style="width: 1250px; height: 1250px; left: 0px; top: 0px;">
</div>
So I can't convert pictures. I think I read somewhere that product pictures should be same size and type? Trying to keep listing pages neat and tidy
don't put words in my mouth...
from the evidence that is posted on this thread, you did not convert the image from a png to a jpg. you just changed the file extension.
you may have resized it; but again from what has been posted on this thread, as well as what i have looked at on the 2 sites, all you did was change the extension name.
feel free to continue to defend your position. i will graciously back out from further discussion of it.
although i still think image handler determining the file type and acting accordingly would be a beneficial addition to the plugin. if i feel so inclined, perhaps i will take a stab at it. right now, i am not feeling so inclined.
Use a proper software e.g. GIMP to prepare your images before you upload
With GIMP you can read out the image information, set / change the color profile and export to a proper file type e.g. JPG.
On the screenshot you see what Carl already said. So you can always check yourself.
FWIW for batch processing of images I've found Irfanview to cover all my requirements over many years.
As far as handling user errors, I think that as long as the site continues to function, a debug log is enough to go on.
OP now knows the problem and will fix it.
Perhaps the specific case could be added to IH documentation to save others some time.
When using windows paint, is that not able to take a png and save as jpg. Just sucks cause we have over 10000 product pictures to fix.
I installed IH5, got no notice in the header of it being installed, I found the IH settings and such. The image shows in product listing and items page but nowhere else. Store just gives the product info with no image. Is it due to me having the store in maintenance mode, I reuploaded the files to their spots. I cleared its image cache but when I go to the link for managing the images it is blank. I have them named as they were in 1.39h...name.jpg ,name_01.jpg, This is from IH area,maybe I did not set the sizes like I should have?
yes my test images. should I uninstall it then restart Firefix and try again? the next mod iwanted to try is the ceon url one, is it updated for 2.01
UPDATE, eveything shows up today. I figured out that when I added the product I have my main cat>vendor cat name. then add products but I had entered the product somehow wrong and once I set it proper all worked.
2.0.1 is a different critter and almost everything is like a brand new store with things slightly different...
Dutch translation.
DirkS
Zen cart v2.1.0, IH 5.3.5. Fresh install.
The "Additional Images" button on the product page does not show up even additional images are added and displays fine in Admin. Is there a setting to enable the "Additional Images" button?
The button shows up fine on the product pages for which I did not use IH (before installing IH):
https://www.nordfield.com/index.php?...roducts_id=181
When using IH:
https://www.nordfield.com/index.php?...roducts_id=180
That site shows that it's in maintenance mode.
Zen Cart 2.1.0 added a new setting in Configuration // Images: Additional Images matching pattern. On a fresh install, that setting is forced to strict -- while the pre-zc210 default is legacy.
I'm guessing that (a) while the zc210 installation was a fresh install, that additional images were present in the site using the 'legacy' naming convention and (b) that IH has not (yet) been updated to recognize the 'strict' naming convention.
Oh I should have been able figure this out myself, indeed the problem was that I had changed "_" to "-" in bootstrap_additional_images.php (for a foolish reason). Once I changed that back to "_" it works fine :thumbsup:
Anyone have this warning pop up from time to time?
Before I start recursing over every image in my directory, it's a lot, anyone have any ideas of a mend? [I'm 99% sure it's because some images being loaded have an iCCP color profile set to it.]Code:[19-Jan-2025 18:59:10 America/New_York] Request URI: /justuptown/index.php?main_page=product_cards_ufs_info&cPath=1_11&products_id=794, IP address: 127.0.0.1, Language id 1
#0 [internal function]: zen_debug_error_handler()
#1 E:\xampp\htdocs\justuptown\includes\classes\bmz_image_handler.class.php(953): imagecreatefrompng()
#2 E:\xampp\htdocs\justuptown\includes\classes\bmz_image_handler.class.php(750): ih_image->load_imageGD()
#3 E:\xampp\htdocs\justuptown\includes\classes\bmz_image_handler.class.php(430): ih_image->resize_imageGD()
#4 E:\xampp\htdocs\justuptown\includes\classes\bmz_image_handler.class.php(282): ih_image->get_resized_image()
#5 E:\xampp\htdocs\justuptown\includes\functions\extra_functions\functions_bmz_image_handler.php(154): ih_image->get_local()
#6 E:\xampp\htdocs\justuptown\includes\functions\html_output.php(214): handle_image()
#7 E:\xampp\htdocs\justuptown\includes\templates\bootstrap\templates\tpl_modules_main_product_image.php(19): zen_image()
#8 E:\xampp\htdocs\justuptown\includes\templates\bootstrap\templates\tpl_product_cards_ufs_display.php(61): require('E:\\xampp\\htdocs...')
#9 E:\xampp\htdocs\justuptown\includes\modules\pages\product_cards_ufs_info\main_template_vars.php(153): require('E:\\xampp\\htdocs...')
#10 E:\xampp\htdocs\justuptown\includes\templates\bootstrap\common\tpl_main_page.php(233): require('E:\\xampp\\htdocs...')
#11 E:\xampp\htdocs\justuptown\index.php(94): require('E:\\xampp\\htdocs...')
--> PHP Warning: imagecreatefrompng(): gd-png: libpng warning: iCCP: known incorrect sRGB profile in E:\xampp\htdocs\justuptown\includes\classes\bmz_image_handler.class.php on line 953.
googled error got this
https://stackoverflow.com/questions/...t-srgb-profile may help.
I have upgraded my store to Zen Cart v.2.1.0 and am using IH 5.3.5 with pHp v8.3 on my server
Due to a very large image folder, I didn't upload that folder during testing....and now that I'm live and the site is using that folder, I have one weird problem. My additional images are all showing as Large images, not thumbnails with the ability to enlarge them and these additional images are duplicated (showing 2 of them instead of one).
I have tried uninstalling the plugin via Admin->Tools->IH->Uninstall and then reinstalling. I received the confirmation of IH install at the top of my Admin panel when logging into my admin and I then went in to Admin->Images and set the Let IH resize images to true.
When going into the IH in Admin-> Tools, everything is there and working, and there are no Debug Log errors.
Can anyone point me in the right direction on what I've done wrong??
Thanks!
In investigating and trying to debug this LRG duplicate images....when I look at Developer Tools in Firefox to see what is being called, I see this....
<!-- Modal -->
<div id="imageModal1" class="imgmodal">
<div id="modalContent1 . '" class="imgmodal-content">
<span onclick="closeModal('imageModal1')">
<img src="bmz_cache/f/fqb_hereandnow_01jpg.image.439x550.jpg" title="FQB - Here And Now Collection" alt="(image for) FQB - Here And Now Collection" width="439" height="550" class="centered-image"> <div class="imgmodal-close"><i class="fa-solid fa-circle-xmark"></i></div>
<div class="center">FQB - Here And Now Collection</div>
<!-- <div class="imgLink center">--><!--</div>-->
</span>
</div>
</div>
<div class="back">
<a id="modalLink1" href="javascript:void(0);" onclick="openModal('imageModal1')">
<img src="bmz_cache/f/fqb_hereandnow_01jpg.image.600x750.jpg" title="FQB - Here And Now Collection" alt="(image for) FQB - Here And Now Collection" width="600" height="750" href="javascript:void(0);" onclick="openModal('imageModal1')"> <br>
<!-- <div class="imgLink center">--><!--</div>-->
</a>
</div>
This is calling the fqb_hereandnow_01.jpg twice....and as I have 4 additional images, it is also calling each of these twice.
Does anyone understand why??
Just an idea, but when uninstalling, IH does not delete cache images in bmz_cache folder. Deleting everything in there except '.htaccess' will force IH to recalculate all the different size images.
It might eliminate these duplicates... or not.
Thanks for your suggestion pilou2....I will give this a try and post back with how it works out!
I have now completely uninstalled IH and everything (except the .htaccess) from the bmz_cache folder. I received the green confirmation in Admin when uninstalling IH that all uninstalled successfully and also verified by going through each folder in my site and comparing them to the IH files to insure they were all removed.
When I go to my site....I still have the exact same issue....duplicate additional images at a large size displaying only 1 image per row, when I have set to display 5. This shows it is not this plugin but something in the stock Zen Cart v.2.1 site. I will post in the General forum to try to get help with it there.
I have now installed IH (and deleted everything from the bmz_cache folder except for the .htaccess file), logged into my Admin panel, received the green Installed Successfully and set the IH Resize Images to Yes. It unfortunately has had no effect on my Additional Images.
I can go to Admin->Tools->IH and successfully use it to add additional images....so the plug in is working on that front....but something in the stock Zen Cart seems to not be relinquishing control over allow IH to resize.
Also, the stock Zen Cart seems to automatically have the LRG image open when going to a product page. When clicking on the main image, is then closes the LRG image window.
Would you be able to decipher this lat9 as to why IH is not being allowed to take over the image sizing control??
Thank you for your help.
I am about to upload quite a few new products. If I follow the image naming conventions as mentioned in the Wiki for the base images, I believe I can ignore the _LRG and _MED ones correct? I believe that IH should take care of this part. Or am I misunderstanding how this works.
We are naming the image files based on the item number. So base image is 25005.jpg and each additional is 25005_XX.jpg. I think this is all I need to do but before I upload hundreds of new items, I want to make sure it works like I think it does.
Yes g2ktcf....that is correct with your naming and what you need to upload. You just simply upload your image "25005.jpg" to the images folder and Image Handler takes care of the rest of the images.
One thing to add......
Once you have the Image Handler plugin installed, double check that you have gone into Admin->Configuration->Images and set the "IH to resize images" to true.
I would also say always use subdirectories to subdivide your images/not put them all in one folder. If you don't bother now, you'll maybe have to bother later.
I planned that from the git go.
Now I have a different issue (and I SWEAR I have seen this before). Some of my images are sideways. None them show sideways in any other view, just in ZC. I do not think this is IH but I figured I would start here.
Hi All,
Running version 1.58a on a linux server running PHP Version: 8.1.31
I get this error when I clear image cache in image handler 5
Couldn't delete /home/xxxx/outdoorking.com.au/bmz_cache/p.
This only just happend after doing the install and I am getting some error logs one of which is below
[13-Apr-2025 14:26:20 Australia/Sydney] Request URI: /trimmers-and-trimmer-parts/petrol-trimmers/mcculloch-trimmers/mcculloch-spare-parts/mcculloch-trimmer-starter-parts/mcculloch-genuine-starter-assembly-575309001?cPath=1796_2154_2163_2164, IP address: 20.171.207.230, Language id 1
#0 [internal function]: zen_debug_error_handler()
#1 /includes/classes/bmz_image_handler.class.php(513): trigger_error()
#2 /includes/classes/bmz_image_handler.class.php(130): ih_image->calculate_size()
#3 /includes/functions/extra_functions/functions_bmz_image_handler.php(133): ih_image->__construct()
#4 /includes/classes/observers/ImageHandlerObserver.php(82): handle_image()
#5 /includes/classes/traits/NotifierManager.php(87): ImageHandlerObserver->update()
#6 /includes/modules/additional_images.php(113): base->notify()
#7 /includes/templates/bootstrap/templates/tpl_modules_additional_images.php(14): require('/home/xxxx')
#8 /includes/templates/bootstrap/templates/tpl_product_info_display.php(93): require('/home/xxxx')
#9 /includes/modules/pages/product_info/main_template_vars.php(163): require('/home/xxxx')
#10 /includes/templates/bootstrap/common/tpl_main_page.php(233): require('/home/xxxx')
#11 /index.php(94): require('/home/xxxx')
--> PHP Notice: Image Handler, calculate_size for /images/Product images directory/575309001_01.jpg returned false; image is corrupt. in /includes/classes/bmz_image_handler.class.php on line 513.
[13-Apr-2025 14:26:20 Australia/Sydney] Request URI: /trimmers-and-trimmer-parts/petrol-trimmers/mcculloch-trimmers/mcculloch-spare-parts/mcculloch-trimmer-starter-parts/mcculloch-genuine-starter-assembly-575309001?cPath=1796_2154_2163_2164, IP address: 20.171.207.230, Language id 1
#0 [internal function]: zen_debug_error_handler()
#1 /includes/classes/bmz_image_handler.class.php(513): trigger_error()
#2 /includes/classes/bmz_image_handler.class.php(130): ih_image->calculate_size()
#3 /includes/functions/extra_functions/functions_bmz_image_handler.php(133): ih_image->__construct()
#4 /includes/functions/html_output.php(215): handle_image()
#5 /includes/modules/additional_images.php(119): zen_image()
#6 /includes/templates/bootstrap/templates/tpl_modules_additional_images.php(14): require('/home/xxxx')
#7 /includes/templates/bootstrap/templates/tpl_product_info_display.php(93): require('/home/xxxx')
#8 /includes/modules/pages/product_info/main_template_vars.php(163): require('/home/xxxx')
#9 /includes/templates/bootstrap/common/tpl_main_page.php(233): require('/home/xxxx')
#10 /index.php(94): require('/home/xxxx')
--> PHP Notice: Image Handler, calculate_size for /images/Product images directory/575309001_01.jpg returned false; image is corrupt. in /includes/classes/bmz_image_handler.class.php on line 513.
[13-Apr-2025 14:26:20 Australia/Sydney] Request URI: /trimmers-and-trimmer-parts/petrol-trimmers/mcculloch-trimmers/mcculloch-spare-parts/mcculloch-trimmer-starter-parts/mcculloch-genuine-starter-assembly-575309001?cPath=1796_2154_2163_2164, IP address: 20.171.207.230, Language id 1
#0 [internal function]: zen_debug_error_handler()
#1 /includes/classes/bmz_image_handler.class.php(513): trigger_error()
#2 /includes/classes/bmz_image_handler.class.php(130): ih_image->calculate_size()
#3 /includes/functions/extra_functions/functions_bmz_image_handler.php(133): ih_image->__construct()
#4 /includes/functions/html_output.php(215): handle_image()
#5 /includes/modules/additional_images.php(130): zen_image()
#6 /includes/templates/bootstrap/templates/tpl_modules_additional_images.php(14): require('/home/xxxx')
#7 /includes/templates/bootstrap/templates/tpl_product_info_display.php(93): require('/home/xxxx')
#8 /includes/modules/pages/product_info/main_template_vars.php(163): require('/home/xxxx')
#9 /includes/templates/bootstrap/common/tpl_main_page.php(233): require('/home/xxxx')
#10 /index.php(94): require('/home/xxxx')
--> PHP Notice: Image Handler, calculate_size for /images/Product images directory/575309001_01.jpg returned false; image is corrupt. in /includes/classes/bmz_image_handler.class.php on line 513.
Any assistance would be a great help.
Hi
zen 2.1.0, IH 5.3.5
Small, medium or large images they all have an option to select an image extension (etc, jpg, webp, png...) but images on product listing pages don't (which ever option is selected, the extension stays the same as original file extension). However, the IH cashes product listing images (which is good). I am trying to have it converted from .jpg to .webp. Is there any option within the code to that quickly or based images would have to be uploaded in .webp format?
I would appreciate any input on that. Thank you.
You don't say what template is in use, but for most templates the product-listing pages use the 'base' product's image for display (as you've identified).
I'm not aware of any option (although web-searches can be your friend) to convert a set of .jpg images into their .webp format.
Thank you for your answer. I am using my template which is based on responsive classic template.
My thinking was if product listing images are cashed (in the same way as small, medium and large images) then maybe changing the code or passing an argument to a function would allow for generating it as webp. I think there must be a way of doing it as the conversion from jpg to webp works. I would rather avoid changing the images off-side (time consuming). Having said that, my only option is to analyze the code. Or maybe somebody has done it before and can shed some light on it.
Did this ever got solved?
I notice people talk about Zen Cart v.2.1.0 in correlation with this plugin but it's mentioned nowhere that its actually compatible with Zen Cart v.2.1.0. Its not being mentioned in the first topicpost neither on Github. I'm sort of ready to upgrade our shop from 1.5.7 (now finally running on PHP 8.0) but quite unsure to do this directly to v.2.1.0 due to the various development states of plugins.
Hi All,
Running version 1.58a on a linux server running PHP Version: 8.1.31
Template Bootstrap Version 3.7.4
CKEditor version 5
Image Handler version 5
Australia Post Shipping Module V2.5.7a
I don't know if I am doing something wrong or not and would like to know please.
1. This is the product that I have two of under different Brands links below:
https://www.outdoorking.com.au/murra...ulley-092852MA
https://www.outdoorking.com.au/brand...ideon-092852ma
2. Note that I have one of the pulley box on the first link loaded as 092852MA.jpg
3. On the second link I have loaded image of the pulley as 092852MA_01.jpg
4. I thought that image 092852MA_01.jpg would also show up on the first link or am I wrong in assuming that?
Now to my second issue is with the water mark size.
In order to get it to show in a larger size do I have to save the image in different sizes for small, medium and large.
Some guidence on this would be appreciated as I don't want to start playing with it until I know what I should do.
Once again thank you for any assistance.,
IMHO you shouldn't do that with the undescores.
Better is 123-a.jpg and 123-b.jpg
You need to prepare the watermark files in the /images/ folder for the configured resolutions.
Then just upload the large image and IH will do the work for you.
The under scores have been working well and have thousands of them. It would ap;pear that the code that I got and uploaded to the site has caused the break in the addition images. This is what was done as shown in the post here: https://www.zen-cart.com/showthread....escription-Box
I will try your suggestion with the with the watermark.
Thanks for the assistance.
_1 is an additional image - which you want recycle to use as a main image - which will create an image with underscore file name _1 for any additional image and so on.
I don't say It can't work.
Decide yourself whether you want to work this way.
And of course there are scenarios where someone would like to have other images for medium and small - e.g. if you like to show something different - or whatever ...
Just not to get me wrong because I said just upload the large image and so on.
Undersdcores should be no problem with the addition of the fix shown in https://www.zen-cart.com/showthread....11#post1401211
This is an old anomaly where the underscore worked in every subfolder of /images but not in the /images folder itself. 2.1.0 now has a switch in the configuration that works just fine.
What is the context of your answer?
We know these differences but Bruce is in a total different mess
Item #4 of th OP's original post (629)
Hi the watermak_LGE is working will just have to resize the other images to suit small and medium I think which I will do shortly.
Last issue is with the additional images which are not showing up anymore for some reason and I thought that it had to do with the code change but after reloading the old file no change so it appears to be not the issue with that.
This is a link to a new products that I listed on the site which is not showing the aditional image:
https://www.outdoorking.com.au/murra...ulley-092852ma
https://www.outdoorking.com.au/brand...ideon-092852ma
The first image that i loaded via Product images directory/092852MA .jpg
Screenshots below:
Attachment 20955
Attachment 20956
Note that I used the 092852MA image on one listing and 092852_01 image on the other listing and I am not sure wether that caused the issue with additional images because after that no additional images are loading for some reason.
As always any help would be appreciated to solve the issue.
Once again any assistance would be a great help to sort the issue out as all the other listings have still got the additional images showing.
I am not getting an error showing in regards to the issue. The only thing that I tried to do is clear the cache and I did get this message saying it could not delete it but for some reason since I have posted the cache was cleared.
Ok I thought that the product was not in an active folder so I moved it to an active folder and got this error message:
[30-Apr-2025 23:49:22 Australia/Sydney] Request URI: /xxxx/index.php?cmd=category_product_listing&cPath=344&product_type=1&pID=31436&action =move_product&page=1&search=%20092852MA, IP address: 112.141.5.62, Language id 1
#0 /xxxx/includes/modules/move_product.php(41): zen_debug_error_handler()
#1 /xxxx/category_product_listing.php(1097): require('/home/xxxx')
#2 /xxxx/index.php(11): require('/home/xxxx')
--> PHP Warning: Undefined variable $product_current_category_string in /xxxx/includes/modules/move_product.php on line 41.
I don't know if this will help.
I also change the image on the masport listing from 092852MA_01 to the Masport Logo but still no change to additional images.
Does anyone know how to fix this issue because I did not install the module and I did not do a datbase repair it was done by the same person.
So if someone here can give a detailed procedure on how to fix it it would be appreciated.
Why are the old images still showing up then and not the new ones.
I only move the product out of the disable product to see if that was the issue with the additional images not showing up.
It would appear to be a database issue and related to image handler as I only was adding product and images at the time when I noticed the error.
The only other thing that I did was to tick to desplay Description box 2 to show on the listing but have since turned back off
Because you've removed images and not cleared the Image Handler bmz_cache? I'll note that the following image no longer exists on the site:
https://outdoorking.com.au/images/Pr...y/092852MA.jpg
This is the image: https://www.outdoorking.com.au/bmz_c...rk.400x378.jpg
This is the link: https://www.outdoorking.com.au/murra...ulley-092852ma
What do you mean I removed the image?
I did clear the cashe yesterday
That is the "handled" image, not the original one. Click on the link I supplied and you'll see that it goes to "Page not found".
My best guess is that the base Zen Cart (which is what determines what the additional image(s) are) is having a hard time finding additional images for an original/base image that doesn't exist.
I am not getting you it was a new product added (not and old image) and I took the image and that is how I picked up the error that is why I raised the issue.
So you are telling me then that images that I am loading are going to a forder not on the Server.
That would appear to be a link issue to me as the old images are working.
Link example here: https://www.outdoorking.com.au/brand...6_128_244_795&
Additional image showing.
Why is this so with old images and not with new ones.
Can you be a bit more specific please in the answer.