Tribe__Events__Query::filter_args() removes post_parent=0 query argument

Home Forums Calendar Products Events Calendar PRO Tribe__Events__Query::filter_args() removes post_parent=0 query argument

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1585816
    gmredhotarts.com.au
    Participant

    Hi there,

    I found a bug in the Tribe__Events__Query::filter_args() function which is used by Tribe__Events__Query::getEvents() which is used by tribe_get_events().

    I’m using tribe_get_events() function to get some specific events and when I set ‘post_parent’ => 0 query argument in order to NOT return recurring child events, the argument is removed by the ::filter_args() function and I receive ALL recurring event instances. This is due to a wrong usage of empty() in ::filter_args() on the line 1206 of /the-events-calendar/src/Tribe/Query.php.

    It removes ‘0’ value too. The only workaround I managed to figure out was to pass ’00’ – i.e. ‘post_parent’ => ’00’. That seems to be working as WP_Query seems to interpret it correctly as 0.

    Could you please fix this?

    Thanks

    #1587095
    Andras
    Keymaster

    Hi Cy,

    Thanks for reporting that. I will forward your message to our developers and they will take a look at it.

    Is there anything else I can help you with?

    Cheers,
    Andras

    #1603157
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

    #1637208
    Victor
    Keymaster

    Hi There!

    Just wanted to share with you that a new release of our plugins is out, including a fix for this issue 🙂

    Find out more about this release → https://theeventscalendar.com/maintenance-release-for-the-week-of-30-september-2018/

    We apologize for the delay and appreciate your patience while we worked on this.

    As always, we suggest to setup a dev/staging site so you can make all plugin updates without disrupting the live site.

    Please update the plugins and see if the fix works for your site. Don’t hesitate to open a new topic if anything comes up.

    Best,
    Victor

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Tribe__Events__Query::filter_args() removes post_parent=0 query argument’ is closed to new replies.