Home › Forums › Calendar Products › Events Calendar PRO › 404 Errors on non-month views (theme conflict)
- This topic has 12 replies, 3 voices, and was last updated 10 years, 9 months ago by
Support Droid.
-
AuthorPosts
-
June 20, 2015 at 9:47 pm #971674
abarragree
ParticipantJust 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!
June 22, 2015 at 5:19 am #971792George
ParticipantHey 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 here → http://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,
GeorgeJune 22, 2015 at 6:42 am #971819abarragree
ParticipantHi 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!
June 22, 2015 at 6:44 am #971820abarragree
ParticipantAlso I’d be happy to provide login credentials, if necessary.
June 22, 2015 at 7:30 am #971860George
ParticipantHey 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,
GeorgeJune 22, 2015 at 7:30 am #971861abarragree
ParticipantJust 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?
June 22, 2015 at 7:31 am #971862abarragree
ParticipantWas typing the above reply before you sent yours. Will try your suggestions!
June 22, 2015 at 7:47 am #971867abarragree
ParticipantHey 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?
June 22, 2015 at 8:14 am #971879George
ParticipantHey 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
June 22, 2015 at 8:39 am #971893abarragree
ParticipantGeorge, please see my reply above yours, responding to your 4-point suggestion (looks like you missed my subsequent replies too, haha).
June 22, 2015 at 12:56 pm #971956abarragree
ParticipantHey 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!
June 23, 2015 at 7:52 am #972190George
ParticipantHey 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 🙂
GeorgeJuly 8, 2015 at 7:00 am #984717Support Droid
KeymasterThis 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. -
AuthorPosts
- The topic ‘404 Errors on non-month views (theme conflict)’ is closed to new replies.
