Hello
i have been facing a critical issue for almost 2 days now and cant be solved even through my Magento developer.
the issue is :
1- home page loads normal displaying all CMS content
2- products listed on home page are loaded normally and even when clicked , works normally
3- BUT when clicking any category / sub category it gives an error " There has been an error processing your request "
i tracked the error file log and found this ( note am not magento developer but have little developing experience , i have full access to the server using VS code )
ERROR:
{"0":"Undefined factory opensearch","1":" #1 Magento\\Catalog\\Model\\Layer->getProductCollection() called at [vendor\/magento\/module-catalog\/Block\/Product\/ListProduct.php:483]\n #2 Magento\\Catalog\\Block\\Product\\ListProduct->initializeProductCollection() called at [vendor\/magento\/module-catalog\/Block\/Product\/ListProduct.php:122]\ #3 Magento\\Catalog\\Block\\Product\\ListProduct->_getProductCollection() called at [vendor\/magento\/module-catalog\/Block\/Product\/ListProduct.php:368]\n #4 Magento\\Catalog\\Block\\Product\\ListProduct->getIdentities() called at [generated\/code\/Magento\/Catalog\/Block\/Product\/ListProduct\/Interceptor.php:113]\ #5 Magento\\Catalog\\Block\\Product\\ListProduct\\Interceptor->getIdentities() called at [vendor\/magento\/module-page-cache\/Model\/Layout\/LayoutPlugin.php:96]\ #6 Magento\\PageCache\\Model\\Layout\\LayoutPlugin->afterGetOutput() called at [vendor\/magento\/framework\/Interception\/Interceptor.php:146]\n #7 Magento\\Framework\\View\\Layout\\Interceptor->Magento\\Framework\\Interception\\{closure}() called at [vendor\/magento\/framework\/Interception\/Interceptor.php:153]\n #8 Magento\\Framework\\View\\Layout\\Interceptor->___callPlugins() called at [generated\/code\/Magento\/Framework\/View\/Layout\/Interceptor.php:347]\n #9 Magento\\Framework\\View\\Layout\\Interceptor->getOutput() called at [vendor\/magento\/framework\/View\/Result\/Page.php:260]\n #10 Magento\\Framework\\View\\Result\\Page->render() called at [vendor\/magento\/framework\/View\/Result\/Layout.php:171]\ #11 Magento\\Framework\\View\\Result\\Layout->renderResult() called at [vendor\/magento\/framework\/Interception\/Interceptor.php:58]\ #12 Magento\\Framework\\View\\Result\\Page\\Interceptor->___callParent() called at [vendor\/magento\/framework\/Interception\/Interceptor.php:138]\ #13 Magento\\Framework\\View\\Result\\Page\\Interceptor->Magento\\Framework\\Interception\\{closure}() called at [vendor\/magento\/framework\/Interception\/Interceptor.php:153]\n #14 Magento\\Framework\\View\\Result\\Page\\Interceptor->___callPlugins() called at [generated\/code\/Magento\/Framework\/View\/Result\/Page\/Interceptor.php:95]\ n#15 Magento\\Framework\\View\\Result\\Page\\Interceptor->renderResult() called at [vendor\/magento\/framework\/App\/Http.php:120]\ #16 Magento\\Framework\\App\\Http->launch() called at [vendor\/magento\/framework\/Interception\/Interceptor.php:58]\n #17 Magento\\Framework\\App\\Http\\Interceptor->___callParent() called at [vendor\/magento\/framework\/Interception\/Interceptor.php:138]\n #18 Magento\\Framework\\App\\Http\\Interceptor->Magento\\Framework\\Interception\\{closure}() called at [vendor\/magento\/module-application-performance-monitor\/Plugin\/ApplicationPerformanceMonitor.php:38]\ #19 Magento\\ApplicationPerformanceMonitor\\Plugin\\ApplicationPerformanceMonitor->aroundLaunch() called at [vendor\/magento\/framework\/Interception\/Interceptor.php:135]\ #20 Magento\\Framework\\App\\Http\\Interceptor->Magento\\Framework\\Interception\\{closure}() called at [vendor\/magento\/framework\/Interception\/Interceptor.php:153]\n #21 Magento\\Framework\\App\\Http\\Interceptor->___callPlugins() called at [generated\/code\/Magento\/Framework\/App\/Http\/Interceptor.php:23]\n#22 Magento\\Framework\\App\\Http\\Interceptor->launch() called at [vendor\/magento\/framework\/App\/Bootstrap.php:264]\ #23 Magento\\Framework\\App\\Bootstrap->run() called at [pub\/index.php:30]\n","url":"\/ar\/bathroom\/bathtubs-and-showers\/whirlpool-bathtub.html","script_name":"\/pub\/index.php","report_id":"239315d84c42a4bbd6c30c939069dedd058ffe9c4e662faa0c571fa3be6f9408"}
- first thing i thought it was indexing issue , so done indexing command with no error.
- second i thought it might be conflict with stagging env on the same server , so i removed the stagging env ( don't know if there is any command or actions i should take after removing the stagging )
- now i am trying to restore a previous backup of the server ( application only ) trying to fix it
is there any solution to fix it please ?
Magento version 2.4.7-p3
following on this
Hi @mahmoudadl3cb3 ,
SELECT * FROM core_config_data WHERE path = 'catalog/search/engine';
Make sure opensearch is selected
From magento server try to connect opensearch like
curl -X GET opensearchhostname:9200/_cat/indices?v
composer install from root magento directory
Validate vendor folder contains opensearch directories and its enabled in app/etc/config.php
Try reset and reindex
php bin/magento indexer:reset
php bin/magento indexer:reindex
Problem Solved? Accept as Solution!
Hope it helps!
Thanks