Jump to content

faceted search attempted to load class hookdispatcher

Recommended Posts

I tried upgrading faceted search from Back Office and ended up with an error:





Attempted to load class "HookDispatcher" from namespace "PrestaShop\Module\FacetedSearch".
Did you forget a "use" statement for e.g. "PrestaShop\PrestaShop\Core\Hook\HookDispatcher", "PrestaShop\PrestaShop\Adapter\Hook\HookDispatcher" or "PrestaShopBundle\Service\Hook\HookDispatcher"?

in modules/ps_facetedsearch/ps_facetedsearch.php (line 101)

        $this->displayName = $this->trans('Faceted search', [], 'Modules.Facetedsearch.Admin');

        $this->description = $this->trans('Displays a block allowing multiple filters.', [], 'Modules.Facetedsearch.Admin');

        $this->psLayeredFullTree = Configuration::get('PS_LAYERED_FULL_TREE');

        $this->ps_versions_compliancy = ['min' => '', 'max' => _PS_VERSION_];

        $this->hookDispatcher = new HookDispatcher($this);



     * Check if method is an ajax request.

     * This check is an old behavior and only check for _GET value.


I renamed the folder in modules via ftp and that let me get back into the modules browser in the BO


however after re-creating the folder ps_facetsearch in the modules folder and adding in the addon from here: https://github.com/PrestaShop/ps_facetedsearch/releases/tag/v3.0.5


I get the same error.


I tried with version 3.0.5, 3.0.6 and 3.0.7 and all give me the same error which means I think something else might have been changed besides just hte addon folder?


I am just starting out with prestashop so I have a lot to learn but this seems a little crazy. Hopefully its an easy fix.



Share this post

Link to post
Share on other sites
  • 2 weeks later...

I've had exactly the same issue with both the Faceted Search and Addons Connect modules after upgrading locally and then pushing changes to the server via GIT.

If you have console/terminal access to the server via cPanel or something you can run the…

composer dumpautoload

 command in both the root Prestashop folder and the ps_facetedsearch root folder - this fixed the issue for me.


Edited by teapotjames (see edit history)
  • Thanks 1

Share this post

Link to post
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...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More