Recurring Events (See all) link shows events all out of order.

Home Forums Calendar Products Events Calendar PRO Recurring Events (See all) link shows events all out of order.

Viewing 15 posts - 1 through 15 (of 21 total)
  • Author
    Posts
  • #1272441
    Natasha
    Participant

    We have a calendar at http://sebastopolcalendar.com/events/ and are using the recurring events feature.

    The recurring events (See all) link is showing the events all out of order (see attached and http://sebastopolcalendar.com/event/open-mic-night/all/) I’ve tested with all other plugins turned off, and with Twenty Seventeen theme on my local install, with the same result.

    See attached for the recurring settings.

    We are on WP 4.7.4 and Events Calendar 4.4.5 (4.4.6 on my dev site is having the same issue).

    #1273555
    Geoff B.
    Member

    Good afternoon Natasha and welcome back!

    Thank you for reaching out to us.

    We are sorry to hear about the order of events being quite chaotic on your “See all” page.
    I would love to help you with this topic.

    The good news is that I have not been able to reproduce the issue on my end.
    That means it should totally be possible to fix this.

    I understand you have already performed some troubleshooting, but I would like to leave no stone unturned.

    Could you please send me a copy of the latest version of your WordPress theme / child theme via a link to a .zip file link (stored Dropbox or Google Drive) so that I can run some tests on my end ? I recommend a private reply for that purpose.

    Please ensure you are using the latest files as found on your actual website.
    This way I will get access to any updates or customizations you might have made.

    Additionally, could you try:

    1. Making sure ALL cache is disabled and flushed while testing
    2. Re-saving the recurring event series

    By the looks of it, there seems to be a function that is overriding the order of the posts on that page.

    Hang in there!

    Geoff B.

     

    #1276921
    Natasha
    Participant

    This reply is private.

    • This reply was modified 9 years ago by Natasha. Reason: Adding resaving event to the list of debugging actions
    #1277093
    Geoff B.
    Member

    This reply is private.

    #1277095
    Natasha
    Participant

    Thank you Geoff.

    I’m cc’ing Ben Klocek who is the genius behind all of this. He can set you up. I just pay the bills. 😉

    #1277797
    Geoff B.
    Member

    Good evening Natasha,

    Awesome.
    Let me know when he does so that we can find out the root cause of this.

    Have a great day!

    Geoff B.

    #1278170
    Natasha
    Participant

    This reply is private.

    #1278402
    Geoff B.
    Member

    This reply is private.

    #1278906
    Geoff B.
    Member

    This reply is private.

    #1280368
    Natasha
    Participant

    Hi Geoff,

    Thanks for following up. For your questions:

    1. No functions were carried over when I switched to Twenty Seventeen theme. I had disabled each function to test in our custom theme, but wanted to be sure, so tested with 2017.
    2. In the local/testing environment, the caching plugin is disabled.
    3. Yes, the events in question were re-saved.

    As for your second post with potential causes.

    1. We are on an apache server with BlueHost.
    2. I suspect this might be the cause of our issue.

    So to clarify your temporary solution: Go through each event in the series and edit them individually to change the post_date to match the event_date?

    I’ll see what we can do. FWIW, it would be good to have a hook or function that allows us to turn off the recurring feature until this is fixed. We’re using Community Events, and with recurring events, that’s a whole lot of admin work to manage if our community has access.

    Thanks for digging into this.

    • This reply was modified 8 years, 11 months ago by Natasha.
    #1281452
    Geoff B.
    Member

    Good evening Natasha,

    Thank you for writing back and answering my follow-up questions.

    So to clarify your temporary solution: Go through each event in the series and edit them individually to change the post_date to match the event_date?

    I realize it is not a great workaround, but I am pretty sure it will work.

    If anything, you could at least try with one event to see if that helps.

    Other than that, you could also automate this slightly by using either a snippet or a plugin.
    In both cases, I recommend a database backup beforehand:

    1. https://wordpress.stackexchange.com/questions/127043/change-the-post-time-on-multiple-posts
    2. https://wordpress.org/plugins/post-date-time-change/

    FWIW, it would be good to have a hook or function that allows us to turn off the recurring feature until this is fixed. We’re using Community Events, and with recurring events, that’s a whole lot of admin work to manage if our community has access.

    That is a great point. Let me ask our coding ninjas about this.

    Best regards,

    Geoff B.

    #1282424
    Geoff B.
    Member

    Good afternoon Natasha,

    I am still waiting for a hook.

    But in the meantime, you could totally cheat with CSS.

    Try adding the following CSS rule to your style.css file or in your Custom CSS metabox:

    .tribe_community_edit .recurrence-row {display: none !important}

    Let me know if that helps.

    Have a great day!

    Geoff B.

    #1282474
    Natasha
    Participant

    Hi Geoff,

    Ben Klocek is my go-to guy for this. I’ve been forwarding him all your emails. Fine to keep going through me. He will be the one to set the hook, so to speak.

    😉

    #1282578
    Natasha
    Participant

    Hi Geoff,

    We’ve added a function on ‘save_post’ that is working for making ‘post_date’ match ‘_EventStartDate’ initial event, but it’s hanging when trying to update the recurring events and not updating their post_dates.

    /**
     * Upon save, make sure the post_date matches event_date
     * @param  integer $post_ID
     */
    add_action( 'save_post', 'sebcal_post_date_match_event_date' );
    function sebcal_post_date_match_event_date( $post_ID ){
    
    	//if its not a tribe_event type, get out.
    	if ( Tribe__Events__Main::POSTTYPE != get_post_type( $post_ID ) ) return;
    
    	//get event_date
    	$event_date = get_post_meta( $post_ID, '_EventStartDate', true );
    	$event_dateUTC = get_post_meta( $post_ID, '_EventStartDateUTC', true );
    
    	//set post_date to match event date
    	$newDate = array(
    		'ID' => $post_ID,
    		'post_date' => $event_date, // [ Y-m-d H:i:s ]
    		'post_date_gmt' => $event_dateUTC // [ Y-m-d H:i:s ]
    	);
    
    	//unhook this function, so we don't get infinite loop on save
    	remove_action( 'save_post', 'sebcal_post_date_match_event_date' );
    
    	//run the update
    	$result = wp_update_post( $newDate, true );
    
    	//re-hook this function
    	add_action( 'save_post', 'sebcal_post_date_match_event_date' );
    }
    #1282598
    Natasha
    Participant

    I got it to work, I think it was just taking a minute for the cron to run.

    But, shucks, that solution won’t work either. When the post date is changed to one in the future, it ends up as a ‘Scheduled’ post and not visible on the front end.

Viewing 15 posts - 1 through 15 (of 21 total)
  • The topic ‘Recurring Events (See all) link shows events all out of order.’ is closed to new replies.