Events revert to Draft on update
-
Hi Events Manager Team,
We’re experiencing an issue after updating to Events Manager 7.3.7.4. Issue
When updating an existing published event, the event is automatically changed back to Draft. Investigation
We traced the issue to the following validation in
EM_Event::validate_meta():if ( !$this->get_timeranges()->validate() ) { $this->add_error( $this->get_timeranges()->errors );}The validation error returned is:
Timeranges cannot overlap with each other.
However, the event editor only displays a single all-day timerange (12:00 AM – 11:59 PM).
We dumped the
EM\Event\Timerangesobject during validation and found that it contains two identical all-day timeranges for the same event, which appears to be why the validation fails.Both timeranges have:
timerange_group_id:event_1577timerange_start:00:00:00timerange_end:23:59:59timerange_all_day:1
Since
validate_meta()returnsfalse,wp_insert_post_data()sets the post status to Draft. Questions- Is this a known issue in 7.3.7.4?
- Has the timerange validation changed recently?
- Are there any known cases where duplicate timeranges are created or loaded during validation?
- Is there a recommended fix or patch?
We’re happy to provide additional debugging information if needed.
Thanks in advance!
You must be logged in to reply to this topic.