Help Desk

WP API ignoring date when Elastic Events plugin enabled

  • Posts: 46 Topics: 19
    | Permalink

    I have a PHP script on a sister website that grabs data from my events site via the WordPress REST API. I’ve discovered that after I enable the Elastic Events plugin, my start_date parameter is being ignored. Example URL request:

    http://example.com/wp-json/tribe/events/v1/events/?per_page=5&start_date=2018-08-13%2008:00:00
    Posts: 46 Topics: 19
    | Permalink

    In addition, I also get the same behavior when using the tribe_get_events() function.

    Posts: 11242
    | Permalink

    Hi. Thanks for your detailed messages.

    I checked with the team and others using Elastic Events haven’t reported this, and we’re not experiencing it within our own usage of it.

    Therefore, since this isn’t currently a confirmed issue, I’d suggest following these recommended troubleshooting steps for your own site:

    There might be some new updates available. Could you please make sure all your Modern Tribe plugins (and WordPress core) are at their latest versions?

    Once you verify you’re on the latest versions, please test to see if the issue is still happening for you.

    You might also see if you can spot any console errors at your site. (If needed, you may reference our KB article Using Google Chrome Developer Tools.)

    Whenever troubleshooting, it’s best to enable WP_DEBUG and WP_DEBUG_LOG (which will create a file on your server at /wp-content/debug.log if there are any WP_DEBUG messages) and share any debug messages you see while trying to replicate this issue and doing other things on your site relevant to this ticket (such as visiting your site’s home page, events page, single-event pages, and anything else you can think to do).

    If there’s nothing obvious (such as a console error or WP_DEBUG message) pointing you to what might be the problem, please follow our Testing for Conflicts Guide (basically switch to Twenty Seventeen theme and deactivate all plugins and custom code other than Modern Tribe plugins) and see if that helps narrow down the cause of this.

    Note that https://wordpress.org/plugins/plugin-detective/ may prove helpful as well. (third-party, not guaranteed or supported by us)

    Of course, we always recommend restorable database and file backups as well as performing modifications first on a staging site before modifying anything on your live/production site.

    If you still need assistance with this, please share (or re-share) your System Information (while in Testing for Conflicts Mode) in a Private Reply.

    That will give me a lot of extra information to help troubleshoot this.

    Let us know what you find out.

    Thanks.

    Posts: 11242
    | Permalink
    Correct Answer

    Well, scratch that… we were able to replicate it.

    Turns out we had to re-setup and index the site to fix.

    Solution via WP-CLI (deletes index and rebuilds it):

    wp elasticpress index --setup

    I’ve been told that it’s not a bug with our plugins or this extension, just a general data bug.

    Please let me know how this goes for you.

    Posts: 65
    | Permalink

    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

    | Permalink