Safer snippet for fixing 404 when there are no upcoming events

Home Forums Calendar Products Events Calendar PRO Safer snippet for fixing 404 when there are no upcoming events

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #854740
    mmirus
    Participant

    A number of Events Calendar users have seen a 404 Page Not Found message included on their templates/page titles when there are no upcoming events. The support team has recommended adding this snippet (http://pastebin.com/gwm5dnFE) to your theme’s functions.php file as a temporary fix.

    In my case, this snippet fixed the 404 problem, but had the side effect of breaking (empty white page) some of the templates included in the theme I was working with (Kriesi’s Enfold theme).

    The solution, at least for me, was to slightly modify the function in the above snippet to take $template as an argument and then return it. See modified snippet here: http://pastebin.com/eDk2kC4y.

    #857718
    Brian
    Member

    Thanks for sharing that snippet and information.

    I have marked it for my own records to see if it comes up regularly.

    Let me know if you would like help on this, but it sounds like you have the solution.

    Thanks

    #885246
    John Niernberger
    Participant

    Thanks for this @mmirus, the other code didn’t work for me but this does… though insane we have to do this… 🙂

    #885248
    mmirus
    Participant

    Happy to help, @johnny_n!

    #887807
    Brian
    Member

    Thanks again for the coding mmirus.

    We are still on the look out to see if this keeps coming up, but so far we have not seen issues related to this.

    I am going to close this ticket, but if you need anything else related to this topic or another please post a new topic on the forum and we can help you out.

    Thanks

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Safer snippet for fixing 404 when there are no upcoming events’ is closed to new replies.