Forum index completely blank!

Started by budiulik, March 05, 2019, 10:13:31 AM

Previous topic - Next topic

budiulik

Hello everyone,
I tried searching the forum for a similar issue but I didn't find any working solution.

I changed a few settings in the admin panel (Optimus SEO settings and changed a few paths to https).

After that, the index page (and I think any front-end page of my forum) is completely blank! If I try to inspect the page source code, it's completely empty.

The admin panel is working fine, though, except for a strange behaviour: when I change a random setting and I click on the SAVE button, the page reloads and the setting is shown with the previous value. I am not sure whether it has not been saved, or a cached version of the admin page is shown instead of the actual one. The error log does not report any error when this issue occurs.

I tried the following with no luck:

1) tried repair_settings
2) tried to clear the cache folder
3) tried to restore a backup from the Package/backups folder of a few days ago
4) tried to restore the robots.txt file
5) tried to restore the default theme
6) tried to uninstall Optimus mod

The forum is still working through Tapatalk!

I think there are corrupted data in the database ... I don't know what else it might be!

Any suggestion or hint is very much welcome!

I am not allowed to post the forum URL yet...

Thanks in advance

Looking

What does your error log say?

By the way, Tapatalk is iffy and can be a security hole.

Kindred

what you describe is NOT "corrupt data in the database"

What you describe is a critical failure in php at the server/file level.

"tried repair_settings"  -- ok... WHAT did you try? WHAT happened? WHAT did you set/change?

"changed a few paths to https"  did you CHANGE *ALL* paths to https?
Did you do a forced redirect in htaccess to force people to bounce to the https version?

Сл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."

budiulik

@Looking the error log says nothing! If I clear the error log and then load the home page, nothing Is added to the log.

@Kindred I tried to restore all the settings. Including switching all the paths to https as it was recommended. Nothing changed though.
No I didn't do a forced redirect to the https version.
Any idea? The back end is being displayed, in all of its parts.


Kindred

Сл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."

budiulik

I mean the SMF administration panel

drewactual

you likely have a php error in your template.index or this optimus thing, whatever it interjects.  can you turn the optimus thing off in your admin section?

budiulik

Yes, I uninstalled Optimus mod but I still get the same situation.
I also switched to the default theme but nothing changed.

drewactual

i wager it didn't 'all' uninstall. 

post up your index.template?

budiulik

Quote from: drewactual on March 06, 2019, 07:55:19 AM
i wager it didn't 'all' uninstall. 

post up your index.template?

I guess you're right: the issue has something to do with Optimus....

I made a bunch of tests in the last couple hours, so I restored a backup where Optimus is still installed. I tried to uninstall it and - boom! Even the admin panel is now blank. This has never happened before...

Anyway, I restored the backup WITH Optimus and in attachment you can find the DEFAULT index.template.php

I also found out that it I'm logged out, I get an error 503 when trying to display the forum index. If I'm logged in (I open the url of the admin panel and log in), the index simply looks blank.
If you want to give it a try, the forum url is https://forum.livornosoftair.it/index.php [nofollow] ... you'll see a blank page (or error 503) but if you open the url https://forum.livornosoftair.it/index.php?action=admin [nofollow] you shoul see the admin login screen.

drewactual

how about your board.index now?

.... there isn't anything wrong with the index.template you posted.  because you can get into forum when board.index isn't called, it makes me wonder......

budiulik

