Forums / Bug Reports / v2.2.2 Language id not set in /includes/classes/Product.php

v2.2.2 Language id not set in /includes/classes/Product.php

Views: 802

Results 1 to 3 of 3
15 May 2026, 11:26 AM
#1
oldngrey avatar

oldngrey

Zen Follower

Join Date:
Apr 2008
Location:
Qld, Australia
Posts:
429
Plugin Contributions:
0

v2.2.2 Language id not set in /includes/classes/Product.php

Site URL: bmhstore dot bmh dot com dot au
Zen Cart 2.2.2; Apache 2.4.66; PHP 8.4.16; MySQL 11.8.5-MariaDB-log; Linux 6.8.0-110 Ubuntu
Plugins: AbuseIPDB V4.0.9; Access Blocker V2.0.2; Australia Post V2.5.9b ; Direct Bank Deposit AU V2.1.2a; Display Logs V3.0.3;
Edit Orders V5.0.2; Email Archive Manager V4.0.0; Export Shipping + Order Information II V1.5.6; Google Analytics GA4 V2.0.2;
Image checker V2.3.0; Monthly Sales and Tax Summary V3.0.0; Multiple Product Copy V2.0.0; Payment Module Fee V2.0.4;
Printable Price list V4.0.1; Sales Report II V4.0.3; System Inspection V1.6.0;

Similar to bug https://www.zen-cart.com/showthread.php/230777-Merge-pull-request-7134-from-lat9-prod-desc-missing-Geting-the-following-debug-files from 2025

I am receiving hundreds of these warnings in the log files:

[15-May-2026 20:37:58 Australia/Brisbane] Request URI: /washers-fibre-copper-loose-c-36_144/washer-copper-58x1516-x-5128-p-3102?page=1, IP address: 169.224.1.250, Language id not set
#0 /home/ZZZZ/_sites/xxx220.bmh.com.au/public/includes/classes/Product.php(328): zen_debug_error_handler()
#1 /home/ZZZZ/_sites/xxx220.bmh.com.au/public/includes/classes/Product.php(37): Product->loadProductDetails()
#2 /home/ZZZZ/_sites/xxx220.bmh.com.au/public/includes/functions/functions_products.php(625): Product->__construct()
#3 /home/ZZZZ/_sites/xxx220.bmh.com.au/public/includes/init_includes/init_usu.php(24): zen_get_info_page()
#4 /home/ZZZZ/_sites/xxx220.bmh.com.au/public/includes/autoload_func.php(40): require_once('...')
#5 /home/ZZZZ/_sites/xxx220.bmh.com.au/public/includes/application_top.php(395): require('...')
#6 /home/ZZZZ/_sites/xxx220.bmh.com.au/public/index.php(27): require('...')
--> PHP Warning: Undefined array key "languages_code" in /home/ZZZZ/_sites/xxx220.bmh.com.au/public/includes/classes/Product.php on line 328.


[15-May-2026 20:37:58 Australia/Brisbane] Request URI: /washers-fibre-copper-loose-c-36_144/washer-copper-58x1516-x-5128-p-3102?page=1, IP address: 169.224.1.250, Language id not set
#0 /home/ZZZZ/_sites/xxx220.bmh.com.au/public/includes/classes/Product.php(329): zen_debug_error_handler()
#1 /home/ZZZZ/_sites/xxx220.bmh.com.au/public/includes/classes/Product.php(37): Product->loadProductDetails()
#2 /home/ZZZZ/_sites/xxx220.bmh.com.au/public/includes/functions/functions_products.php(625): Product->__construct()
#3 /home/ZZZZ/_sites/xxx220.bmh.com.au/public/includes/init_includes/init_usu.php(24): zen_get_info_page()
#4 /home/ZZZZ/_sites/xxx220.bmh.com.au/public/includes/autoload_func.php(40): require_once('...')
#5 /home/ZZZZ/_sites/xxx220.bmh.com.au/public/includes/application_top.php(395): require('...')
#6 /home/ZZZZ/_sites/xxx220.bmh.com.au/public/index.php(27): require('...')
--> PHP Warning: Undefined array key "languages_code" in /home/ZZZZ/_sites/xxx220.bmh.com.au/public/includes/classes/Product.php on line 329.


[15-May-2026 20:37:58 Australia/Brisbane] Request URI: /washers-fibre-copper-loose-c-36_144/washer-copper-58x1516-x-5128-p-3102?page=1, IP address: 169.224.1.250, Language id not set
#0 /home/ZZZZ/_sites/xxx220.bmh.com.au/public/includes/classes/Product.php(330): zen_debug_error_handler()
#1 /home/ZZZZ/_sites/xxx220.bmh.com.au/public/includes/classes/Product.php(37): Product->loadProductDetails()
#2 /home/ZZZZ/_sites/xxx220.bmh.com.au/public/includes/functions/functions_products.php(625): Product->__construct()
#3 /home/ZZZZ/_sites/xxx220.bmh.com.au/public/includes/init_includes/init_usu.php(24): zen_get_info_page()
#4 /home/ZZZZ/_sites/xxx220.bmh.com.au/public/includes/autoload_func.php(40): require_once('...')
#5 /home/ZZZZ/_sites/xxx220.bmh.com.au/public/includes/application_top.php(395): require('...')
#6 /home/ZZZZ/_sites/xxx220.bmh.com.au/public/index.php(27): require('...')
--> PHP Warning: Undefined array key "languages_id" in /home/ZZZZ/_sites/xxx220.bmh.com.au/public/includes/classes/Product.php on line 330.

OldNGrey
ZC222 PHP 8.4.16
MySQL 11.8.5-MariaDB

15 May 2026, 12:15 PM
#2
lat9 avatar

lat9

Administrator

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

Re: v2.2.2 Language id not set in /includes/classes/Product.php

That's coming from USU. You can correct the issue by modifying USU's /includes/auto_loaders/config.usu.php, line 14 from

$autoLoadConfig[71][] = [

to

$autoLoadConfig[[B]75[/B]][] = [

That way, it's loaded after zc222+ init_languages.php.

GitHub issue for tracking: https://github.com/lat9/usu/issues/68

15 May 2026, 12:35 PM
#3
oldngrey avatar

oldngrey

Zen Follower

Join Date:
Apr 2008
Location:
Qld, Australia
Posts:
429
Plugin Contributions:
0

Re: v2.2.2 Language id not set in /includes/classes/Product.php

lat9 you are wonderful. Thank you.

OldNGrey
ZC222 PHP 8.4.16
MySQL 11.8.5-MariaDB