Jump to content

Installed module = Website broke


Recommended Posts

Working away on a new website then installed a cookies module.

Now the website displays error on both the front and backend. If deleted the module files (I couldn't uninstall as I couldn't login to the backend). Can anyone help please?

The error on the backend reads

Oops! An Error Occurred

The server returned a "500 Internal Server Error".

Something is broken. Please let us know what you were doing when this error occurred. We will fix it as soon as possible. Sorry for any inconvenience caused.

and the front end:

This page isn’t working

studio-pilates.co.uk is currently unable to handle this request.

HTTP ERROR 500.

 

In dev mode the home page gives the following info:

Fatal error: Uncaught Error: Access to undeclared static property Hook::$_hook_modules_cache_exec in /home/studiotest/public_html/override/classes/Hook.php:320 Stack trace: #0 /home/studiotest/public_html/override/classes/Hook.php(57): Hook::getAllHookRegistrationsLG(Object(Context), 'moduleRoutes') #1 /home/studiotest/public_html/classes/Hook.php(848): Hook::getHookModuleExecList('moduleRoutes') #2 /home/studiotest/public_html/classes/Dispatcher.php(606): HookCore::exec('moduleRoutes', Array, NULL, true, false) #3 /home/studiotest/public_html/classes/Dispatcher.php(243): DispatcherCore->loadRoutes() #4 /home/studiotest/public_html/classes/Dispatcher.php(201): DispatcherCore->__construct(Object(Symfony\Component\HttpFoundation\Request)) #5 /home/studiotest/public_html/index.php(28): DispatcherCore::getInstance() #6 {main} thrown in /home/studiotest/public_html/override/classes/Hook.php on line 320

 

And the admin page shows this:

Error

in /home/studiotest/public_html/override/classes/Hook.php (line 320)

                }

            }

        }

        if ($useCache) {

            Cache::store($cache_id, $allHookRegistrations);

            self::$_hook_modules_cache_exec = $allHookRegistrations;

        }

        return $allHookRegistrations;

    }

    /**

     * Get the list of hook aliases, indexed by hook name

Hook::getAllHookRegistrationsLG(object(Context), '3points')in /home/studiotest/public_html/override/classes/Hook.php (line 57)

Hook::getHookModuleExecList('3points')in /home/studiotest/public_html/src/Adapter/LegacyHookSubscriber.php (line 76)

in /home/studiotest/public_html/vendor/symfony/symfony/src/Symfony/Component/Config/Resource/ReflectionClassResource.php :: getSubscribedEvents (line 250)

in /home/studiotest/public_html/vendor/symfony/symfony/src/Symfony/Component/Config/Resource/ReflectionClassResource.php -> generateSignature (line 113)

in /home/studiotest/public_html/vendor/symfony/symfony/src/Symfony/Component/Config/Resource/ReflectionClassResource.php -> computeHash (line 70)

ReflectionClassResource->__sleep()

in /home/studiotest/public_html/vendor/symfony/symfony/src/Symfony/Component/Config/ResourceCheckerConfigCache.php serialize (line 132)

in /home/studiotest/public_html/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/ContainerBuilderDebugDumpPass.php -> write (line 32)

in /home/studiotest/public_html/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/Compiler.php -> process (line 94)

in /home/studiotest/public_html/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ContainerBuilder.php -> compile (line 762)

in /home/studiotest/public_html/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php -> compile (line 594)

in /home/studiotest/public_html/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php -> initializeContainer (line 136)

Kernel->boot()in /home/studiotest/public_html/app/AppKernel.php (line 96)

in /home/studiotest/public_html/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php -> boot (line 196)

Kernel->handle(object(Request), 1, false)in /home/studiotest/public_html/fsp123/index.php (line 84)

 

Link to comment
Share on other sites

The issue is caused by a broken or incomplete override left behind by the cookies module, even after its files were manually deleted. The key part of the error is:

Fatal error: Uncaught Error: Access to undeclared static property Hook::$_hook_modules_cache_exec in /override/classes/Hook.php on line 320

This points to an override file that is using a non-existent property $_hook_modules_cache_exec, which is not part of PrestaShop’s Hook class in recent versions.

1. Rename or delete the override file

Manually disable the override that's causing the error.

File to rename: /override/classes/Hook.php

Rename it to something like: /override/classes/Hook.php.bak
 

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...