Home › Forums › Calendar Products › Events Calendar PRO › White Screen of Death Instead of 404
- This topic has 8 replies, 2 voices, and was last updated 11 years, 1 month ago by
Brian.
-
AuthorPosts
-
February 16, 2015 at 11:34 am #942796
affariproject
ParticipantI recently launched a new website for a client using The Events Calendar (TEC) 3.9.1. Somehow since the new site’s launch, the client stumbled across an old URL from the previous site which coincidentally uses the permalink structure for events single pages in the new site. Since there isn’t an active event at the URL they visited, you would think they hit a 404 page, but instead, they got a white screen of death (WSoD). I’ve read other posts here about the WSoD, but haven’t seen anyone describe this particular situation. I’ve confirmed it’s coming from TEC as I briefly disabled the plugin, refreshed the page, and get the expected 404 page. While there aren’t any links to old pages in the new site, we’d like to get this sorted out in case anyone else has a random URL from the old site saved somewhere.
I haven’t disabled all the plugins or switched the theme because this is a live site that’s only been up a week, but I can if that’s the only course of action to figure out what’s going on.
Thanks for the help.
February 16, 2015 at 3:53 pm #942874Brian
MemberHi,
Sorry for the issues you are having.
I can help troubleshoot this with you.
If you are getting the white screen that is most likely a fatal php error.
Please follow the steps in the WordPress Debug Codex in the Example wp-config.php for Debugging section:
http://codex.wordpress.org/Debugging_in_WordPress
Please place that coding and load a couple of the old pages and then check the error log and see if there are any errors.
Then let me know and we can go from there to resolve this.
Thanks
February 17, 2015 at 11:51 am #943142affariproject
ParticipantThe only error that comes up for the events single page is this:
PHP Notice: Undefined variable: event in /home/content/50/7552150/html/wp-content/themes/newcitychurch/tribe-events/single-event.php on line 62The code on that line is this:
echo '<p class="datetime"><strong>Time:</strong> ' . tribe_get_start_date($event, true, 'g:ia') . ' - ' . tribe_get_end_date($event, true, 'g:ia') . '<br /><strong>Date:</strong> ' . tribe_get_end_date($event, true, 'F d, Y') . '</p>';I don’t explicitly define $event in my code. I suppose I thought it was defined as part of the default $post for the single page. Could that be the problem? If so, how would I fix it?
February 17, 2015 at 1:28 pm #943155Brian
MemberThat is a notice so not sure why it would cause a white screen unless debug was turned on.
You could do a isset check on $event and if it is not set you can set it yourself in the custom template.
Here is a quick article I found on checking for a variable being set:
http://www.tuxradar.com/practicalphp/3/2/0
If you remove all the custom templates from your theme does the white screen issue go away?
Let me know.
Thanks
February 19, 2015 at 4:19 pm #943815affariproject
ParticipantHi Brian,
I fixed the $event variable notice, but I’m still getting the white screen. I did, however, break down and switch my theme to 2015 briefly. Sure enough, no white screen, so I suppose it’s something in my theme but I don’t know what. There are currently no errors being generated when I visit the offending white page or a working events single page.
February 19, 2015 at 4:27 pm #943820Brian
MemberOk thanks for the information.
Since it works in 2015, but not in your theme, the only way to find the conflict is to go through and remove coding from your theme until you can find the offending code.
Unfortunately, I do not know of any other way to get at it, if there are no errors showing.
February 19, 2015 at 5:25 pm #943824affariproject
ParticipantConsidering this is only happening on an events single page, do you have any recommendations on where to start deleting code to test?
February 20, 2015 at 5:13 am #943891Brian
MemberI would start with the functions.php or any other settings that are loaded from it.
Then go to the header.php to the main page template, to the sidebar and finally the footer.
March 27, 2015 at 8:12 am #951494Brian
MemberSince there is has not been any activity on this thread for over 2 weeks so I am now closing it. Feel free to start a new thread if you have further issues. Thanks! 🙂
-
AuthorPosts
- The topic ‘White Screen of Death Instead of 404’ is closed to new replies.
