Skip to content

[6.x] Show and keep a localized date in the control panel - #15453

Merged
jasonvarga merged 1 commit into
statamic:6.xfrom
SUXUMI:fix/cp-localized-date
Sep 14, 2026
Merged

jasonvarga merged 1 commit into
statamic:6.xfrom
SUXUMI:fix/cp-localized-date

Conversation

@SUXUMI

@SUXUMI SUXUMI commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Fixes #15452

The control panel derives a localization's localized fields from data()->keys(). The date is never in data() (the file driver reads it from the path, the eloquent driver from a column), so a localization that owns its date is always shown as synced, and on the next save the form sends _localized without date, update() calls date(null) and the own date is lost.

  • edit() lists date when the localization has an explicit date and the blueprint's date field is localizable.
  • revisionAttributes() stores no date for a localization whose date is inherited, and makeFromRevision() clears the date when the revision carries none, so a reopened working copy does not turn an inherited date into an own one.

Note: for the eloquent driver the own date only reaches the row with statamic/eloquent-driver#619 (statamic/eloquent-driver#619). Revisions written before this change store the resolved date and restore it as an own date on localizations, as they do today.

@jasonvarga
jasonvarga merged commit ffbecaa into statamic:6.x Sep 14, 2026
62 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Control panel never shows a localization's own date as localized and drops it on the next save

2 participants