XOOPS / XoopsCore25

XOOPS Core 2.5.x (current release is 2.5.11: https://github.com/XOOPS/XoopsCore25/releases)
GNU General Public License v2.0
71 stars 59 forks source link

XOOPS reads blocks from deactivated modules #1335

Open mambax7 opened 1 year ago

mambax7 commented 1 year ago

I was getting the same error as in https://github.com/XOOPS/XoopsCore25/issues/1329

I deactivated all modules, but the error was still there. From the error report, I saw that it complained about a block from a deactivated module. I had to go and deactivate the block, and then the error went away.

We should make sure that XOOPS doesn't read any blocks from deactivated modules. It's a waste of time as it reads blocks that are not going to be displayed, but also it will continue to report errors, incl. fatal errors, even if we deactivate a module because it was buggy

alain01 commented 1 year ago

Nice find!

GregMage commented 1 year ago

Indeed, this behaviour is not good. Can you give me more details so that I can look at the problem in detail?

mambax7 commented 1 year ago

I didn't have the time to investigate it in detail, because the module was outdated, so I just wanted to get XOOPS to work. But based on what I've experienced, I assume that you could do following: 1) Select an installed module that has active blocks, and deactivate it 2) Go to one of the module's block code, or to the block's template and introduce a fatal error 3) Go to the front page and see if it works

In my case, it was crashing, until I went to the module's block and deactivated

If you can't replicate it this way, let me know, and I'll try to investigate in more depth on my end

GregMage commented 1 year ago

Okay, I'll take a look and let you know if I have a problem

GregMage commented 1 year ago

I added an error in the templates of a block of the xmnews module and the site does not work anymore. I deactivate the module and the site works. I can't reproduce the problem...

mambax7 commented 1 year ago

OK, I'll take a look here this weekend.

GregMage commented 1 year ago

Do you have any other information? Because I couldn't reproduce your problem!

mambax7 commented 1 year ago

Still on my TODO list, and didn't have the time to get to it yet :(