Draft events showing in calendar

Home Forums Calendar Products Events Calendar PRO Draft events showing in calendar

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #976235
    Christal Glover
    Participant

    Just updated The Events Calendar and Events Calendar Pro to 3.10.1 from 3.9.3 and noticed that draft events are showing in the calendar. It only seems to happen when the calendar is loaded via AJAX.

    To see it happening, go to https://jewishlouisville.org/community-calendar/. Make note of the two events occurring on July 26th. Navigate to August by clicking the link beneath the calendar. July 26th now has an extra event displaying: ‘“Fun in the Summer” at Adath Jeshurun’. This is an event that is still in draft status. Clicking the link will result in a 404 error, if not logged in.

    If you reload the page you are now on (https://jewishlouisville.org/community-calendar/2015-08/), the draft event no longer shows on July 26th.

    #976269
    Brian
    Member

    Hi,

    Sorry for the issues with this. I can help out here.

    I created a draft event on my test site and was able to recreate the bug as your site shows.

    So it looks like there is a bug in the Month View for this. I tested on the other views and it does not happen there.

    I have created a bug ticket for us to address hopefully in the 3.11 release, but I am not sure what release it will be in right now.

    Let me know if you have any follow up questions.

    Thanks

    #976278
    Christal Glover
    Participant

    Brian,

    Thanks for the quick reply. Am I able to track the bug ticket you opened?

    #984413
    Brian
    Member

    Hi,

    Unfortunately, the bug ticket system is an internal system and not accessible to the public.

    This thread has been added to the bug ticket and we will update it once we have the fix included in a release.

    I do not have any other updates on it today.

    #984914
    Brian
    Member

    Hello,

    We have a fix ready for the next release.

    If you need the update in the meantime you can look to replace the month.php file.

    This link* has the updated coding and location to fix this issue.

    Let me know if that fixes the issue for you.

    Or 3.11 should be out in a couple weeks here, but I do not have a timeline to give on that and it could be delayed.

    Thanks

    *link removed by support as it might not work on all installs and could create more problems.

    #986268
    smcm
    Participant

    Hi Brian,

    I came across this topic when I noticed my draft events were showing in month view. I applied the patch to our dev site, and it just broke the view (http://dev.smcm.edu/events/calendar/month/). I am a pro customer… is there a file that I need to patch in that plugin.

    Thanks,
    Chris

    #986328
    Brian
    Member

    Hi Chris,

    Ok not sure what the issue is, it could include other functions for the next release that breaks it. I removed the link just in case.

    Instead in this file:

    the-events-calendar/src/Tribe/Template/Month.php

    Around line 159 replace this:

    // get all the ids for the events in this month, speeds up queries
    $this->events_in_month = tribe_get_events( array_merge( $args, array(
    'fields' => 'ids',
    'start_date' => $this->first_grid_date,
    'end_date' => $this->final_grid_date,
    'posts_per_page' => - 1,
    ) ) );

    With this:

    $args = array_merge( $args, array(
    'fields' => 'ids',
    'start_date' => $this->first_grid_date,
    'end_date' => $this->final_grid_date,
    'post_status' => array( 'publish' ),
    'posts_per_page' => - 1,
    ) );

    if ( is_user_logged_in() ) {
    $args['post_status'][] = 'private';
    }

    $args = apply_filters( 'tribe_events_in_month_args', $args );

    Let me know if that fixes the issue.

    Cheers

    #987457
    smcm
    Participant

    Hi Brian,

    Thanks for the quick response… and apologies for my delay.

    I tried the code and now I just and empty month view… but I just noticed when I reverted back to the original file, that the draft events are only showing in month view when I am logged in. So maybe this is a feature. Either way, this is not really a problem for me. The public does not log into my calendar site. So I am all set to wait on 3.11. Thanks for your help.

    Chris

    #987468
    Brian
    Member

    Thanks for the update.

    3.11 should be out in a week or so.

    For now this is nothing more we can do here and I am going to close this thread. We will update once 3.11 is out.

    Cheers.

Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘Draft events showing in calendar’ is closed to new replies.