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 221 to 240 of 774
20 Jun 2019, 8:48 AM
#221
altruso avatar

altruso

New Zenner

Join Date:
Jul 2018
Location:
Lepia
Posts:
13
Plugin Contributions:
0

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

lat9:

It's set in the plugin's installation script, /YOUR_ADMIN/includes/init_includes/init_image_handler.php, around line 237:

// -----
// On an initial install or an upgrade from an IH-version that (er) didn't record an 'IH_VERSION',
// create a configuration element that displays the plugin's current version and set that definition
// for follow-on upgrade processing.
// 
if (!defined('IH_VERSION')) {
    $db->Execute( [URL="https://xn--mediatorpozna-1ic.pl/2018/08/05/ugoda-mediacyjna-czym-jest-i-co-reguluje/"]https://xn--mediatorpozna-1ic.pl/2018/08/05/ugoda-mediacyjna-czym-jest-i-co-reguluje/[/URL]
        "INSERT INTO " . TABLE_CONFIGURATION . "
            (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, use_function, set_function)
         VALUES
            ('IH version', 'IH_VERSION', '" . IH_CURRENT_VERSION . "', 'Displays the currently-installed version of <em>Image Handler</em>.', $cgi, 1000, now(), NULL, 'trim(')"
    ); 
    define('IH_VERSION', (defined('IH_RESIZE')) ? '?.?.?' : '0.0.0');
}
> Are you sure you've copied all the required files?

that's not all
27 Jun 2019, 8:58 AM
#222
simon1066 avatar

simon1066

Totally Zenned

Join Date:
Feb 2009
Location:
UK
Posts:
1,326
Plugin Contributions:
0

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

shrimp-gumbo-mmmhhh:

ERROR #2
[22-Apr-2019 20:52:37 America/Chicago] Request URI: /ADMIN/keepalive.php, IP address: XX.XX.XX.XX
#1 require(/home/shrimps/public_html/includes/functions/extra_functions/functions_bmz_image_handler.php) called at [/home/shrimps/public_html/ADMIN/includes/functions/extra_functions/functions_bmz_image_handler.php:18]
#2 require(/home/shrimps/public_html/ADMIN/includes/functions/extra_functions/functions_bmz_image_handler.php) called at [/home/shrimps/public_html/ADMIN/includes/init_includes/init_general_funcs.php:45]
#3 require(/home/shrimps/public_html/ADMIN/includes/init_includes/init_general_funcs.php) called at [/home/shrimps/public_html/includes/autoload_func.php:48]
#4 require(/home/shrimps/public_html/includes/autoload_func.php) called at [/home/shrimps/public_html/ADMIN/includes/application_top.php:171]
#5 require(/home/shrimps/public_html/ADMIN/includes/application_top.php) called at [/home/shrimps/public_html/ADMIN/keepalive.php:9]
--> PHP Warning: Use of undefined constant IH_VERSION - assumed 'IH_VERSION' (this will throw an Error in a future version of PHP) in /home/shrimps/public_html/includes/functions/extra_functions/functions_bmz_image_handler.php on line 16.

[22-Apr-2019 20:52:37 America/Chicago] Request URI: /ADMIN/keepalive.php, IP address: XX.XX.XX.XX
#1 require(/home/shrimps/public_html/ADMIN/includes/languages/english/extra_definitions/image_handler_extra_definitions.php) called at [/home/shrimps/public_html/ADMIN/includes/init_includes/init_languages.php:44]
#2 require(/home/shrimps/public_html/ADMIN/includes/init_includes/init_languages.php) called at [/home/shrimps/public_html/includes/autoload_func.php:48]
#3 require(/home/shrimps/public_html/includes/autoload_func.php) called at [/home/shrimps/public_html/ADMIN/includes/application_top.php:171]
#4 require(/home/shrimps/public_html/ADMIN/includes/application_top.php) called at [/home/shrimps/public_html/ADMIN/keepalive.php:9]
--> PHP Warning: Use of undefined constant IH_VERSION - assumed 'IH_VERSION' (this will throw an Error in a future version of PHP) in /home/shrimps/public_html/ADMIN/includes/languages/english/extra_definitions/image_handler_extra_definitions.php on line 25.

PHP 7.2.10
ZC v1.56b
IH5 v5.1.3 (from ZC plugins)

Just an FYI, on an initial IH5 installation, I get the above warnings only on the first admin page refresh after installing this mod. No further errors, although I haven't delved into the settings yet. Exact log file is:

