New Zenner
- Join Date:
- Jan 2006
- Posts:
- 44
- Plugin Contributions:
- 0
Constants not defined in adminincludesfunctionsgeneral.php
While copying products with attributes in admin, the message that shows on top of the screen after successful operation does not display the constant defined on line 146 in attributes_controller.php: ```
define('TEXT_ATTRIBUTE_COPY_INSERTING','<strong>Inserting New Attribute from </strong>');
The log file says:
/admin/category_product_listing.php?action=copy_product_confirm&cPath=54_125_126_128&page=1, IP address: ********
#1 zen_copy_products_attributes() called at [/admin/includes/modules/copy_product_confirm.php:141]
#2 require(/admin/includes/modules/copy_product_confirm.php) called at [/admin/category_product_listing.php:278]
--> PHP Warning: Use of undefined constant TEXT_ATTRIBUTE_COPY_INSERTING - assumed 'TEXT_ATTRIBUTE_COPY_INSERTING' (this will throw an Error in a future version of PHP) in /admin/includes/functions/general.php on line 2201.
What I did, that seemed to rectify the problem, at least no more log entries, was to move the define statement mentioned above in the language file: admin\includes\languages\english.php. However there are other constants which again are declared in the attributes_controller.php file and once the application flow reaches them there might be another error.
What I noticed was that there are messages that are hard coded in /admin/includes/functions/general.php, e.g. line 2116:```
$messageStack->add_session('<b>WARNING: Cannot copy from Product ID #' . $products_id_from . ' to Product ID # ' . $products_id_to . ' ... No copy was made' . '</b>', 'caution');
This seems to contradict the multi-language nature of zencart.
Any feedback will be appreciated.
Zencart version:1.5.6a
PHP Version: 7.3.1
Database Engine: MySQL 5.6.42-84.2