White Screen of Death Instead of 404

Home Forums Calendar Products Events Calendar PRO White Screen of Death Instead of 404

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #942796
    affariproject
    Participant

    I 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.

    #942874
    Brian
    Member

    Hi,

    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

    #943142
    affariproject
    Participant

    The 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 62

    The 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?

    #943155
    Brian
    Member

    That 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

    #943815
    affariproject
    Participant

    Hi 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.

    #943820
    Brian
    Member

    Ok 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.

    #943824
    affariproject
    Participant

    Considering this is only happening on an events single page, do you have any recommendations on where to start deleting code to test?

    #943891
    Brian
    Member

    I 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.

    #951494
    Brian
    Member

    Since 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! 🙂

Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘White Screen of Death Instead of 404’ is closed to new replies.