Home › Forums › Calendar Products › Events Calendar PRO › 404 Error for Single Event
- This topic has 26 replies, 5 voices, and was last updated 8 years, 2 months ago by Support Droid.
-
AuthorPosts
-
January 22, 2016 at 6:53 am #1060518GregParticipant
Everything was working just fine. However I’ve upgraded to Pro and since then, the single events generate a 404 error. I’ve tried re-doing and changing permalink. No dice. Everything else works fine.
January 22, 2016 at 12:55 pm #1060714HunterModeratorGreg,
Thanks for posting to the support forums 🙂
Do you have an actual page created under “Pages” titled “Events”? If so, go ahead and delete it. Flush the permalinks again and see if the 404 is still occurring. Next, I would check this article in relation to fixing 404 errors.
Let me know if either does the trick and if not, we’ll continue troubleshooting. Thanks for choosing PRO!
January 22, 2016 at 2:09 pm #1060743GregParticipantI found the problem is with your he Events Calendar: Advance Mini Calendar Widget plugin. When this is active I get the 404. When deactivated it works fine. However I do need that because I need the widget calendar to display a specific month by default
January 25, 2016 at 11:15 am #1062038HunterModeratorHey Greg,
Sorry to hear you’re still having troubles. Would you mind sharing your System Information with me as a private reply?
Thanks for your patience and have a good rest of your day/evening!
January 25, 2016 at 12:41 pm #1062085GregParticipantThis reply is private.
January 26, 2016 at 8:12 am #1062553HunterModeratorHey Greg,
Thanks for getting back to me with your System Information. I don’t see anything that jumps out in the info. Take a look at our Testing for conflicts article. My guess is you’re experiencing a theme and/or plugin conflict.
Let me know if that helps resolve your issue. Thanks for working with me on this and have a good rest of your day!
January 26, 2016 at 4:48 pm #1062783GregParticipantHI Hunter. The error is occurring as a result of my customized theme. Switching to the default theme resolves. Disabling all the plugins does not resolve.
– any clues on where I should look?
- This reply was modified 8 years, 3 months ago by Greg.
January 26, 2016 at 6:07 pm #1062796GregParticipantThe issue is being caused by this code here in my functions.php . I’m using this code because I need to set the default date for the calendar. If I remove this code, the 404 error is resolved.
function tribe_set_default_date () {
if ( !is_single() && empty( $_REQUEST[‘tribe-bar-date’] ) ) {
$_REQUEST[‘tribe-bar-date’] = ‘2016-07-01’;
}
}
add_action( ‘parse_query’, ‘tribe_set_default_date’ );January 27, 2016 at 3:38 pm #1063436HunterModeratorWelcome back Greg,
I just tested the code on my local test environment and it seemed to work fine for me with the default Twentysixteen theme. Unfortunately I wouldn’t know where to begin with your theme conflict as I don’t have the source code and theme customizations extend beyond the scope of support we are able to offer.
I would recommend reaching out to your theme author and see if they can provide more assistance. Thanks so much for understanding and best of luck resolving the issue!
January 27, 2016 at 3:46 pm #1063439GregParticipantWell the single line of offending code is: $_REQUEST[‘tribe-bar-date’] = ‘2016-07-01’;
I’m not sure how we debug this since this is code suggested by your knowledge-base and it is conflicting with your own code!
What I’m trying to achieve with this is: for the ‘Date view (which isn’t the single page) I need it to show month view at that month since this is when the first events show up. However for some reason it is affecting the single event page (I assume it is single? Not sure how you are coding this).
Bottom line: How do I ensure that the main events page which is in month view can show the month I want without triggering the 404 for the ‘single’ event view?
January 28, 2016 at 9:47 pm #1064161BrookParticipantHowdy Greg,
Thanks for your thorough debugging thus far. I wrote that snippet you’re using, and to be frank it was quite hacky. I’m not exactly sure why it is 404ing for you and not everyone else, but I also know it could be improved and less prone to errors.
I just rewrote the snippet:
https://gist.github.com/elimn/d034dfddb9be206d9cc1
Could you try replacing the entire snippet with the new one above? If you only want it to apply to month view, note that you can now comment out the tribe_is_list_view() line and uncomment the tribe_is_month() one. Either way you probably wish to uncomment the tribe_is_month() line.
My apologies for our delayed response. Hunter was waiting all day for me to have time to rewrite the snippet.
Does that new one work better?
Cheers!
– BrookJanuary 28, 2016 at 9:57 pm #1064165BrookParticipantI wanted to double check one thing, are you using this for Month view or the Minical widget?
January 28, 2016 at 10:02 pm #1064168GregParticipantHi Brook, did you test the code you suggested? It doesn’t compile and gives me the classic WP white screen of death.
I’m using month view. Not sure what the Minical widget actually is.
January 29, 2016 at 10:05 am #1064561BrookParticipantHowdy Greg,
Thanks for getting back. Yeah the code has been tested extensively by a couple people. I wonder if you copied the opening <?php tag from the code? You typically only need one of those tags in your functions.php. It’s easiest to replace the opening <?php tag from the top of your functions.php with this entire snippet, since the snippet includes the <?php tag at the top.
I found the problem is with your he Events Calendar: Advance Mini Calendar Widget plugin. When this is active I get the 404. When deactivated it works fine. However I do need that because I need the widget calendar to display a specific month by default
You had mentioned the Mini Calendar widget earlier, that’s why I was asking about it. This snippet is designed to change the date for Month View, not the widget. Since it was untested with the widget I just wanted to double check with you.
After following the advice above does the whitescreen go away? If not, could you share a copy of your entire functions.php file?
Cheers!
– BrookJanuary 29, 2016 at 2:49 pm #1064715GregParticipant*sigh* yes of course I understand the php opener. I switched your code to ‘raw’ view and tried it again. Same problem. I guess there is some issue which is why the original line
$_REQUEST[‘tribe-bar-date’] = ‘2016-07-01’;
crashed the site.
-
AuthorPosts
- The topic ‘404 Error for Single Event’ is closed to new replies.