Home › Forums › Calendar Products › Events Calendar PRO › Problem with REST API
- This topic has 8 replies, 3 voices, and was last updated 6 years, 3 months ago by Gilles.
-
AuthorPosts
-
October 3, 2017 at 10:28 am #1358465GillesParticipant
Hello,
I am experiencing a problem with the REST API. Everything was working until recently. I am running the following GET request:
GET https://wednesdaynighthop.com/wnhapi/tribe/events/v1/events?start_date=2017-10-04&per_page=10
and it works and returns multiple events, including this one:
{ "events": [ { "id": 11971, ... "status": "publish", ... "start_date": "2017-10-04 19:15:00", ... "end_date": "2017-10-04 20:15:00", ... ] }
Now I try to run the following GET request:
and I get this:
{ "code": "event-archive-page-not-found", "message": "The requested event archive page does not exist", "data": { "status": 404 } }
when it used to return events before.
Is there something I should change in the way I am making the request. As I said, this used to work since I started developing my app back in May.
Thank you for any advice you may have!
October 3, 2017 at 10:45 am #1358475GillesParticipantHello, shouldn’t the documentation for end_date say ‘Events should end before the specified date’?
start_date string (query) Events should start after the specified date end_date string (query) Events should start before the specified date
October 3, 2017 at 10:58 am #1358479GillesParticipantAre the dates supposed to be converted to UTC before being used in the query? because I see the following from wp-content/plugins/the-events-calendar/src/Tribe/REST/V1/Endpoints/Archive_Event.php:
[03-Oct-2017 17:54:02 UTC] Array ( [page] => 1 [per_page] => 10 [start_date] => 2017-10-03 17:00:00 [end_date] => 2017-10-04 17:00:00 [paged] => 1 [posts_per_page] => 10 [meta_query] => Array ( ) [tax_query] => Array ( ) [post_status] => publish )
October 4, 2017 at 3:21 pm #1359246CliffMemberHi, Gilles.
We recently discovered 1) bugs and 2) too vague of documentation, both of which I logged with our developers this week.
I’m sorry you’ve been affected by this, but I don’t want to advise you one way or the other because I’m unsure how any bug fixes would affect things.
I’ll mark this ticket as Pending Fix, which means this thread should receive a reply once the applicable fix has been released. I cannot guarantee when it will be fixed as it’s in the development team’s hands now. They need to assign it, code it, test it, and schedule it for release.
I apologize for this issue and appreciate your understanding and patience.
December 19, 2017 at 12:14 pm #1409067CourtneyMemberHey there Gilles
We’ve just released an update that should fix this bug. You can read more about it at http://m.tri.be/19tp. Please update your plugins and let us know if you are still experiencing this or if we can close out this ticket.
Note: We suggest testing updates on a staging server (https://theeventscalendar.com/knowledgebase/creating-using-wordpress-staging-site/).
Thanks
Courtney 🙂December 21, 2017 at 5:42 pm #1411381GillesParticipantThank you for letting me know. I will try it out. Is there documentation for the new tribe_events_rest_use_inclusive_start_end_dates filter?
December 22, 2017 at 8:00 am #1411620CliffMemberWe always try to document each hook with a docblock. Here is this one you’re asking about:Â https://github.com/moderntribe/the-events-calendar/blob/4.6.8/src/Tribe/REST/V1/Endpoints/Archive_Event.php#L67-L94
Please let me know if you have any follow-up questions on this topic.
January 13, 2018 at 8:35 am #1425507Support DroidKeymasterHey 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 -
AuthorPosts
- The topic ‘Problem with REST API’ is closed to new replies.