In attachment the default board index template...  :(

drewactual

there is nothing out of place there, either. 

open your SSI.php, and see if this is present:

$hooks = array(
'integrate_pre_include' => '$sourcedir/Optimus/Class-Optimus.php',
'integrate_pre_load'    => 'Optimus::hooks'
);


if it is, comment it out and see what happens. 

i'm not certain Optimus is your issue. 

budiulik

I can't even find the $hooks array definition in SSI.php! Wtf? Is this OK?

Anyway there's one more test I could perform: trying to use the Remove all hooks function in repair_settings.php and see what happens.

drewactual

well, there you have it.

look for this:

'integrate_pre_include' => '$sourcedir/Optimus/Class-Optimus.php',
'integrate_pre_load'    => 'Optimus::hooks'


are they present?

Arantor

You know that hook definitions aren't in actual SMF files, right? They are loaded from plugin installs into the database...

budiulik

Quote from: drewactual on March 06, 2019, 11:05:05 AM
well, there you have it.

look for this:

'integrate_pre_include' => '$sourcedir/Optimus/Class-Optimus.php',
'integrate_pre_load'    => 'Optimus::hooks'


are they present?
no they aren't! I guess the hooks are messed up...

by the way the remove all hooks function did the charm!!! What now? I can see that the mods are still "installed", but are they working? What should I do now?

Quote from: Arantor on March 06, 2019, 11:11:47 AM
You know that hook definitions aren't in actual SMF files, right? They are loaded from plugin installs into the database...

No I didn't know that. I am not into SMF programming, I am just good to mess things up :-)

Is there a way to remove a single hook directly from the database (e.g. the Optimus hook) without using the "remove all hooks function" in repair_settings.php?

Arantor

Now some of your mods won't be working but you have no way of knowing what's broken. Guess it's time to uninstall and reinstall all your mods.

Also the comment about hooks was directed at the suggestion to go look in SMF core code for hook definitions, they won't be there, that's the point of hooks.

budiulik

Quote from: Arantor on March 06, 2019, 11:16:48 AM
Now some of your mods won't be working but you have no way of knowing what's broken. Guess it's time to uninstall and reinstall all your mods.

Also the comment about hooks was directed at the suggestion to go look in SMF core code for hook definitions, they won't be there, that's the point of hooks.

OK, thank you very much... I suspected that was some database issue from the beginning but I didn't know where to start looking from.

One last thing: if there's a way to selectively remove a hook, that would be the best solution! If not, I'm going to uninstall and install all of my mods again.

drewactual

i didn't know optimus used hooks until i looked at the package itself.   i was asking about templates before i knew that seeking to see if there was codes added to the templates by the mod.  the other question was about the SSI interjection, which if it's there and asking for files that no longer exist...........

Kindred

Optimus Brave does not add anything to SSI.php --   and no mod would ever add that hooks code into a file.  That hooks code is performed DURING THE INSTALLATION to add the hook...

and budiulik -- to be clear, this was not "a database problem" nor was it "corrupted data". This was a problem with a specific, badly uninstalled mod.
You are correct that it did involve an entry in the database... but there's a difference. :)
Сл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."

Arantor

@budiulik there isn't a way to selectively manage hooks until 2.1 but having hit the "remove all", SMF has no way to know what hooks should be there. They're not "on or off", they're "present or absent" if that makes sense.

@drewactual sure, I get that, but you were talking about looking in the SSI file for them, they wouldn't be there, they're entries that get added into the smf_settings table, which get looked up at the appropriate time to see what things are hanging off them.

budiulik

Quote from: Kindred on March 06, 2019, 11:32:35 AM
Optimus Brave does not add anything to SSI.php --   and no mod would ever add that hooks code into a file.  That hooks code is performed DURING THE INSTALLATION to add the hook...

and budiulik -- to be clear, this was not "a database problem" nor was it "corrupted data". This was a problem with a specific, badly uninstalled mod.
You are correct that it did involve an entry in the database... but there's a difference. :)

Maybe I was not able to make myself clear, but this situation is what I meant when I said "database problem". I didn't mean a connection problem or something specific to MySQL...

Anyway thanks everybody. I appreciated your support very much!

drewactual

.... and I just schooled myself on hooks... all this time i thought they were 'hooked' through SSI. 

a script can be written to remove the optimus hooks, if that is in fact the culprit, correct?  as far as others present i've no clue.  i just zeroed onto optimus because it was mentioned happening after the install/removal.

budiulik

Yes I suppose it is the culprit but I'm not sure, and if there's not a way of just removing the Optimus hooks I guess I'll never know

Arantor

If you haven't already used repair_settings to nuke everything (in which case, too late, they're all gone), it is possible to manually edit the values in the database to remove the offender, but if the remove all button has been pressed, there's no way around uninstalling and reinstalling all mods.

budiulik

I have a backup so I can still restore the situation before I pressed the nuke button :)


Illori

you have a database backup? that is what would need to be restored.

budiulik

Yes I have a full backup (files+dB) made from cpanel

budiulik

Quote from: Arantor on March 06, 2019, 11:41:31 AM
If you haven't already used repair_settings to nuke everything (in which case, too late, they're all gone), it is possible to manually edit the values in the database to remove the offender, but if the remove all button has been pressed, there's no way around uninstalling and reinstalling all mods.
I have a full backup, can you please tell me which table do I need to edit and how? Thanks in advance! :)

Arantor

First, restore the backup.

Then look through smf_settings for any entries that have the word "integration" in the name (the variable column). Post those entries here and I'll tell you which need changing and how.

budiulik

OK, I found the following entries with the word "integration" in the variable column:

sp_enableIntegration = 1
sp_adminIntegrationHide = 1

If I look for "integr*" I also get the following entries:

integrate_pre_include = "$sourcedir/Subs-Tapatalk.php,$sourcedir/Mentions.php,$sourcedir/Subs-Optimus.php,$sourcedir/PostHistory.php,$sourcedir/FooterMenu.php,$sourcedir/Subs-Add_Favicon.php,$sourcedir/Optimus/Class-Optimus.php"
integrate_admin_areas = "Tapatalk_add_admin_areas,optimus_admin_areas,footer_menu_admin_areas"
integrate_profile_areas = "mentions_profile_areas,reputation_profile"
integrate_load_permissions = "mentions_permissions,reputation_permissions,PH_load_permissions"
integrate_bbc_codes = "mentions_bbc"
integrate_menu_buttons = "mentions_menu,optimus_operations"
integrate_register = "mentions_register"
integrate_actions = "reputation_action,PH_actions"
integrate_admin_include = "$sourcedir/Admin-Optimus.php"
integrate_load_theme = "optimus_home,footer_menu_load_theme,Add_Favicon_META"
integrate_buffer = "optimus_buffer"
integrate_create_topic = "optimus_sitemap"
integrate_core_features = "PH_core_features"
integrate_pre_load = "Optimus::hooks"

I guess I'll have to remove the strings in red, and then uninstall/delete Optimus, right?




EDIT: I tried to do that and it worked! I suppose this solution is better than the "nuke" solution (The "remove all hooks" option from repair_settings.php)

Arantor

Yup, that's exactly what you needed to do :)

budiulik

Once again thank everyone very much for your support!

Problem solved  8)

Advertisement: