PHP Fatal error: 1109:Unknown table 'p' in field list ...
[[15-Nov-2020 00:38:02 UTC] Request URI: /index.php?main_page=shopping_cart, IP address: 24.113.181.201
#1 trigger_error() called at [/home/herasonl/public_html/shop/includes/classes/db/mysql/query_factory.php:171]
#2 queryFactory->show_error() called at [/home/herasonl/public_html/shop/includes/classes/db/mysql/query_factory.php:143]
#3 queryFactory->set_error() called at [/home/herasonl/public_html/shop/includes/classes/db/mysql/query_factory.php:270]
#4 queryFactory->Execute() called at [/home/herasonl/public_html/shop/includes/classes/split_page_results.php:78]
#5 splitPageResults->__construct() called at [/home/herasonl/public_html/shop/includes/modules/kandi/new_products.php:16]
#6 include(/home/herasonl/public_html/shop/includes/modules/kandi/new_products.php) called at [/home/herasonl/public_html/shop/includes/templates/kandi/templates/tpl_modules_whats_new.php:12]
#7 require(/home/herasonl/public_html/shop/includes/templates/kandi/templates/tpl_modules_whats_new.php) called at [/home/herasonl/public_html/shop/includes/templates/kandi/templates/tpl_shopping_cart_default.php:202]
#8 require(/home/herasonl/public_html/shop/includes/templates/kandi/templates/tpl_shopping_cart_default.php) called at [/home/herasonl/public_html/shop/includes/templates/kandi/common/tpl_main_page.php:198]
#9 require(/home/herasonl/public_html/shop/includes/templates/kandi/common/tpl_main_page.php) called at [/home/herasonl/public_html/shop/index.php:97]
[15-Nov-2020 00:38:02 UTC] PHP Fatal error: 1109:Unknown table 'p' in field list :: select count(p.products_id) as total ==> (as called by) /home/herasonl/public_html/shop/includes/classes/split_page_results.php on line 78 <== in /home/herasonl/public_html/shop/includes/classes/db/mysql/query_factory.php on line 171
]
Re: PHP Fatal error: 1109:Unknown table 'p' in field list ...
Quote:
Originally Posted by
noppie
[[15-Nov-2020 00:38:02 UTC]
#5 splitPageResults->__construct() called at [/home/herasonl/public_html/shop/includes/modules/kandi/new_products.php:16]
i would compare the highlighted file with this one:
https://github.com/zencart/zencart/b...w_products.php
if i were a betting man, thats where i think your problem is.
line 16...
Re: PHP Fatal error: 1109:Unknown table 'p' in field list ...
Quote:
Originally Posted by
carlwhat
thank you.., but both files are the same..
Re: PHP Fatal error: 1109:Unknown table 'p' in field list ...
Try includes/modules/pages/products_new/header_php.php
Re: PHP Fatal error: 1109:Unknown table 'p' in field list ...
Where did that 'kandi' template come from? Does it have a template override of the default-filter (i.e. /includes/index_filters/kandi/default_filter.php)? If so, compare that to the base (present in /includes/index_filters) version of that file.
Re: PHP Fatal error: 1109:Unknown table 'p' in field list ...
Quote:
Originally Posted by
noppie
thank you.., but both files are the same..
i will try again.
you need to compare this file:
/home/herasonl/public_html/shop/includes/modules/kandi/new_products.php
to this file:
home/herasonl/public_html/shop/includes/modules/new_products.php
if those 2 files are the same, then i submit to you your log file is wrong.
reading log files can be tricky. but lets go over what we can see:
- we are on the shopping cart page.
- we are triggering a sql error on line 78 of the split_page_results class. that line on the base 156 looks to be where the error occurred. and that makes sense.
- that was called from line 16 of the kandi modules of new_products.php.
- line 16 of the base v156 modules of new_products is the initialization of an array. no way that line has anything to do with this error.
- base v156 modules of new_products does not include the split_page_results class.
- if it is the same as the base, why did kandi put it there?
- line 16 will say something like $var = new splitPageResults($QUERY, number, etc.) $QUERY is where the problem is...
just my guess based on reading the posted log file.
best.
Re: PHP Fatal error: 1109:Unknown table 'p' in field list ...
Nice analysis, @carlwhat!:thumbsup:
Re: PHP Fatal error: 1109:Unknown table 'p' in field list ...
Two additional possible causes:
- Maximum Value setting in the admin (mentioned in some related threads found when searching for this error)
- code differences introduced by the multi-site mod that the store is using