Home › Forums › Calendar Products › Community Events › Errors still reset the event date
- This topic has 12 replies, 2 voices, and was last updated 10 years, 1 month ago by
Geoff B..
-
AuthorPosts
-
March 5, 2016 at 1:40 pm #1085597
Sean
ParticipantWe updated to the latest versions of the plugins, but it appears that while this issue was supposed to be fixed in Community Events 4.0.6, the issue actually persists. Here’s link to the original topic.
March 8, 2016 at 10:25 pm #1086529Geoff B.
MemberHi again Karly,
You are 100% right, I was able to reproduce the problem.
It turns out the status of the bug in question is “pending smoketest”.
So it looks like the glitch is in our release’s communication :-sThank you so much for bringing this to our attention.
We apologize for the inconvenience and the good news is that it should be out soon!
Stay tuned.Best regards,
Geoff B.
March 10, 2016 at 11:45 am #1087356Sean
ParticipantThanks Geoff!
March 11, 2016 at 10:42 am #1087842Geoff B.
MemberHey Karly,
It looks like this is going to make it to version 4.07 🙂
Thank you for your patience,
Geoff B.
March 11, 2016 at 10:48 am #1087845Sean
ParticipantGreat, thanks for the good news Geoff!
March 11, 2016 at 11:25 am #1087868Geoff B.
MemberHey its me again,
I just went ahead and retested and somehow the issue is completely gone.
If you don’t mind, could you re-save your Community settings and give it another shot ?
Thank you.
Geoff B.
March 11, 2016 at 12:03 pm #1087906Sean
ParticipantI tried re-saving the settings and the issue persists.
To confirm, this has been reproduced on the Twentyfifteen theme with only Modern Tribe plugins activated.
March 14, 2016 at 11:10 am #1088563Geoff B.
MemberHello again Karly,
Thank you for trying. I am sorry this wasn’t successful on your end.
As you know, I was initially able to reproduce the issue, but after re-testing (at our product manager’s request), the issue was completely gone. So I guess the good news is that it’s possible to fix!
Full disclosure, I do a lot of plugin deactivation and reactivation (among other things) so pinpointing how I managed to get it to work might require some back and forth. Thank you once again for your patience.
If re-saving the settings did not cut it and you are operating with Community Events 4.06 as well as version 4.07 of the Events Calendar and the Events Calendar Pro, then if you don’t mind, I would recommend trying the following:
- Deactivating and reactivating our plugins
- Reinstalling with fresh files the latest versions of these 3 plugins
- Re-saving the permalinks
I wish I had a better reply for you, but for now it’s the best one I have.
Mostly, I would really want this to work on your end as well.Thanks again,
Geoff B.
March 14, 2016 at 3:05 pm #1088813Sean
ParticipantHi Geoff,
I tried retesting and, like you, I was unable to reproduce this on a default theme with no customization’s. So that leaves both of us befuddled as to why it occurred on a “clean” installation before but isn’t occurring now! Needless to say this was a bit frustrating. But in any case, after much more testing on my own “custom” site, I found there appears to be an incompatibility with the latest release and this snippet:
// Set edited Community Events to return to pending status after edit. This was also a fix for the default status of submitted events in a 3.X release add_filter( 'tribe_events_community_sanitize_submission', 'set_community_events_publication_status' ); function set_community_events_publication_status( $submission ) { $submission['post_status'] = 'pending'; return $submission; }With that in functions.php, the date is reset after errors are returned. Removing it allows the date to correctly be retained after an error is returned. This was surprising, as I can’t think of any reason why the status of the post would be effecting the date fields (especially as no other fields are being reset). Any ideas why this is happening and how it could be resolved?
Thanks and have a good night,
KarlyMarch 15, 2016 at 2:30 pm #1089359Geoff B.
MemberHi Karly,
Yes indeed, I have no explanation for this whatsoever. I’m usually good at figuring that type of stuff out, but here I’m just completely baffled.
I am totally with you with the frustration aspect of this. I am very sorry about the wasted time on that topic.
As per your question in regards to the conflicting snippet, I believe it’s a timing / sequence issue. In other words, the snippet breaks the process before the event date is “saved”.
I will have to bring this one up with our Dev team to see if we cannot find a workaround for it.
Have a great evening!
Geoff B.
March 16, 2016 at 11:35 am #1089856Geoff B.
MemberHello again Karly,
As promised, I followed up on this topic.
To make a long story short, the post status is involved in the process of “retaining” the date when there is an error.
In other words, for the dates to be kept, the code is looking for the “auto-draft” status (which is nowhere to be found in the case of editing an existing event). As such, the code reverts to whatever date was saved before.
A workaround for this would be to make it look as if the post status is pending, even if it isn’t. Here’s a snippet (that might need refinement) to do just that.
add_filter( 'tribe_events_community_sanitize_submission', 'set_community_events_publication_status' );
function set_community_events_publication_status( $submission ) {
// Set the post status to pending *unless* this is a new event
// (in which case we should rely on whatever is configured via
// Events > Settings > Community)
if ( 'auto-draft' !== $submission['post_status'] )
$submission['post_status'] = 'pending';
return $submission;
}Let me know how that goes.
Best regards,
Geoff B.March 17, 2016 at 9:44 am #1090352Sean
ParticipantHi Geoff,
Thanks for following up on this and thanks to the dev team as well for this suggested modification to this snippet. I tested it out and…it works perfectly! So thank you very, very much again for helping get a resolution for this problem. As always, 5 star customer support all around!
Kind regards,
KarlyMarch 18, 2016 at 10:57 am #1091102Geoff B.
MemberGood afternoon Karly!
I’m so happy this worked for you.
The credit totally goes to our awesome Dev staff and to your legendary patience and understanding.
I will be closing this thread for now.
Have a good week-end,
Geoff B.
-
AuthorPosts
- The topic ‘Errors still reset the event date’ is closed to new replies.
