Posted: June 12, 2018 at 8:24 am
|
Hi there, I posted a while back about my site not returning EE_Event data when retrieving post information: https://eventespresso.com/topic/cant-create-instance-of-ee_event-since-update/ I haven’t managed to revolve this but have narrowed it down to being related to the calls being made via an Ajax request. If I run the below code normally within a pageload it runs fine and extends the post object to include the EE_Event object.
But if I call the same code via an Ajax request using WordPresses admin-ajax.php functions it isn’t including the EE_Event object. This used to work prior to the last update. My Javascript is:
And my callback function fails even if I just run:
Any ideas on why this may be? Really appreciate the help and sorry about the long delay in response, been away for a few weeks and only just picked this up again. All plugins and WordPress are up to date. Thanks Damian |
Hi Damian, I’m not sure the problem would be with the JavaScript code, but it might help if you can post the contents of the form code into a gist and post a link here so we can investigate further. Before you do that though, you might try adding this just before you call
|
|
|
Hi Josh, I have tried the callback as:
Still returning the post data with no event object. Is that what you meant? I will see if I can set up a jist with the concept. If it helps the live site code is here STS First Aid The test site is using the same forms, the form is the quick course search found under the slideshow. The updated event espresso I am working on isn’t live yet, it’s on my local machine. Only differences are that the plugins and wordpress core have been updated on my test site. Thanks for your help. |
Hi Damian, I’ve reproduced this using Debug Bar Console running the code you posted above:
As you mentioned, in the current version of EE no EE_Event object is returned so I’ve created a ticket for our developers to investigate this further. |
|
|
Thanks Tony, appreciate you guys taking the time out to look into it for me. Do you know roughly how long this type of thing takes to develop a patch for? We currently can’t update to the latest version as it breaks some of our site features. Not putting pressure on just wanted to know so that I can plan accordingly. |
Hi Damian, Whilst I can’t give you a timeline currently, I can tell you that a developer has investigated the problem and has some changes that are currently under review, once reviewed (if approved) it will go out for testing and be merged into master ready to be included in the next release (as long as no issues are found with the changes). I can send you a copy of the fixed branch if you’d like to test the changes? |
|
|
Hi Tony, Yes please, this would allow us to patch it in the mean time. Thanks for the update. |
The branch can be download from Github: https://github.com/eventespresso/event-espresso-core/tree/BUG/event-object-ajax-requests |
|
Update: Event Espresso 4.9.64.p was released today and it includes a fix for the issue you reported here. |
|
|
Perfect, thanks for the support guys. |
You’re most welcome, please do let us know if you run into any further problems. |
|
The support post ‘Ajax request return data doesn't include EE_Event information in post data’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.