Jump to content

Cannot access backend/admin page


cassandra8

Recommended Posts

I did a restore today and now cannot access the backend page. Contacted my hosting provider who said this was a developer issue. Argh... This is above my head on how to fix. Any help? I got the following from the errors the hosting provider gave me. I am on version 1.7.7.5 with php of 7.3. 

The hook id #708 does not exist in database
at line 225 in file classes/Hook.php

220. SELECT `name` 221. FROM `' . _DB_PREFIX_ . 'hook` 222. WHERE `id_hook` = ' . (int) $hook_id); 223. 224. if (false === $result) { 225. throw new PrestaShopObjectNotFoundException( 226. sprintf('The hook id #%d does not exist in database', $hook_id) 227. ); 228. } 229. 230. Cache::store($cache_id, $result);

HookCore::getNameById - [line 867 - classes/Hook.php] - [1 Arguments]

Argument [0] 708

HookCore::exec - [line 238 - modules/ets_superspeed/classes/ext/ets_hook] - [8 Arguments]

Ets_Hook::exec17 - [line 36 - override/classes/Hook.php] - [9 Arguments]

Hook::exec - [line 1957 - classes/controller/AdminController.php] - [1 Arguments]

AdminControllerCore->initHeader - [line 156 - controllers/admin/AdminLoginController.php]

AdminLoginControllerCore->initContent - [line 306 - classes/controller/Controller.php]

ControllerCore->run - [line 518 - classes/Dispatcher.php]

DispatcherCore->dispatch - [line 41 - override/classes/Dispatcher.php]

Dispatcher->dispatch - [line 93 - admin/index.php]

Link to comment
Share on other sites

I am sorry for the confusion. I did a backup restore of my sight from the previous day.  I have deleted the cached folders in Var and renamed the .htaccess file updating to a new one. Still no luck. I had installed an update to the stripe module which was not working correctly so I wanted to go back a day to get rid of that update. I notice another module is missing a hook... I think... but not sure what to do.

Link to comment
Share on other sites

O.K. I just tried  php 7.2 that did not work either... also did not delete the index files. I am so confused on this one.

I see this error in the php-errorlog which has me wondering if this is the issue. 

15-Oct-2021 13:31:13 US/Central] PHP Warning:  Uncaught Symfony\Component\Debug\Exception\ContextErrorException: Warning: require_once(/home/customer/www/xxxxxx/public_html/override/classes/../../modules/ets_superspeed/classes/ext/ets_hook): failed to open stream: No such file or directory in /home/customer/www/xxxxxxxx/public_html/override/classes/Hook.php:31

Thanks for giving me some ideas! I did not think of rolling back to 7.2. Hosting is getting everyone off this and moving them up. I had to manually put it back to that.

Link to comment
Share on other sites

7 minutes ago, cassandra8 said:

How to check?

enter over filezilla, ftp and look with a right click what number the permissions are for temp, tmp i.e.

Also have a look if the file is there or not.

https://www.getastra.com/blog/prestashop-security/prestashop-file-folder-permissions/

30 minutes ago, cassandra8 said:

No such file or directory in /home/customer/www/xxxxxxxx/public_html/override/classes/Hook.php:31

 

Link to comment
Share on other sites

O.K. This is how I fixed it.

open file: config/defines.inc.php  (using FTP or hosting control panel)

change false-->true:

define('_PS_MODE_DEV_', false);

define('_PS_MODE_DEV_', true);

Once I got to see the report I went to the module that was having errors I followed the path to the file that was there and went into the file.

I added "return true;" before the line
$cache_id = 'hook_namebyid_' . $hook_id; 

This caused an error so removed the "return true;" saved and immediately the back admin panel opened and I was able to get in. 

I do not have a clue how it happened but glad it worked.

  • Thanks 1
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...