[27-Jun-2019 09:30:23 Europe/London] Request URI: /ADMIN/index.php, IP address: 127.0.0.1
#1  require(D:\wamp64\www\MY_DOMAIN.co.uk\includes\functions\extra_functions\functions_bmz_image_handler.php) called at [D:\wamp64\www\MY_DOMAIN.co.uk\ADMIN\includes\functions\extra_functions\functions_bmz_image_handler.php:18]
#2  require(D:\wamp64\www\MY_DOMAIN.co.uk\ADMIN\includes\functions\extra_functions\functions_bmz_image_handler.php) called at [D:\wamp64\www\MY_DOMAIN.co.uk\ADMIN\includes\init_includes\init_general_funcs.php:45]
#3  require(D:\wamp64\www\MY_DOMAIN.co.uk\ADMIN\includes\init_includes\init_general_funcs.php) called at [D:\wamp64\www\MY_DOMAIN.co.uk\includes\autoload_func.php:48]
#4  require(D:\wamp64\www\MY_DOMAIN.co.uk\includes\autoload_func.php) called at [D:\wamp64\www\MY_DOMAIN.co.uk\ADMIN\includes\application_top.php:171]
#5  require(D:\wamp64\www\MY_DOMAIN.co.uk\ADMIN\includes\application_top.php) called at [D:\wamp64\www\MY_DOMAIN.co.uk\ADMIN\index.php:10]
--> PHP Warning: Use of undefined constant IH_VERSION - assumed 'IH_VERSION' (this will throw an Error in a future version of PHP) in D:\wamp64\www\MY_DOMAIN.co.uk\includes\functions\extra_functions\functions_bmz_image_handler.php on line 16.

[27-Jun-2019 09:30:23 Europe/London] Request URI: /ADMIN/index.php, IP address: 127.0.0.1
#1  require(D:\wamp64\www\MY_DOMAIN.co.uk\ADMIN\includes\languages\english\extra_definitions\image_handler_extra_definitions.php) called at [D:\wamp64\www\MY_DOMAIN.co.uk\ADMIN\includes\init_includes\init_languages.php:48]
#2  require(D:\wamp64\www\MY_DOMAIN.co.uk\ADMIN\includes\init_includes\init_languages.php) called at [D:\wamp64\www\MY_DOMAIN.co.uk\includes\autoload_func.php:48]
#3  require(D:\wamp64\www\MY_DOMAIN.co.uk\includes\autoload_func.php) called at [D:\wamp64\www\MY_DOMAIN.co.uk\ADMIN\includes\application_top.php:171]
#4  require(D:\wamp64\www\MY_DOMAIN.co.uk\ADMIN\includes\application_top.php) called at [D:\wamp64\www\MY_DOMAIN.co.uk\ADMIN\index.php:10]
--> PHP Warning: Use of undefined constant IH_VERSION - assumed 'IH_VERSION' (this will throw an Error in a future version of PHP) in D:\wamp64\www\MY_DOMAIN.co.uk\ADMIN\includes\languages\english\extra_definitions\image_handler_extra_definitions.php on line 25.

Simon

27 Jun 2019, 10:33 AM
#223
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

shrimp-gumbo-mmmhhh:

Please forgive me but I am asking about how you fixed this issue:

UNDEFINED CONSTANT ERROR **Image Handler 5 (for v1.5.6a)

ERROR#1
[22-Apr-2019 20:52:29 America/Chicago] Request URI: /XXX-p-3.html, IP address: 5.9.XX.XX
#1 include(/home/shrimps/public_html/includes/functions/extra_functions/functions_bmz_image_handler.php) called at [/home/shrimps/public_html/includes/modules/extra_functions.php:44]
#2 include(/home/shrimps/public_html/includes/modules/extra_functions.php) called at [/home/shrimps/public_html/includes/init_includes/init_general_funcs.php:42]
#3 require(/home/shrimps/public_html/includes/init_includes/init_general_funcs.php) called at [/home/shrimps/public_html/includes/autoload_func.php:48]
#4 require(/home/shrimps/public_html/includes/autoload_func.php) called at [/home/shrimps/public_html/includes/application_top.php:170]
#5 require(/home/shrimps/public_html/includes/application_top.php) called at [/home/shrimps/public_html/index.php:26]
--> PHP Warning: Use of undefined constant IH_VERSION - assumed 'IH_VERSION' (this will throw an Error in a future version of PHP) in /home/shrimps/public_html/includes/functions/extra_functions/functions_bmz_image_handler.php on line 16.**

I do not see any additional IH_VERSION or changes to the IH_VERSION in this file. Thank you!

simon1066:

