Home › Forums › Calendar Products › Events Calendar PRO › Event id changes for recurring events. Need help tracking this.
- This topic has 7 replies, 4 voices, and was last updated 9 years, 3 months ago by
Tojo John.
-
AuthorPosts
-
November 29, 2016 at 10:14 am #1199257
Tojo John
ParticipantHi,
We have had the Events Calendar PRO for about a year and half now. We have noticed that every once in a while a single instance of a recurring set of events will have a new event ID (post id) after updates to the events.
this would be normally not an issue. However, we have developed a series of other features around events such as teams of people who are assigned to an event for tasks such as organization to management, as well as assigning equipment and other such things. These assignments are done as child Post-Types in our WordPress database.
When the event ID changes, the child-posts become orphaned. Each time this happened, our client’s staff freaks out and we scramble to figure out what was the last ID and what is the current and new event ID. Then we used SQL queries to update the parent event ID for all the child post-types.
We’d like a more elegant solution where we can use a hook from your plugin, so when such event ID changes occur, the system is able to detect it and use a hook to be able to run commands so we can update the child post-types with the new ID automatically without manual involvement.
We now have several new clients who have purchased your PRO license and we are doing similar implementation for all of them. This is a CRITICAL issue for all of these clients with similar use-cases.
I would really appreciate your help in figuring this out, possibly add new hooks to your plugin if one does not already exist to handle a scenario such as this.
Miah Morshed
November 30, 2016 at 9:25 am #1199842Andras
KeymasterHi Miah,
Thanks for using and promoting our plugins! And thanks as well for reaching out.
With the existing recurring events implementation, if you change the rule definition, it purges all the existing posts / event recurrences and recreates them with the new rules and new IDs. At the moment unfortunately there is no way around that. The only workaround sorta is that once you set up the rules, don’t change them.
I was checking with one of the devs what could be done.
“Only suggestion might be that they restructure their custom code and use post guids to form the bonds between child event and other-related-posts for any given instance, so long as it is recreated on the same date, the guid will remain the same.
Ie, in a super simple case where all they change is the event description, then although the child events are regenerated and will have different post IDs they can rely on the GUID remaining the same. Of course, if the pattern of recurring events changes from daily for 4 days to weekly every 2nd week until some other date, or something drastic like that, then they’d have to figure out something else.”
I hope this will help you get a solution for this.
Some more positive news is that we are going to do a big overhaul to this in version 4.5, so there is some light at the end of the tunnel.
Let me know if I can be of any more help.
Cheers,
AndrasNovember 30, 2016 at 9:48 am #1199855Tojo John
ParticipantAndras,
That is interesting. I guess I will talk to my team to see if we can tie in GUID and improve the situation. However, I would really interested to learn what new feature in 4.5 can help with this scenario.
Ideally, if your team can add a new hook (action or filter …) that we can utilize when such things happen, so we can keep the child objects (i.e. the event staff) of a recurring event continue to link to the same event after such changes.
I will keep this thread open for a little longer to allow my team to work with your recommendation.
Miah
December 1, 2016 at 8:07 am #1200279Andras
KeymasterHi Miah,
I don’t know the details how it exactly it is going to be handled as the dev team is working with full steam on the upcoming 4.4.
We can leave the thread open. We’re happy to help out if you have further questions. Please note though, that if there is no activity on the thread for 3 weeks, it will automatically be closed.
Let us know if you have any further questions.
Cheers,
AndrasDecember 16, 2016 at 8:23 am #1207070Tojo John
ParticipantAndras,
We tried to implement your recommendation of using GUID. But when we tested, we realized that any time the software re-generates events with new ID and the GUID is also changed because the GUID has date and post ID listed in it.
I will try to remember to come back and ask for this ticket to stay open.
When your team can look into this, it would be great if they can add and give us a hook that we can call when such changes happen. The hook could pass us possible matches of events where dates stayed the same but IDs changed, so we can change the IDs of our child post type objects.
Thanks,
MiahDecember 19, 2016 at 9:55 am #1207765Andras
KeymasterHi Miah,
Thanks for getting back to me on this.
Yes, unfortunately GUID also has its limitations. What you mention is true, that is what I was referring to with
so long as it is recreated on the same date, the guid will remain the same.
Hopefully, this will be solved the next release (4.4) coming out sometime in January.
Meanwhile I will try to check with the developer if he has any more ideas. Since most of the team is going to be out during the holidays, the answer is likely to come in the new year only. I’ll let you know as soon as I have something.
Cheers,
AndrasJanuary 10, 2017 at 8:35 am #1215856Support Droid
KeymasterHey 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 ‘Event id changes for recurring events. Need help tracking this.’ is closed to new replies.
