Re: No watermarks displaying IH5
Quote:
Originally Posted by
lat9
Regarding the no-watermarks, I'm guessing that the site's setting for Configuration :: Images :: Cache File-naming Convention is set to Readable.
It appears that when that format was introduced that it unfortunately 'forgot' to include the watermarking. Sigh.
The current GitHub repository contents (https://github.com/DivaVocals/zen_Image-Handler) now contains the correction for those missing watermarks and also provides support for webp image types (thanks @brittainmark).
That updated release (v5.3.2) is forthcoming.
Re: No watermarks displaying IH5
v3.5.2 of Image Handler 5 is now available for download: https://www.zen-cart.com/downloads.php?do=file&id=2169
This release contains changes associated with the following GitHub issues:
#262: Add support for webp images.
#15: Don't count on an image's extension identifying the image's type; check the image's type programmatically (brittainmark).
#273: Restore watermarks for all "Cache-file Naming Conventions" (was only working for Hashed.
Re: Custom Background Colour
Quote:
Originally Posted by
lat9
You could use a site-specific init_includes module (you'll need to add an auto_loader, too) that loads somewhere around CP 200 that makes the change to $ihConf (it's a global variable) as you'd identified a couple of posts back.
Sorry I missed your reply @lat9 and thank you for teaching me something new. I was able to set a custom background colour for small images on product_info pages using your suggestion.
Re: Custom Background Colour
includes/classes/observers/ColorBoxObserver.php line 42 says
require DIR_WS_MODULES . zen_get_module_directory('zen_colorbox.php');
but that file doesn't exist either in IH or Zen Cart.
Should this logic test for the existence of the file first, or am I missing some needed code?
Re: Custom Background Colour
Quote:
Originally Posted by
swguy
includes/classes/observers/ColorBoxObserver.php line 42 says
require DIR_WS_MODULES . zen_get_module_directory('zen_colorbox.php');
but that file doesn't exist either in IH or Zen Cart.
Should this logic test for the existence of the file first, or am I missing some needed code?
It does check:
Code:
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',
)
);
}
... but IH5 provides only that observer to aid in use when the overall ColorBox (or Fual Slimbox) plugin is installed. I'm guessing that you did an upgrade on a site that previously used ColorBox so its database configuration settings are still present. Been there, done that.
Re: Custom Background Colour
LOL thank you.
Others who may have this issue - you may not easily be able to find the ZEN_COLORBOX_STATUS admin page but you can turn the value off in SQL:
update configuration set configuration_value = 'false' where configuration_key = 'ZEN_COLORBOX_STATUS';
Re: Custom Background Colour
COLORBOX did supply an uninstall script
Code:
DELETE FROM `configuration` WHERE `configuration_key` LIKE 'ZEN_COLORBOX_%';
DELETE FROM `configuration_group` WHERE `configuration_group_title` = 'Zen Colorbox';
DELETE FROM `admin_pages` WHERE `language_key` = 'BOX_CONFIGURATION_ZEN_COLORBOX';
Image Handler installation SQL error
ZC158a; PHP 8.2.4; MySQL 10.4.17-MariaDB-log
I installed Image Handler 5.3.2 on my dev system and received a fatal error
Code:
PHP Fatal error: 1064:You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 's canvas. Default is <strong>Center</Strong>.', 4, 1171, now(), NULL, 'zen_cf...' at line 4 :: INSERT IGNORE INTO zen_configuration
(configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, use_function, set_function)
VALUES
('IH watermark gravity', 'WATERMARK_GRAVITY', 'Center', 'Select the position for the watermark relative to the image's canvas. Default is <strong>Center</Strong>.', 4, 1171, now(), NULL, 'zen_cfg_select_option([\'Center\',\'NorthWest\',\'North\',\'NorthEast\',\'East\',\'SouthEast\',\'South\',\'SouthWest\',\'West\'],') ==> (as called by) E:\Web\zc158A_DEV_PHP8.2\admin\includes\init_includes\init_image_handler.php on line 190
the error comes from the escaped apostrophe
HTML Code:
the image\'s canvas
on line 167.
Because the installer crashed I did not have the option under Admin > Tools to uninstall image handler so I deleted the database entries based on the code in admin / image_handler_uninstall.php then recopied the files with the ofending apostrophe removed.
I have searched the net and cannot find any answer to the problem.
Is there a switch in MariaDB that disallows escaping characters such as this?
Re: Image Handler installation SQL error
Quote:
Originally Posted by
OldNGrey
ZC158a; PHP 8.2.4; MySQL 10.4.17-MariaDB-log
I installed Image Handler 5.3.2 on my dev system and received a fatal error
Code:
PHP Fatal error: 1064:You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 's canvas. Default is <strong>Center</Strong>.', 4, 1171, now(), NULL, 'zen_cf...' at line 4 :: INSERT IGNORE INTO zen_configuration
(configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, use_function, set_function)
VALUES
('IH watermark gravity', 'WATERMARK_GRAVITY', 'Center', 'Select the position for the watermark relative to the image's canvas. Default is <strong>Center</Strong>.', 4, 1171, now(), NULL, 'zen_cfg_select_option([\'Center\',\'NorthWest\',\'North\',\'NorthEast\',\'East\',\'SouthEast\',\'South\',\'SouthWest\',\'West\'],') ==> (as called by) E:\Web\zc158A_DEV_PHP8.2\admin\includes\init_includes\init_image_handler.php on line 190
the error comes from the escaped apostrophe
HTML Code:
the image\'s canvas
on line 167.
Because the installer crashed I did not have the option under Admin > Tools to uninstall image handler so I deleted the database entries based on the code in admin / image_handler_uninstall.php then recopied the files with the ofending apostrophe removed.
I have searched the net and cannot find any answer to the problem.
Is there a switch in MariaDB that disallows escaping characters such as this?
Nope, it a bug that @marco-pm graciously corrected back in March (https://github.com/lat9/zen_Image-Ha...888a6855bfd9b7). Let me get that 5.3.3 update going.
Re: Image Handler installation SQL error
Quote:
Originally Posted by
lat9
IH-5 v5.3.3 is now available for download: https://www.zen-cart.com/downloads.php?do=file&id=2169
Thanks to @marco-pm for the initial bug-reports and corrections!
This release contains changes associated with the following GitHub issues:
#12: MySQL Error on Installation (not upgrade), due to mis-escaped single-quote.
#13: 'imagecopy' float implicit conversion warning