PHP 7.2.10
ZC v1.56b
IH5 v5.1.3 (from ZC plugins)

Just an FYI, on an initial IH5 installation, I get the above warnings only on the first admin page refresh after installing this mod. No further errors, although I haven't delved into the settings yet. Exact log file is:

[27-Jun-2019 09:30:23 Europe/London] Request URI: /ADMIN/index.php, IP address: 127.0.0.1
#1 require(D:\wamp64\www\MY_DOMAIN.co.uk\includes\functions\extra_functions\functions_bmz_image_handler.php) called at [D:\wamp64\www\MY_DOMAIN.co.uk\ADMIN\includes\functions\extra_functions\functions_bmz_image_handler.php:18]
#2 require(D:\wamp64\www\MY_DOMAIN.co.uk\ADMIN\includes\functions\extra_functions\functions_bmz_image_handler.php) called at [D:\wamp64\www\MY_DOMAIN.co.uk\ADMIN\includes\init_includes\init_general_funcs.php:45]
#3 require(D:\wamp64\www\MY_DOMAIN.co.uk\ADMIN\includes\init_includes\init_general_funcs.php) called at [D:\wamp64\www\MY_DOMAIN.co.uk\includes\autoload_func.php:48]
#4 require(D:\wamp64\www\MY_DOMAIN.co.uk\includes\autoload_func.php) called at [D:\wamp64\www\MY_DOMAIN.co.uk\ADMIN\includes\application_top.php:171]
#5 require(D:\wamp64\www\MY_DOMAIN.co.uk\ADMIN\includes\application_top.php) called at [D:\wamp64\www\MY_DOMAIN.co.uk\ADMIN\index.php:10]
--> PHP Warning: Use of undefined constant IH_VERSION - assumed 'IH_VERSION' (this will throw an Error in a future version of PHP) in D:\wamp64\www\MY_DOMAIN.co.uk\includes\functions\extra_functions\functions_bmz_image_handler.php on line 16.

[27-Jun-2019 09:30:23 Europe/London] Request URI: /ADMIN/index.php, IP address: 127.0.0.1
#1 require(D:\wamp64\www\MY_DOMAIN.co.uk\ADMIN\includes\languages\english\extra_definitions\image_handler_extra_definitions.php) called at [D:\wamp64\www\MY_DOMAIN.co.uk\ADMIN\includes\init_includes\init_languages.php:48]
#2 require(D:\wamp64\www\MY_DOMAIN.co.uk\ADMIN\includes\init_includes\init_languages.php) called at [D:\wamp64\www\MY_DOMAIN.co.uk\includes\autoload_func.php:48]
#3 require(D:\wamp64\www\MY_DOMAIN.co.uk\includes\autoload_func.php) called at [D:\wamp64\www\MY_DOMAIN.co.uk\ADMIN\includes\application_top.php:171]
#4 require(D:\wamp64\www\MY_DOMAIN.co.uk\ADMIN\includes\application_top.php) called at [D:\wamp64\www\MY_DOMAIN.co.uk\ADMIN\index.php:10]
--> PHP Warning: Use of undefined constant IH_VERSION - assumed 'IH_VERSION' (this will throw an Error in a future version of PHP) in D:\wamp64\www\MY_DOMAIN.co.uk\ADMIN\includes\languages\english\extra_definitions\image_handler_extra_definitions.php on line 25.

Thanks to both of you; I need to get my eyes re-examined, since that first posting absolutely identified the error and the second simply pounded that identification!

It'll happen, as @simon1066 indicated, only on the very initial page-load since IH_VERSION isn't yet set.  I've created a GitHub issue to track the resolution of the issue (<https://github.com/DivaVocals/zen_Image-Handler/issues/161>).
27 Jun 2019, 12:56 PM
#224
simon1066 avatar

simon1066

Totally Zenned

Join Date:
Feb 2009
Location:
UK
Posts:
1,326
Plugin Contributions:
0

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

PHP 7.2.10
ZC v1.56b
IH5 v5.1.3 (from ZC plugins)

Possible bug.

On the product page within Admin/Tools/Image Handler5 (/admin/image_handler.php?ih_page=manager) there are three buttons:

Display
Edit Product
Edit Attributes

It seems to me that the 'Edit Product' link is incorrect, rather than

e.g. admin/categories.php?action=new_product&cPath=16&pID=214&product_type=1

it should be

admin/product.php?action=new_product&cPath=16&pID=214&product_type=1

This would be achieved by changing line #331 in admin/image_handler.php to

