Blank page when installing or uninstalling a mod

Started by Julius_2000, September 06, 2022, 10:38:15 AM

Previous topic - Next topic

Julius_2000

Hi eveyone.

I've run into a weird issue with the package installation section. Whenever I try to install or uninstall a package, I get a blank site after the page is reloaded again where usually the newly loaded page would show whether the process was successful or not.
But lately, I need to go back to "Browse Packages" (where the uninstalled package is still shown as installed) and run the process a second time. Only then the mod gets installed/uninstalled and the page says so.

I'm using a modified theme but this also happens with the default theme (if that is even relevant?). I'm a total noob at all of this. Do changes in the php files of individual themes affect the SMF default theme as well?

The SMF version is 2.1.2.
I can't seem to find the version of php. Under Maintenance/Server Settings/PHP_Info there's nothing there...

Doug Heffernan

Quote from: Julius_2000 on September 06, 2022, 10:38:15 AMHi eveyone.

I've run into a weird issue with the package installation section. Whenever I try to install or uninstall a package, I get a blank site after the page is reloaded again where usually the newly loaded page would show whether the process was successful or not.
But lately, I need to go back to "Browse Packages" (where the uninstalled package is still shown as installed) and run the process a second time. Only then the mod gets installed/uninstalled and the page says so.

I'm using a modified theme but this also happens with the default theme (if that is even relevant?). I'm a total noob at all of this. Do changes in the php files of individual themes affect the SMF default theme as well?

The SMF version is 2.1.2.
I can't seem to find the version of php. Under Maintenance/Server Settings/PHP_Info there's nothing there...

It is best to start a new topic about your own forum issues rather than posting in an existing one. I have split your post to create a new topic.

That being said, what was the latest modification/change to the forum prior to this happening?

Can you check your forum and server error log and see if any errors are logged in there pertaining to this?

Julius_2000

Thanks, Doug. I thought I would not clutter the forum with a new topic because there was a similar one already. Will do next time!

I'm not the host and only have access to the admin section. There, I can't find any error log, only admin/ moderation logs in the Maintenance tab


Quote from: Doug Heffernan on September 06, 2022, 11:39:22 AMThat being said, what was the latest modification/change to the forum prior to this happening?
I'm not sure what counts as modification. Only mod installation or changes to other files (like php) too?
I think the first mod I installed myself was in July, the snowflake mod. I guess it worked then because I was even less experienced then and wouldn't have known what to do.
But I also adapted some php files (mainly copy/ pasted code to switch div places in a file etc.) almost daily.

Doug Heffernan

Quote from: Julius_2000 on September 06, 2022, 12:04:41 PMI thought I would not clutter the forum with a new topic because there was a similar one already. Will do next time!

The reason I suggested is because like this it will get more attention.

Quote from: Julius_2000 on September 06, 2022, 12:04:41 PMI'm not the host and only have access to the admin section. There, I can't find any error log, only admin/ moderation logs in the Maintenance tab

Can you ask the main admin about this? It is important to see what errors are logged as they can point us in the right direction.

Quote from: Julius_2000 on September 06, 2022, 12:04:41 PMI'm not sure what counts as modification. Only mod installation or changes to other files (like php) too?

Any changes at all.

Quote from: Julius_2000 on September 06, 2022, 12:04:41 PMBut I also adapted some php files (mainly copy/ pasted code to switch div places in a file etc.) almost daily.

What code did you adapt and to which file(s)?

Julius_2000

#4
Quote from: Doug Heffernan on September 06, 2022, 12:27:43 PMCan you ask the main admin about this? It is important to see what errors are logged as they can point us in the right direction.
Will do, might take some time to get a response.


Quote from: Doug Heffernan on September 06, 2022, 12:27:43 PMWhat code did you adapt and to which file(s)?
Uff, that's quite the question :) I did so many adjustments..

Well, I mainly edited some portions of the index.template.php, Message.template, Board- and Display.template. Mostly modified/ added "id"s, classes or added HMTL elements (divs etc.) so I could address them via css.

One thing I did add to the index.template was a random_array:
$slogan=array( some slogans .... )
$random_keys=array_rand($slogan);

One time, I did edit the default theme's index.english.php in the language folder and removed the word "index" inside the string of txt['forum_index'] = '%1$s - Index'; but then figured, I could simply copy the default's php and paste it into my theme's language folder and do it there. I then restored the original default file to leave everything default untouched.

Would you need to see the edited files? Unfortunately, I didn't make any annotations of the modifications like I did in the css files




But would any changes within my indiviual theme (it's based on the Pelikan Theme) affect the Default one? I just tried replacing the index.template with the default one but the result was the same.

Edit:
I tried another browser (Edge instead of Firefox), and it tells me there's an error 500 for this attempted uninstallation of this mod:
......com/index.php?action=admin;area=packages;sa=uninstall2;package=SimpleAudioVideoEmbedder7.0.zip;pid=70

Doug Heffernan

Quote from: Julius_2000 on September 06, 2022, 01:12:46 PM$slogan=array( some slogans .... )
$random_keys=array_rand($slogan);

The first array is missing the closing semicolumn.

Quote from: Julius_2000 on September 06, 2022, 01:12:46 PMI tried another browser (Edge instead of Firefox), and it tells me there's an error 500 for this attempted uninstallation of this mod:

The 500 errors are almost everything server related. Are the mods that you are installing compatible with the 2.1.x versions btw?

Julius_2000

Quote from: Doug Heffernan on September 06, 2022, 01:35:37 PM
Quote from: Julius_2000 on September 06, 2022, 01:12:46 PM$slogan=array( some slogans .... )
$random_keys=array_rand($slogan);

The first array is missing the closing semicolumn.

Quote from: Julius_2000 on September 06, 2022, 01:12:46 PMI tried another browser (Edge instead of Firefox), and it tells me there's an error 500 for this attempted uninstallation of this mod:

The 500 errors are almost everything server related. Are the mods that you are installing compatible with the 2.1.x versions btw?

Yeah, I missed the semi-colon when I copied it in here.

And yes, I specifically installed 2.1 compatible ones. Earlier this evening, I uninstalled and deleted mods that I had setup myself just to be sure it's not one of them. No luck.

TwitchisMental

#7
Randomly throwing this idea out there for you.

I had a similar issue a little bit ago.

Except instead of a white screen, I got an error relating to not being able to backup before installing.

You could try disabling the backup before package install option and see if the problem continues.


Julius_2000

Thanks Twitch, where can I find this option?

Btw, I just removed some other themes I had installed and now it seems to work again, at least with the Tweet embed mod... weird.
Let's see what happens when I try reinstalling some of the other mods..

TwitchisMental

#9
Quote from: Julius_2000 on September 06, 2022, 02:51:15 PMThanks Twitch, where can I find this option?

Btw, I just removed some other themes I had installed and now it seems to work again, at least with the Tweet embed mod... weird.
Let's see what happens when I try reinstalling some of the other mods..
Admin CP > Main > Package Manager > Options

Uncheck both of the backup options.

If this does fix the issue,  please do not consider this as the solution.  This is just for confirmation.

Steve

Quote from: TwitchisMental on September 06, 2022, 03:22:35 PMIf this does fix the issue,  please do not consider this as the solution.
What Twitch said. You wouldn't want your site NOT creating backups when you install a mod.
DO NOT pm me for support!

Julius_2000

Hi guys,

the problem has re-emerged. Everytime I want to install/ uninstall a mod, the first time around I get a blank page. I would then have to go back one step, reload the page and run install/ uninstall again. Only then I get the regular page where it says
QuoteThe package was installed successfully. You should now be able to use whatever functionality it adds or changes; or not be able to use functionality it removes.

Redirect Now (0) | Return to Package Manager

This happens in my theme and its variants I use as well as the SMF Default one. Could there have happened something to the core/default files? Does SMF get confused when I use multiple themes based on one theme?

Julius_2000

Update:
The issue has vanished and I believe it was because of the way I had edited IndexTemplate.php for the header logo as described in my topic here: https://www.simplemachines.org/community/index.php?msg=4140507

After applying the changes I posted in the above topic, the issue does no longer occur, so I suspect it was correlated.

Julius_2000

I have to revive this thread since I've been encountering the same issue again.

When I try to first install/uninstall a mod, I would get a blank page. I would have to go back to the previous page, reload it and repeat pressing "install" or "uninstall". Then I would get either re-directed or get a static confirmation the mod was installed.

I had a look at my dev console in Firefox and the only thing I get is a "you're in compatibility mode (Quirk)..." warning when the blank page is shown. This does not appear when the mod is eventually successfully (un-) installed.

This happens no matther the theme, including the Default one. Any suggestions as to what file(s) I would need to look at?

Kindred

a blank page should generate a server side error in your server log
Сл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."

Julius_2000

The only access I have so far is to a log folder on the ftp server that the forum is on.

Therein is a file ending on .log which I can access, the rest are .bz2 files which I'm unable to open yet.

These are the entries in the error.log file (removed the IPs)

May 26 06:00:00 myForum newsyslog[15642]: logfile turned over
[Fri May 26 08:45:29.925040 2023] [proxy_fcgi:error] [pid 20497:tid 34386580224] [client ] AH01071: Got error 'Primary script unknown'
[Fri May 26 08:45:30.285488 2023] [proxy_fcgi:error] [pid 20497:tid 34386580224] [client ] AH01071: Got error 'Primary script unknown'
[Fri May 26 08:45:31.409924 2023] [proxy_fcgi:error] [pid 20497:tid 34386414336] [client ] AH01071: Got error 'Primary script unknown'
[Fri May 26 08:45:32.100568 2023] [proxy_fcgi:error] [pid 20497:tid 34386414336] [client ] AH01071: Got error 'Primary script unknown'
[Fri May 26 10:00:38.680355 2023] [proxy_fcgi:error] [pid 20497:tid 34370998784] [remote ] AH01071: Got error 'Primary script unknown', referer: http://myForum.com
[Fri May 26 17:47:18.097398 2023] [proxy_fcgi:error] [pid 20922:tid 34387332096] [remote ] AH01071: Got error 'PHP message: PHP Warning:  Array to string conversion in /usr/home/myForum/data/tweet-cache.php on line 80; PHP message: PHP Warning:  Undefined array key "html" in /usr/home/myForum/data/tweet-cache.php on line 82', referer: https://forum.myForum.com/index.php?topic=148.0
[Fri May 26 17:54:58.819125 2023] [proxy_fcgi:error] [pid 20922:tid 34411369728] [remote ] AH01071: Got error 'Primary script unknown'
[Fri May 26 19:47:18.392009 2023] [proxy_fcgi:error] [pid 20922:tid 34386573824] [client ] AH01071: Got error 'Primary script unknown', referer: http://forum.myForum.com/wp-login.php

There's nothing I can see about a blank page error.

I just tried test-installing the mod "Spoiler" In Chrome and I get a "Site is not working HTTP Error 500" after the mod should be successfully installed. Instead I get the blank page and the following address in the URL bar:
https://test.myforum.com/index.php?action=admin;area=packages;sa=install2;package=spoiler_0.3_smf21.zip;pid=0

Only when I go back and repeat the process, the confirmation page is shown as should be.

Julius_2000

Bump.

Could anyone tell what files are required for the "mod successfully installed" redirect? I tried replacing the subs.php and load.php with some fresh copies of Default but I would still get the blank page at first trial.

Diego Andrés

That would happen in Packages.php
I read a bit of the topic and seems like a server issue, maybe mod_security is enabled?

SMF Tricks - Free & Premium Responsive Themes for SMF.

Julius_2000

Hi Diego,
where would I enable/disable mod_security? In said Packages.php?

Also, today I rolled back the 2.1.4 beta version and tried replacing the Sources files with files from the 2.1.3 installation package. It didn't change this behavior, unfortunately.

Sesquipedalian

mod_security is an Apache extension. You don't configure it in SMF. You configure it in Apache's httpd.conf.
I promise you nothing.

Sesqu... Sesqui... what?
Sesquipedalian, the best word in the English language.

Advertisement: