MrMayberry Posted December 27, 2022 Share Posted December 27, 2022 Everyone, I am working on getting my search widget working. Right now when searching for any "words" I get this screen: I have went thru my admin screens trying to figure this out, but no luck? I have a fresh install working on this same domain and it's search box is working correctly, out of the box? So i must have moved/changed something. I found this in the "frontend" list log file: Quote 2022-12-27 04:41:00 [50.126.46.36][-][16e870acf7d4c2c74a777cf83213d547][error][yii\db\IntegrityException] PDOException: SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'platform_id' in where clause is ambiguous in /home/customla/public_html/lib/vendor/yiisoft/yii2/db/Command.php:1302 Stack trace: #0 /home/customla/public_html/lib/vendor/yiisoft/yii2/db/Command.php(1302): PDOStatement->execute() #1 /home/customla/public_html/lib/vendor/yiisoft/yii2/db/Command.php(1168): yii\db\Command->internalExecute('SELECT COUNT(*)...') #2 /home/customla/public_html/lib/vendor/yiisoft/yii2/db/Command.php(436): yii\db\Command->queryInternal('fetchColumn', 0) #3 /home/customla/public_html/lib/vendor/yiisoft/yii2/db/Query.php(497): yii\db\Command->queryScalar() #4 /home/customla/public_html/lib/vendor/yiisoft/yii2/db/ActiveQuery.php(352): yii\db\Query->queryScalar('COUNT(*)', Object(yii\db\Connection)) #5 /home/customla/public_html/lib/vendor/yiisoft/yii2/db/Query.php(368): yii\db\ActiveQuery->queryScalar('COUNT(*)', Object(yii\db\Connection)) #6 /home/customla/public_html/lib/common/components/ProductsQuery.php(1414): yii\db\Query->count() #7 /home/customla/public_html/lib/common/components/ProductsQuery.php(1452): common\components\ProductsQuery->addKeywords(Array) #8 /home/customla/public_html/lib/common/components/ProductsQuery.php(441): common\components\ProductsQuery->addFilters(Array) #9 /home/customla/public_html/lib/frontend/controllers/CatalogController.php(854): common\components\ProductsQuery->buildQuery() #10 [internal function]: frontend\controllers\CatalogController->actionSearchSuggest() #11 /home/customla/public_html/lib/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array) #12 /home/customla/public_html/lib/vendor/yiisoft/yii2/base/Controller.php(178): yii\base\InlineAction->runWithParams(Array) #13 /home/customla/public_html/lib/frontend/controllers/Sceleton.php(237): yii\base\Controller->runAction('search-suggest', Array) #14 /home/customla/public_html/lib/vendor/yiisoft/yii2/base/Module.php(552): frontend\controllers\Sceleton->runAction('search-suggest', Array) #15 /home/customla/public_html/lib/vendor/yiisoft/yii2/web/Application.php(103): yii\base\Module->runAction('catalog/search-...', Array) #16 /home/customla/public_html/lib/vendor/yiisoft/yii2/base/Application.php(384): yii\web\Application->handleRequest(Object(frontend\components\Request)) #17 /home/customla/public_html/lib/frontend/web/index.php(29): yii\base\Application->run() #18 /home/customla/public_html/index.php(27): require('/home/customla/...') #19 {main} Next yii\db\IntegrityException: SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'platform_id' in where clause is ambiguous The SQL being executed was: SELECT COUNT(*) FROM `products` `p` LEFT JOIN `products_global_sort` ON (`p`.`products_id` = `products_global_sort`.`products_id`) AND (`products_global_sort`.`platform_id`=1) LEFT JOIN `products_description` ON `p`.`products_id` = `products_description`.`products_id` WHERE (`p`.`stock_indication_id`<>10) AND (EXISTS (SELECT * FROM `platforms_products` `plp` WHERE (p.products_id = plp.products_id) AND (`plp`.`platform_id`=1))) AND ( p.products_status = 1 ) AND (concat(`products_description`.products_name, `products_description`.products_description) LIKE '%hot%') AND ((`language_id`=1) AND (`platform_id`=1)) in /home/customla/public_html/lib/vendor/yiisoft/yii2/db/Schema.php:676 Stack trace: #0 /home/customla/public_html/lib/vendor/yiisoft/yii2/db/Command.php(1307): yii\db\Schema->convertException(Object(PDOException), 'SELECT COUNT(*)...') #1 /home/customla/public_html/lib/vendor/yiisoft/yii2/db/Command.php(1168): yii\db\Command->internalExecute('SELECT COUNT(*)...') #2 /home/customla/public_html/lib/vendor/yiisoft/yii2/db/Command.php(436): yii\db\Command->queryInternal('fetchColumn', 0) #3 /home/customla/public_html/lib/vendor/yiisoft/yii2/db/Query.php(497): yii\db\Command->queryScalar() #4 /home/customla/public_html/lib/vendor/yiisoft/yii2/db/ActiveQuery.php(352): yii\db\Query->queryScalar('COUNT(*)', Object(yii\db\Connection)) #5 /home/customla/public_html/lib/vendor/yiisoft/yii2/db/Query.php(368): yii\db\ActiveQuery->queryScalar('COUNT(*)', Object(yii\db\Connection)) #6 /home/customla/public_html/lib/common/components/ProductsQuery.php(1414): yii\db\Query->count() #7 /home/customla/public_html/lib/common/components/ProductsQuery.php(1452): common\components\ProductsQuery->addKeywords(Array) #8 /home/customla/public_html/lib/common/components/ProductsQuery.php(441): common\components\ProductsQuery->addFilters(Array) #9 /home/customla/public_html/lib/frontend/controllers/CatalogController.php(854): common\components\ProductsQuery->buildQuery() #10 [internal function]: frontend\controllers\CatalogController->actionSearchSuggest() #11 /home/customla/public_html/lib/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array) #12 /home/customla/public_html/lib/vendor/yiisoft/yii2/base/Controller.php(178): yii\base\InlineAction->runWithParams(Array) #13 /home/customla/public_html/lib/frontend/controllers/Sceleton.php(237): yii\base\Controller->runAction('search-suggest', Array) #14 /home/customla/public_html/lib/vendor/yiisoft/yii2/base/Module.php(552): frontend\controllers\Sceleton->runAction('search-suggest', Array) #15 /home/customla/public_html/lib/vendor/yiisoft/yii2/web/Application.php(103): yii\base\Module->runAction('catalog/search-...', Array) #16 /home/customla/public_html/lib/vendor/yiisoft/yii2/base/Application.php(384): yii\web\Application->handleRequest(Object(frontend\components\Request)) #17 /home/customla/public_html/lib/frontend/web/index.php(29): yii\base\Application->run() #18 /home/customla/public_html/index.php(27): require('/home/customla/...') #19 {main} Additional Information: Array ( [0] => 23000 [1] => 1052 [2] => Column 'platform_id' in where clause is ambiguous ) Thanks in advance... Quote Link to comment Share on other sites More sharing options...
osCommerce-Official Posted December 27, 2022 Share Posted December 27, 2022 @Ivan Holbi @pandreicould you please help? Quote Link to comment Share on other sites More sharing options...
pandrei Posted December 27, 2022 Share Posted December 27, 2022 4 hours ago, MrMayberry said: I found this in the "frontend" list log file: Could you send me this log file: lib/frontend/runtime/logs/sql_error.log Quote Link to comment Share on other sites More sharing options...
MrMayberry Posted December 27, 2022 Author Share Posted December 27, 2022 This is all I have for the frontend logs? I will DM all log files. Quote Link to comment Share on other sites More sharing options...
pandrei Posted December 29, 2022 Share Posted December 29, 2022 (edited) The error will be fixed in the next update. Or you can override the file lib/common/models/Products.php with the attached one Products.php Edited December 29, 2022 by pandrei Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.