"White Screen of Death"
Tagged: wsod intranet broken borked
24 Nov 2016 at 14:57 #2687
We’ve been using this theme for our new Intranet. Everything has been broadly fine however we’ve noticed over the last month or so that the theme doesn’t play well with our installation wordpress.
In the admin panel when we browse appearance > themes we didn’t see the govintranetmatters theme. Instead it just had the name “Template”. I tried to reinstall it but but this didn’t rectify the issue. Late yesterday the intranet stopped responding and we received the dreaded white screen of death.
I’ve enabled WP Debug mode and the site now reports the following error (I understand the first one is unimportant).
Notice: bbp_setup_current_user was called incorrectly. The current user is being initialised without using $wp->init(). Please see Debugging in WordPress for more information. (This message was added in version 2.3.) in C:\inetpub\wwwroot\intranet\wp-includes\functions.php on line 3996
Warning: require(C:\inetpub\wwwroot\intranet/wp-content/themes/Template/inc/template-tags.php): failed to open stream: No such file or directory in C:\inetpub\wwwroot\intranet\wp-content\themes\twentysixteen\functions.php on line 353
Fatal error: require(): Failed opening required ‘C:\inetpub\wwwroot\intranet/wp-content/themes/Template/inc/template-tags.php’ (include_path=’.;C:\php\pear’) in C:\inetpub\wwwroot\intranet\wp-content\themes\twentysixteen\functions.php on line 353
Things I’ve tried:
Cleared out plugins folder.
Cleared out Themes
Renamed govintranet folder to Template (looks as though it’s looking for something in there).
I’ve also tried just putting a new copy of the govintranet theme in place – no joy.
Lastly Rolled back to previous folder shadow copy.
I thought it might be the DB so I’ve installed the workbench and I am able to connect to it. Looks like the tables are there.
This is a serer 2008 r2 installation running IIS. (yes I know – it’s what we have)
Everything is fully patched.
PHP is installed and appears to work correctly.
No changes to code were performed (that I am aware of).
Happy to provide any additional troubleshooting information as required.
In the meantime I am drawing a blank. I am not entirely sure what to next, we really want to avoid starting from scratch.
24 Nov 2016 at 15:43 #2693
V4.28 contains new support for child themes, which required some changes to how directories are referenced within the theme. This update may help. You’ll need to update theme and plugin files. Files have been removed from the theme folder, so you must overwrite the theme folder to ensure old templates are removed.
You could try installing the default WordPress themes too – twentysixteen, twentyfifteen etc. as it looks like the installation is trying to default to these – just so that you can get back to the admin screen.
I managed to bodge my installation when testing the child theme updates and got WSOD too. I had to edit the wp_options table in the database and reset entries where option_name is template, stylesheet and current_theme in order to get back to the admin screen.
Let me know how you get on with the latest version.
25 Nov 2016 at 10:49 #2703
Thanks for the advice.
Forced the installation back to TwentySixteen and I’ve got the admin pages back. One thing I’ve noticed is that all of the themes are missing their name. Instead I’m seeing “Theme Name”.
I went ahead and activated govintranet – it was obvious from the picture which one it was.
I’ve checked in the wp_options table and all template, stylesheet and current_theme are all set to govintranet.
I suspect that there’s a DB issue somewhere but I am not sure what I should be looking for.
The site looks mostly ok there’s some additional plugins we use which I need to chase down and reinstall so “mostly there”!
7 Dec 2016 at 13:09 #2722
We’re still having issues here.
Got the WSOD again today. As such I’m about to force the site back to twenty sixteen again. I’ve attached an image which I hope will illustrate matters.
I’m not sure what the error is telling me. Clearly we have an issue where where a parent-child theme relationship has broken. Looking at the WP codex it suggests child themes should be in a separate folder but as I’ve not seen this behaviour with this theme can I assume that this is a red herring?
Inside the themes folder I have 4 themes:
and a dump of the govintranet-master folder from your zip.
But looking at the Themes section for the site I can only see the active theme – not a list of all themes.
What my gut tells me is that this is a DB issue but to be honest I am not sure where to start and accept I might be wrong.
fyi: the version of Govintranet we have is the version from the last time we spoke (v4.29).
Attachments:You must be logged in to view attached files.
13 Jan 2017 at 15:35 #2841
We’re really having issues here – can anyone provide a steer on my message above?
If it’s easier doing a fresh install, does anyone know of a good way to port the content without porting whatever the bad settings might be?
13 Jan 2017 at 17:36 #2842
It feels like a muddle with the theme config in the database.
You could try removing all themes except GovIntranet and installing the new TwentySeventeen theme and latest version of WordPress. WordPress should then try to default to a theme and will hopefully pick TwentySeventeen.
The latest versions of GovIntranet (4.30+) handle child themes better, so I’d recommend updating theme and plugins.
Please let me know how you get on. Do you have access to phpMyAdmin or similar?
25 Jan 2017 at 16:49 #2865
Finally had a moment to check this and get back to you.
So far so good.
Notes: NO upgrade to WP. We just stayed on our current version 4.4.6.
I downloaded the new version of your theme and Twenty Seventeen.
I deleted Twenty Sixteen.
(Admission: I didn’t realise that Twenty Seventeen required the new version of WP – oops!)
I replaced the version of Govintranet we were using and used the latest version. At the time of writing this is 4.34.
We could never get the searchform.php to work. So I’ve bodged a fix to force the search to return the correct permalink structure we’ve chosen.
25 Jan 2017 at 20:30 #2866
😁 that’s great news. Glad it worked eventually. Hopefully no data lost?
I’ll take a look at the searchform.
26 Jan 2017 at 09:07 #2867
No, no data lost! I was dreading the idea of porting the data over to a new installation.
As far as the search form is concerned:
We’re using an installation on IIS (currently running Server 2008 r2).
We have custom permalinks. (but they are nothing special)
Our intranet url would be http://intranet.domain.com.
The installation directory is \\server\inetpub\intranet
What we’re finding is that the search doesn’t truncate the returned url properly.
So I search for “ICT”, the default searchform returns intranet.domain.com/intranet/?s=ict
Rather than intranet.domain.com/?s=ict
Search is the only place we see this issue.
To fix it I dug around a little in the wordpress codex and the [useless!] wordpress forums and found that I could “force” the correct string out of PHP.
In searchform.php I found this: action=”<?php echo home_url( ‘/’ ); ?>”>
Which I changed to action=”intranet.domain.com”>
It works a treat. Although because it’s hardcoded I have to make the change if we change the theme or whatever.
We’ve also inserted our own Login link to facilitate user’s signing in.
Hope that’s of some use. Let me know if you want me to explain or expand anything.
- This reply was modified 5 months ago by Gavin McMenemy.
You must be logged in to reply to this topic.