News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Re-Enable hooks

Started by ChrisCross, November 26, 2022, 11:25:13 AM

Previous topic - Next topic

ChrisCross

Hi!

I have moved my forums to another domain, and when I try to fix the paths in repair_settings.php i have accidentaly pressed the "Disable All Hooks" button.

Now the site turns "HTTP ERROR 500" and the log says:

[Sat Nov 26 17:23:22.385300 2022] [:error] [pid 21296] [client xx] PHP Fatal error:  Uncaught Error: Call to undefined function sportal_init() in
/var/www/html/forum/Sources/PortalHooks.php:795\nStack trace:\n#0
/var/www/html/forum/Sources/Subs.php(5830): sportal_initialize(Array)\n#1
/var/www/html/forum/index.php(264): call_integration_hook('integrate_pre_l...', Array)\n#2
/var/www/html/forum/index.php(191): smf_main()\n#3 {main}\n
thrown in /var/www/html/forum/Sources/PortalHooks.php on line 795, referer: https://xxx


I have installed EhPortal plugin.

What should I do? Thanks!


Fix_Packages.php:

ChrisCross

Well, it fixed.


If anyone needs, you just go to your mods archive, then open install.php,

and just copy these lines to your index.php:


Chen Zhen

At the moment without looking at SMF's code, I'm not sure if add_itegrate_function() checks to see if the hook already exists prior to adding it again (it should - at least that's how I'd write it). So on that note, I wouldn't advise adding those command lines to index.php. It might add it multiple times before you went back to remove the code or it just becomes plain redundant.

I responded to your thread on my forum and created an EhPortal removal package for you.

What you do is delete any EhPortal packages from the installer (showing as installed or not installed) then install the EhPortalRemoval package, uninstall it and then download & install EhPortal anew.

My SMF Mods & Plug-Ins

WebDev

"Either you repeat the same conventional doctrines everybody is saying, or else you say something true, and it will sound like it's from Neptune." - Noam Chomsky

Kindred

It doesn't...    or, at least it did not used to. People who installed mods multiple times could have multiple entries of each hook...
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

shawnb61

SMF 2.1 checks & will not double-up on hooks.  Sounds like an old 2.0 limitation.
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

shawnb61

And FYI, you could also have simply:
 - deinstalled the mod
 - removed each of the hooks (Maintenance | Forum Maintenance | Integration Hooks)
 - reinstalled the mod

The above works just fine.

Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Chen Zhen

I believe the mod was already flagged as uninstalled due to a SMF main package upgrade so uninstalling wasn't an option.

My SMF Mods & Plug-Ins

WebDev

"Either you repeat the same conventional doctrines everybody is saying, or else you say something true, and it will sound like it's from Neptune." - Noam Chomsky

Kindred

So, if you reinstalled the mod, then it would have re-added the hooks.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Advertisement: