Jump to content

Fatal error ProductSearchContext not found


asmar

Recommended Posts

Hi all,

It drives me nuts this problem; After an upgrade (don't know which as it was over a few months period with plenty of updates) I'm getting 500 error wherever I'm trying to use the search form to look up for any term.

Also when I click on Tags same problem (500 error).

Logs showing just the following:

 

Fatal error: Uncaught Error: Class 'PrestaShop\PrestaShop\Core\Product\Search\ProductSearchContext' not found in /home/eshop/public_html/classes/controller/ProductListingFrontController.php:89 Stack trace: #0 /home/eshop/public_html/classes/controller/ProductListingFrontController.php(263): ProductListingFrontControllerCore->getProductSearchContext() #1 /home/eshop/public_html/classes/controller/ProductListingFrontController.php(545): ProductListingFrontControllerCore->getProductSearchVariables() #2 /home/eshop/public_html/controllers/front/listing/SearchController.php(70): ProductListingFrontControllerCore->doProductSearch('catalog/listing...', Array) #3 /home/eshop/public_html/classes/controller/Controller.php(189): SearchControllerCore->initContent() #4 /home/eshop/public_html/classes/Dispatcher.php(367): ControllerCore->run() #5 /home/eshop/public_html/index.php(28): DispatcherCore->dispatch() #6 {main} thrown in /home/eshop/public_html/classes/controller/ProductListingFrontController.php on line 89

 

I've tried disable-enable SEO, raise the PHP limits a lot (site runs on a VM with plenty of resources), change various PHP versions (from 5.6 to 7.2) but no luck. Site is running 1.6.24 with the default theme.

I've tried with the same theme on a new installation on the same server with same settings and search is working so I guess is a bug related to my content or so?

Any help is very much appreciated.

Edited by asmar
typo (see edit history)
Link to comment
Share on other sites

ok
i say you using prestashop version  1.6.24 and your current module quick search block is not compatible with your prestashop version 

(1) uninstalled and delete quick search block

(2) find quick search block module compatible with prestashop 1.6.24 (module zip in attachment )

(3) install that module 

(4) do not upgrade module if your using prestashop 1.6.24 

 

blocksearch.zip

Edited by Nishith (see edit history)
Link to comment
Share on other sites

In case that it helps this is what I'm getting in developer console when I'm typing something in search box. Once I hit the submit I get the 500 error.

 

GET https://mydomain.com/en/search?q=clothing&limit=10&timestamp=1567166518821&ajaxSearch=1&id_lang=1 500 (Internal Server Error)
(anonymous)	@	VM307:1
send	@	jquery-1.11.0.min.js:4
ajax	@	jquery-1.11.0.min.js:4
request	@	jquery.autocomplete.js:341
onChange	@	jquery.autocomplete.js:241
setTimeout (async)		
(anonymous)	@	jquery.autocomplete.js:151
dispatch	@	jquery-1.11.0.min.js:3
r.handle	@	jquery-1.11.0.min.js:3

 

PS: I've just replaced my domain with mydomain.com

Any help is very much appreciated.

Edited by asmar (see edit history)
Link to comment
Share on other sites

I found a workaround finally.....

I've installed a new Prestashop 1.6.24 local. I made a zip of all files excluding cache/config folders and upload/overwrite to the live server.

I disabled the tags module and then it worked.

When I enable the tags module the 500 error comes back on both tags/search and have to delete it completely and reupload all files again.

Just in case someone else comes to the same problem at least the above worked for me.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...