404 Errors on non-month views (theme conflict)

Home Forums Calendar Products Events Calendar PRO 404 Errors on non-month views (theme conflict)

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #971674
    abarragree
    Participant

    Just implemented a clean install of WordPress (about two days ago) with the Theme.Co X theme (Integrity stack: theme.co/x/demo/integrity/1/)). Installed EC Pro 3.10. Getting 404 errors for non-month views. For instance, domain.com/calendar works, but domain.com/calendar/list displays differently: it shows the event list, but is showing “not found” content above it. It’s apparently a theme-related issue, because 2015 theme doesn’t show the 404s.

    Any idea how to go about troubleshooting this? I tried to use the “testing for conflicts” link on here, but it gave me a 404 error (ironic, ha). Thanks!

    #971792
    George
    Participant

    Hey Mark,

    Sorry you’re having trouble here! You describe your 404 behavior as follows:

    it shows the event list, but is showing “not found” content above it.

    I checked out your site, and went to the list page that you mentioned – here’s a screenshot of what I found → https://cloudup.com/cQ36MC2xlaY

    The good news is that that page is only partially broken. I say “partially” because the little text box saying “There were no results found.” is display correctly – there indeed do not seem to be events within the time range to display, which causes The Events Calendar to return that text and this is working properly.

    However, The Events Calendar returns a 404 error status for pages like this, where no events are located. And so if a theme has a 404.php file template, which yours seems to have, then that template will be displayed when a no-events-found page is loaded. This is where the “Oops!”-style text comes from on your /calendar/list page.

    To fix this, we have a great, simple little plugin that will still preserve the “No events found” text, but will change the status headers to 200 status, thus preventing the 404 error and, hopefully, the loading of your “Oops”-style page template in cases like this one.

    You can download that plugin for herehttp://m.tri.be/no404s

    Install it and activate it, and then go to Settings > Permalinks in your admin. Click “Save Changes” without actually changing anything, which is a little WordPress “trick” to refresh the permalinks across your site, and then try out that list page again and see what you find. Hopefully that “Oops!” text goes away 🙂

    Let us know if that helps!

    Thanks,
    George

    #971819
    abarragree
    Participant

    Hi George, thanks for the reply!

    So I gave your method a try, and it didn’t work. I installed the plugin, activated it, and refreshed my permalinks (and cleared the cache)…but nothing!

    Any idea what could be going wrong? URLs such as mydomain.com/calendar/list still throw the 404.

    Thanks!

    #971820
    abarragree
    Participant

    Also I’d be happy to provide login credentials, if necessary.

    #971860
    George
    Participant

    Hey Mark,

    Sorry that didn’t help. I’m curious about a few things from here:

    1. What method are you using to change the default /events/ slug to /calendar/ ?

    2. Does un-doing the method for Question #1 here temporarily, so that your site uses the default /events/ slug affect any of this behavior? (Tip: Be sure to do the “Save Permalinks” trick again after disabling whatever modification you made for #1).

    3. If doing #2 does not help this issue – What other plugins do you have on your site? If you deactivate them one at a time, and check on this issue after each deactivation, does any of the behavior change? (Exclude The Events Calendar itself from this process, of course 🙂 )

    4. If doing #3 does not help here – what if you leave all of these non-Events Calendar plugins deactivated, and then activate a default theme like Twenty Twelve on your site? If you do that and then the “Save Permalinks” trick once more, does anything change with this behavior?

    Thank you for your patience with this! These questions here should help us a ton.

    Cheers,
    George

    #971861
    abarragree
    Participant

    Just tested in Google Chrome. I can confirm that the plugin is at least fixing the error codes. Without the plugin, the Developer console throws the 404. When activated, the response code is 200. Yet, the theme still thinks it’s a 404?

    FWIW, the theme has a php file that contains the following code:

    <?php elseif ( is_404() ) : ?>
    
    ...say "Oops, you blew up the internet....

    I can remove the code entirely, but that would mean bypassing it for ALL 404 pages (bad). Perhaps I could add some conditionals here for ECP stuff only?

    #971862
    abarragree
    Participant

    Was typing the above reply before you sent yours. Will try your suggestions!

    #971867
    abarragree
    Participant

    Hey George, here’s my rundown:

    1. I’m simply changing the slug in Events > Settings

    2. Changing the slug back to its default did not change the behavior.

    3. Deactivated all plugin. No change.

    4. Twenty Fifteen theme works as intended. (“Events not found” does not trigger a 404, though an attempt to access a bogus URL returns a proper 404.)

    Please see my above reply. Is there anything I can do to remedy this?

    #971879
    George
    Participant

    Hey Mark,

    Looks like our replies here came in at just about the same moment, ha! See my post above yours here about testing in Google Chrome, and run through those questions I listed there. That should some helpful info here, though you’re right that we can disable the is_04 check in your theme as a “last resort” sort of thing if nothing else works.

    Thanks for your patience with this issue, cheers!

    — George

    #971893
    abarragree
    Participant

    George, please see my reply above yours, responding to your 4-point suggestion (looks like you missed my subsequent replies too, haha).

    #971956
    abarragree
    Participant

    Hey George. Follow up question (especially if you don’t see any other solution ahead), are there any conditionals I can place with the is_404() method? I was wondering if there’s something like an is_event() that would trigger for any EDC related content. If not, any other ideas on some conditionals I could use?

    Thanks!

    #972190
    George
    Participant

    Hey Mark,

    Apologies for the delayed response – your idea about adding additional conditionals to the is_404() check is exactly my thinking, too, and hopefully will work here.

    Something like this might help:

    
    if ( is_404() && ! tribe_is_month() && ! tribe_is_week() ) {
    
    }
    

    Now, this conditional might not look super neat and clean, but in theory it should work quite well. We have conditionals for all of the calendar views, in the same patterns as the Month- and Week-view conditionals shown above – you can see a list of them here: https://gist.github.com/jo-snips/2415009

    Use as many of those conditionals as you need here in the same pattern as above, and it should work quite well. I’m sorry that this is the best solution that comes to mind, but it’s odd that your theme is handling this so stringently (as evidenced by the fact the 2015 did not…)

    Let us know if adding conditionals helps at all!

    Thanks, and thanks for your patience while we dug into this issue 🙂
    George

    #984717
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 13 posts - 1 through 13 (of 13 total)
  • The topic ‘404 Errors on non-month views (theme conflict)’ is closed to new replies.