• Resolved akinschris

    (@akinschris)


    Two things happened with the most recent update:

    1. WP query for future events stopped working. It wouldn’t load events at all. I downgraded to an older plugin so that it works as intended.

    I queried “tribe_events” and used a meta query to find “_EeventEndDate” that is greater than the current date/time – ‘Y-m-d H:i:s’. That worked great until the most recent update.

    2. The most recent update also started lumping the events into regular posts, which I absolutely don’t want to happen.

    For background, I’m using Oxygen Builder to build/design repeaters that load posts.

    Were the changes intentional?

Viewing 15 replies - 1 through 15 (of 22 total)
  • I had the same problem.
    I was really annoyed to see event posts in all custom post archives, including regular posts.
    I reluctantly downgraded the version to 6.0.1.1.
    I hope the problem is resolved.

    Same. I use Beaver Builder and it won’t recognize events in the query. Had to revert to 6.0.1.1
    Hoping there is a fix soon.

    Plugin Support Abz

    (@abzlevelup)

    Hi @nixonnotes @akinschris @compassatsugi, sorry to hear about this. Since there’s customization here, I’m curious if could you share the payload with the query, seems to be isolated and I’d like to replicate the issue here. Moreover, any stack trace/error logs would definitely help as well.

    I would also check with our team regarding the behavior and if we did some changes to it. For now, I’d recommend downgrading to the previous version of the plugin.

    Looking forward to helping you with this one.

    Best,
    Abz

    Same issue here, events showing up in regular post queries, like WP Recent Posts widget.

    Thanks for your response @abzlevelup
    I’ll try to look at any errors tomorrow. I can’t really put time into troubleshooting right now. I reverted to 6.0.1.1. It works fine. So something in the latest version changed how it pulls in the query and seems to have lumped it in with regular posts.

    Since we (on this thread) are using different pagebuilders/setups, I would say it isn’t our setups, but the query itself. If there is a fundamental change in how the plugin works, then we’ll need to petition all of our pagebuilder plugins to change their connections.

    Hoping it’s just a simple fix! Thanks!

    Plugin Support Abz

    (@abzlevelup)

    Hi @akinschris, I’m curious if it is a typo with _EeventEndDate should be _EventEndDate. Could you try and try it out with the correct syntax?

    Let me know how it goes.

    Best,
    Abz

    Plugin Support Abz

    (@abzlevelup)

    Hi @wimbommerez, sorry to hear about this. We’d be updating everyone in this thread whenever there are updates.

    Hi @nixonnotes, thanks for confirming. To be safe, we’d recommend conducting tests and updates on a Staging Server. Also, please keep a working backup of your website.

    We appreciate more information here, for now, we suggest downgrading to v6.0.1.

    Again, apologies for the inconvenience.

    Best,
    Abz

    Thread Starter akinschris

    (@akinschris)

    @abzlevelup yes, that was an error when I wrote the post. I did mean _EventEndDate and that’s what I put in the query.

    The issue is: the query won’t load tribe_events.

    I would query all published posts that are tribe_events and display only those with _EventEndDate greater than the current date and time, ie, all future events.

    The problem was: the query wouldn’t pull the tribe_events posts at all. They were instead being placed into the regular posts which is something I didn’t want.

    • This reply was modified 1 year, 5 months ago by akinschris.
    • This reply was modified 1 year, 5 months ago by akinschris.

    Definitely seems to be a bug in 6.0.2. You can replicate with a simple WP_Query in a shortcode:
    https://gist.github.com/crawford252/5f5630a8b49e5a77e077bef82a15263e

    Prior to 6.0.2, this query would run without issue. After 6.0.2, it produces a MySQL error:

    WordPress database error: [Unknown column 'date' in 'order clause']
    SELECT SQL_CALC_FOUND_ROWS wp_posts.ID FROM wp_posts INNER JOIN wp_tec_occurrences ON wp_posts.ID = wp_tec_occurrences.post_id WHERE 1=1 AND ( wp_tec_occurrences.post_id IS NOT NULL AND CAST(wp_tec_occurrences.end_date AS DATETIME) >= '2022-10-28 16:30:30' ) AND ((wp_posts.post_type = 'tribe_events' AND (wp_posts.post_status = 'publish' OR wp_posts.post_status = 'tribe-ea-success' OR wp_posts.post_status = 'tribe-ea-failed' OR wp_posts.post_status = 'tribe-ea-schedule' OR wp_posts.post_status = 'tribe-ea-pending' OR wp_posts.post_status = 'tribe-ea-draft'))) GROUP BY wp_tec_occurrences.occurrence_id ORDER BY date DESC, CAST(wp_tec_occurrences.start_date AS CHAR) ASC, post_date ASC LIMIT 0, 10
    
    WordPress database error: [Unknown column 'date' in 'order clause']
    SELECT wp_posts.ID FROM wp_posts INNER JOIN wp_tec_occurrences ON wp_posts.ID = wp_tec_occurrences.post_id WHERE 1=1 AND wp_posts.ID IN (407) AND ( wp_tec_occurrences.post_id IS NOT NULL AND CAST(wp_tec_occurrences.end_date AS DATETIME) >= '2022-10-28 16:30:30' ) AND wp_posts.post_type = 'tribe_events' AND ((wp_posts.post_status = 'publish')) GROUP BY wp_tec_occurrences.occurrence_id ORDER BY date DESC, CAST(wp_tec_occurrences.start_date AS CHAR) ASC, post_date ASC LIMIT 0, 1 

    I also had events being lumped in with my regular posts, and had to revert to 6.0.1.1 to correct that issue.

    A followup – I fixed my events being thrown into other loops issue by upgrading back to 6.0.2, and then going into Events > Settings and unchecking Include events in main blog loop.

    @shedonist
    Thank you for your comment.
    I tryed to uncheck “Include events in main blog loop” and update to ver.6.0.2, then the issue has been resolved.

    @shedonist @compassatsugi This is interesting. Didn’t work for me. Also, my settings box to “include in main blog loop” was already unchecked. Yet they still appear in the main blog loop when I update to 6.0.2

    So I’m holding onto 6.0.1.1 until the next update.

    @abzlevelup Thanks for offering advice. Staging sites are already my practice.

    Plugin Support Abz

    (@abzlevelup)

    Hi everyone, could you try updating to v6.0.3 and see if that fixes the issue? To be safe, we’d recommend conducting these tests and new updates on a Staging Server. Also, please keep a working backup of your website.

    Let me know how it goes.

    Best,
    Abz

    @abzlevelup Sorry for the delayed response. No change for me after updating to 6.0.3
    Everything is still being lumped in with the main posts query.

Viewing 15 replies - 1 through 15 (of 22 total)
  • The topic ‘WP Query for Future Events Not Working and Events Loading in Regular Posts’ is closed to new replies.