Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: Мel on July 01, 2022, 09:19:37 AM

Title: Call to a member function versionCheck() on null
Post by: Мel on July 01, 2022, 09:19:37 AM
Howdy,
After one of the anti spam mods, my 2.0.19 forum gives me this error while trying to enter the admin panel:
Call to a member function versionCheck() on nullAnd I can't use it. Any tips how can I fix this? There is always a backup, but maybe a more elegant solution exists.
Thanks.
Title: Re: Call to a member function versionCheck() on null
Post by: Doug Heffernan on July 01, 2022, 10:06:13 AM
Quote from: Мel on July 01, 2022, 09:19:37 AMHowdy,
After one of the anti spam mods, my 2.0.19 forum gives me this error while trying to enter the admin panel:
Call to a member function versionCheck() on nullAnd I can't use it. Any tips how can I fix this? There is always a backup, but maybe a more elegant solution exists.
Thanks.

I see that you have posted at that mod 's support topic about this. You do not need to start a new topic as well for the same thing.
Title: Re: Call to a member function versionCheck() on null
Post by: Мel on July 02, 2022, 04:18:18 AM
Ok, there just was no replies for that.
Title: Re: Call to a member function versionCheck() on null
Post by: Aleksi "Lex" Kilpinen on July 02, 2022, 08:18:12 AM
What prompted this error? I mean, what changed? Or did it come up immediately after installing the mod?
What other mods do you have installed, and what PHP version are you on currently?
Title: Re: Call to a member function versionCheck() on null
Post by: Мel on July 03, 2022, 04:42:23 AM
Quote from: Aleksi "Lex" Kilpinen on July 02, 2022, 08:18:12 AMWhat prompted this error? I mean, what changed? Or did it come up immediately after installing the mod?
What other mods do you have installed, and what PHP version are you on currently?
At first, the mod broke the forum. Without installation manual for the mod I could not remove it, so I asked my hosting provider to restore a backup. The forum returned online, but with that error, that blocks my admin access.
There are several other mods on my forum, like video embedder and such, but I can't see the list without the admin access.
PHP 7.4 (ea-php74).
Title: Re: Call to a member function versionCheck() on null
Post by: Kindred on July 03, 2022, 07:21:28 AM
Ah.

You restored a backup of files, but not the database. That was your issue
Title: Re: Call to a member function versionCheck() on null
Post by: Мel on July 04, 2022, 07:50:52 AM
Quote from: Kindred on July 03, 2022, 07:21:28 AMAh.

You restored a backup of files, but not the database. That was your issue
Ah, that was a rookie mistake, long time without practice :)
Restored it, everything seems fine, thanks.
Title: Re: Call to a member function versionCheck() on null
Post by: Kindred on July 04, 2022, 08:27:21 AM
Mods, especially those in 2.1.x are using hooks more often now. This means that there  are few, if any file edits,  because the calls for mod functions are in the database.

There are several ways to remove hooks, withouta full restore, if the mod breaks your site.
(That being said, you should always take a backup of files and database before any edits (including mods). ;)
Title: Re: Call to a member function versionCheck() on null
Post by: Мel on July 04, 2022, 09:29:48 AM
Thanks, I'll keep that in mind.