$edit_product_link = zen_href_link(FILENAME_PRODUCT, "action=new_product&cPath=$current_category_id&pID=$products_filter&product_type=" . zen_get_products_type($products_filter));

Simon

28 Jun 2019, 10:20 AM
#226
simon1066 avatar

simon1066

Totally Zenned

Join Date:
Feb 2009
Location:
UK
Posts:
1,326
Plugin Contributions:
0

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

PHP 7.2.10
ZC v1.56b
IH5 v5.1.3 (from ZC plugins)

I've uninstalled and reinstalled IH5 but still have the same issue, this is without making any changes to IH's Admin > Config > Images settings other than turning on 'IH resize images', hopefully these three scenarios will help determine what's going on:

  1. For an existing product without images I add, in Admin > Tools > IH5, a new base image (res. 934x650) with 'image base name' blank, however the small, medium and large images then generated are all of the same resolution i.e. 750x521 (which corresponds to the 'IH Large Images' settings) - even though I had previously set the small & medium image widths to 225 and 486. The store side product listing just shows a scaled down version of the large image and image hover zoom doesn't work.

next,

  1. For an existing product without images I add, in Admin > Tools > IH5, a new base image (res. 934x650) with** image base name 'cats_IH'** (the readme indicates it doesn't require a suffix), for this I receive no generated images and an on-page error of
Error!
Unable to determine the page link!
Function used:
zen_href_link('', '', 'SSL')

together with an error log file of

[28-Jun-2019 10:47:46 Europe/London] Request URI: /ADMIN/image_handler.php?products_filter=214&imgName=cats_IH&imgSuffix=&imgExtension=&action=layout_info, IP address: 127.0.0.1
#1  trigger_error() called at [D:\wamp64\www\MYDOMAIN.co.uk\ADMIN\includes\functions\html_output.php:16]
#2  zen_href_link() called at [D:\wamp64\www\MYDOMAIN.co.uk\ADMIN\image_handler.php:596]
--> PHP Fatal error: zen_href_link(, , SSL), unable to determine the page link. in D:\wamp64\www\MYDOMAIN.co.uk\ADMIN\includes\functions\html_output.php on line 16.

finally, and this seems to work but with errors,

  1. For an existing product without images I add, in Admin > Tools > IH5, a new base image (res. 934x650) with image base name 'cats_IH.jpg' (with suffix this time), for this I receive correctly-sized small,medium and large images. The store side product listing correctly shows the small image and image hover zoom does work - yeah!. However, I still get the on-page error and error log file as above.

I did generate ih_debug files on the admin side.

Simon

28 Jun 2019, 10:57 AM
#227
simon1066 avatar

simon1066

Totally Zenned

Join Date:
Feb 2009
Location:
UK
Posts:
1,326
Plugin Contributions:
0

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

Ok, after all that faffing about it seems that it was just the name of my base image that caused a problem.

I had tried to use the image from my 'large' image folder, designating a different folder during upload, named

0719_my_image_name_LRG.jpg

renaming it to

myimagename.jpg

and a blank 'image base name', worked.

Simon

28 Jun 2019, 4:06 PM
#228
simon1066 avatar

simon1066

Totally Zenned

Join Date:
Feb 2009
Location:
UK
Posts:
1,326
Plugin Contributions:
0

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

Next problem,

I'm having trouble understanding/getting to work the 'canvas' size of IH generated images, so trying to follow these instructions

If you append an exclamation-point (!) to one value (e.g. 80!), the generated re-sized images are centered on a canvas that matches exactly the given size for the corresponding image. If you specified 100x80!, a 200x200 image will be resized to 80x80 and placed centered on a 100x80 canvas filled with the specified background color. Think of it as kind of forcing image dimensions without messing up the aspect ratio.

I have,

small image width = 200
small image height = 80!
Image - Product Listing Width = 200
Image - Product Listing Height = 80!
Image - Use Proportional Images on Products and Categories = 1
IH small images background = 255:0:0

The small image generated is 114 x 80, using the exclamation mark technique I was expecting to see the small image on the product listing page centered horizontally inside a red box 200px wide (by 80 high). Is that how it works? Are there any other settings I need to alter to make this happen?

Simon

28 Jun 2019, 4:32 PM
#229
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

simon1066:

Next problem,

I'm having trouble understanding/getting to work the 'canvas' size of IH generated images, so trying to follow these instructions

I have,

small image width = 200
small image height = 80!
Image - Product Listing Width = 200
Image - Product Listing Height = 80!
Image - Use Proportional Images on Products and Categories = 1
IH small images background = 255:0:0

The small image generated is 114 x 80, using the exclamation mark technique I was expecting to see the small image on the product listing page centered horizontally inside a red box 200px wide (by 80 high). Is that how it works? Are there any other settings I need to alter to make this happen?
Hmm, I've not played with that IH feature and I'll need a bit of time to review and see what's up.

28 Jun 2019, 4:38 PM
#230
simon1066 avatar

simon1066

Totally Zenned

Join Date:
Feb 2009
Location:
UK
Posts:
1,326
Plugin Contributions:
0

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

Thank you. Although I can probably use one of the other methods to set the dims of my images, I couldn't let this go without figuring out what was wrong.

Simon

28 Jun 2019, 5:14 PM
#231
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

Extra eyes are always a good thing! Thanks @simon1066!

28 Jun 2019, 5:45 PM
#232
simon1066 avatar

simon1066

Totally Zenned

Join Date:
Feb 2009
Location:
UK
Posts:
1,326
Plugin Contributions:
0

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

In case it helps. Playing around with bmz_image_handler.class.php

changing line #449

from

$this->force_canvas = (strpos($pref_width . $pref_height, '!') !== false); 

to

$this->force_canvas = (strpos($pref_width . $pref_height, '!') == false); 

produces desired result, canvas is displayed.

I mention this without knowing the implications such a code change.

Simon

28 Jun 2019, 5:47 PM
#233
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

Thanks, @simon1066; that gives me something to "chew on".

P.S. You'll probably want to change that to === false (exactly equal)

3 Jul 2019, 4:47 PM
#235
simon1066 avatar

simon1066

Totally Zenned

Join Date:
Feb 2009
Location:
UK
Posts:
1,326
Plugin Contributions:
0

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

lat9:

@simon1066, I've created an issue on the IH GitHub (https://github.com/DivaVocals/zen_Image-Handler/issues/169) and posted a correction. Please note that the change was different than that which you'd posted!

Thank you, I'll take a look. Glad that it's different as I found there were issues with my suggestion.

Simon

3 Jul 2019, 5:26 PM
#236
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

simon1066:

Thank you, I'll take a look. Glad that it's different as I found there were issues with my suggestion.
There are a couple more changes also staged for v1.5.4 of IH-5 that address other issues you've noted above, too!

3 Jul 2019, 5:42 PM
#237
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:

There are a couple more changes also staged for v1.5.4 of IH-5 that address other issues you've noted above, too!
I'm being dyslexic, that should be v5.1.4!

9 Jul 2019, 11:53 AM
#238
hasher avatar

hasher

New Zenner

Join Date:
Sep 2011
Posts:
77
Plugin Contributions:
0

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

Hi Lat9 ,

Setting up my site now . I am wondering what is the best size and format to give IH? For example JPG , BMP , TIF

Trying to optimize my website for IH!

Thanks in advance !

9 Jul 2019, 12:00 PM
#239
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

I'd suggest going with .jpg. That image type resizes the best of all of them (and .tif isn't supported by IH).

