News:

Join the Facebook Fan Page.

Main Menu

Database error

Started by jake99, March 19, 2023, 07:14:22 PM

Previous topic - Next topic

jake99

Hello, I modified the user permissions so that the topics of the newly registered users must be approved by an administrator, but in the error logs it shows a database error, does anyone know how to fix it?


Arantor

Are you sure you have SMF 2.0? (And not 2.1, if so what version?)

What mods do you have?

jake99

Quote from: Arantor on March 19, 2023, 07:21:17 PMAre you sure you have SMF 2.0? (And not 2.1, if so what version?)

What mods do you have?

I have SMF 2.1.3 with mods from the same version, some mods are from previous versions but they didn't give me problems or errors when installing them so I kept them.


TwitchisMental

Quote from: jake99 on March 19, 2023, 08:15:23 PM
Quote from: Arantor on March 19, 2023, 07:21:17 PMAre you sure you have SMF 2.0? (And not 2.1, if so what version?)

What mods do you have?

I have SMF 2.1.3 with mods from the same version, some mods are from previous versions but they didn't give me problems or errors when installing them so I kept them.


I have moved the topic to the appropriate category.


The first thing I would try is disabling the two proxy blocking mods and see if that resolves the issue.

jake99

QuoteI have moved the topic to the appropriate category.

Oh sorry I thought I was going there

QuoteThe first thing I would try is disabling the two proxy blocking mods and see if that resolves the issue.

Ok thanks for the help
I uninstalled the two mods but the problem is still there, it appeared when I adjusted the permissions so that the topics of newly registered users need administrator approval to post. I tried to clear the cache, rebuild settings.php and used the Find and repair any errors function but the error persists, along with other errors.

Doug Heffernan

Quote from: jake99 on March 19, 2023, 08:15:23 PMI have SMF 2.1.3 with mods from the same version, some mods are from previous versions but they didn't give me problems or errors when installing them so I kept them.


Can you disable the NotifyBoardReply mod and see if it would help? If it won't, disable all the mods and see if the error will go away. If it will, enable the mods one at a time till you find the culprit as most likely this is caused by a third party mod.

jake99

QuoteCan you disable the NotifyBoardReply mod and see if it would help? If it won't, disable all the mods and see if the error will go away. If it will, enable the mods one at a time till you find the culprit as most likely this is caused by a third party mod.


the error was displayed even when no mod was installed  :P  :'(

jake99

#7
I read several websites and I was able to fix what was causing many of the errors just by deleting hooks, but thanks anyway to those who took the time to help me, it's appreciated.

Kindred

Which means that you still had mods installed...
Сл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."

jake99

Quote from: Kindred on March 21, 2023, 12:43:58 AMWhich means that you still had mods installed...

Actually the problem did not come from the mods but from the hook residues that were left unused and generated queries to non-existent files. When I didn't have any mods installed I kept getting errors, because I didn't delete the hooks. haha i'm still inexperienced in this SMF thing :-[  :P .

Kindred

ok...   so, Hooks = mods.

So -- leftover "hook residues" mean that the mods were NOT completely uninstalled and - as you discovered - were trying to call for files and functions which no longer existed.

mods use hooks to link into the SMF core... if the mod did not properly remove the hook for itself when you uninstalled the mod, then you should let the mod author know (if, that is, you properly uninstalled the mod and did not just delete the files)
Сл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."

jake99

Quote from: Kindred on March 21, 2023, 07:52:28 AMok...  so, Hooks = mods.
humm i thought they were different types 🤔


Quote from: Kindred on March 21, 2023, 07:52:28 AM... then you should let the mod author know (if, that is, you properly uninstalled the mod and did not just delete the files)

I uninstalled them normally, maybe I'll inform the author but I'm not sure... I'll gather more data first.

Arantor

The only difference is that one directly edits the code where it wants to run, the other uses the 'when you get to this point, lemme know so I can do something' system. The net result is the same: third party code gets run at the relevant point in time.

Hooks often have surprising side effects and can be hard to debug and I've been advocating for the last decade to rethink how the hooks work for *exactly* cases like this.

jake99

Quote from: Arantor on March 21, 2023, 05:51:22 PMThe only difference is that one directly edits the code where it wants to run, the other uses the 'when you get to this point, lemme know so I can do something' system. The net result is the same: third party code gets run at the relevant point in time.

oh I see

QuoteHooks often have surprising side effects and can be hard to debug and I've been advocating for the last decade to rethink how the hooks work for *exactly* cases like this.

It's true, I realized that hooks cause a lot more problems...

Arantor

They're a double edged sword; they solve one class of problem and create another at least the way they're currently implemented, mostly because they were never implemented originally for the purposes of modding; they were implemented in the form they were implemented on for actual integrations - where the touchpoints were few and highly predictable.

I've long advocated for something more akin to WordPress where a plugin's hooks will only engage on boot-up when the plugin is present so renaming the folder or deleting it *will* disengage the hooks. I even had working prototypes of this years ago but it wasn't ever adopted by SMF core for various reasons.

Advertisement: