• AJD

    (@ajd)


    Issue:
    When editing an event and saving without making any changes, Events Manager can display the error:

    “Timeranges cannot overlap with each other”

    This happens even when the event has only a single time range.

    Steps

    1. Create and save a standard (non-recurring) event with one date/time.
    2. Edit the event.
    3. Make no changes.
    4. Save.

    In some cases, the save fails with the overlap error and the UI shows two time ranges.

    Notes:

    • The issue is intermittent.
    • Server cache state appears to affect reproducibility (after purging cache, the issue is harder to reproduce).
    • All caching and optimization were disabled during testing, so this does not appear to be a browser cache issue.
    • The error suggests the validator may be seeing duplicate timeranges during the edit/save process.


    “culprit” callout is:

    • events-manager/classes/timeslots/timeranges.php
      • get_post() lines 254 to 271 (potentially duplicates timeranges on edit/save)
      • validate() lines 292 to 308 (throws the message)
      • has_overlapping_timeranges() lines 318 to 339 (flags duplicates as overlap)
    • This topic was modified 3 months ago by AJD.

You must be logged in to reply to this topic.