10 Jul 2019, 9:48 AM
#240
simon1066 avatar

simon1066

Totally Zenned

Join Date:
Feb 2009
Location:
UK
Posts:
1,326
Plugin Contributions:
0

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

ZC v1.5.6b
IH5 v5.1.4beta (issue probably exists in v5.1.3)

Not sure if this is a bug (or indeed that I can explain it clearly),

A category has two identical products (apart from the name) of Product Type 2 (product_music handler) 'Add to Cart = N'

In Admin > Tools > IH5 the zen_draw_products_pull_down for that category only shows one product, but I can scroll between the two using the Prev/Next buttons.

Looking at the code in image_handler.php it seems that if I comment out the lines that hides things that cannot go in the cart (lines 313 - 319), like this

 //  $not_for_cart = $db->Execute(
       //     "SELECT p.products_id 
        //       FROM " . TABLE_PRODUCTS . " p 
        //            LEFT JOIN " . TABLE_PRODUCT_TYPES . " pt 
        //                ON p.products_type= pt.type_id 
        //      WHERE pt.allow_add_to_cart = 'N'"
       // );

I can get both products to show - this sort of makes sense but I can't see why one product would show.

I would say that perhaps IH5 release code should have it commented but I think there's something else going on here because another category with products of Product Type 3 (document_general handler) 'Add to Cart = N' shows all products regardless of whether the above code is commented out or not.

I am using the github v5.1.4beta code although I haven't tested by fully reverting to v5.1.3 - the zen_draw_products_pull_down code in image_handler.php hadn't changed.

Simon