Conversation
|
That'll work when you have a couple of sites, but once you have more than a few it'll fall apart quickly. We will note that though! |
|
Yeah. Good point. Maybe that's a case for |
Yeah maybe — though for now I'd rather keep things simple and just get it working first. A select box works everywhere. :) |
`localizationData()` calls `origin()->values()` when `hasOrigin()` is true. With a cyclic sites origin map, this enters recursive origin resolution via `values()` and can loop indefinitely while serializing CP asset responses.
When saving a localized asset (e.g. rename/move), hydrate() was filling $data with origin-merged values and meta() was writing that merged set into data.{locale}, turning inherited fields into explicit overrides.
Add localizedDataForPersistence() to only persist explicit localized
data when no mutation occurred. If $data is unchanged from the
hydrated view and removedData is empty, keep the existing explicit
localized bucket as-is.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
| }).catch(() => { | ||
| if (loadId === this.loadId) { | ||
| this.loading = false; | ||
| } |
There was a problem hiding this comment.
Failed load renders editor with null asset
Medium Severity
In load()’s catch, loading is set to false without setting an error state or guarding asset. The template then renders sections that dereference asset (like asset.path) while it is still null, causing a runtime crash after failed requests.



References statamic/ideas#223
Note
High Risk
Touches core asset metadata read/write and caching behavior and introduces a migration path; bugs could cause metadata loss/corruption or incorrect locale resolution across sites.
Overview
Enables per-site/localized asset field metadata (eg alt/title) for multi-site installs, gated by a new asset-container
localizabletoggle.Updates asset persistence to store meta
datakeyed by locale with an optionalsitesorigin map, adds locale-aware caching/normalization, prevents inherited values from being materialized on save, and keeps focal points effectively non-localized. CP asset show/update, fieldtype asset hydration, API/GraphQL queries, and the asset editor UI now accept asite/locale context (including a localization switcher with unsaved-changes confirmation).Adds
statamic:assets:migrate-localizableto migrate existing meta files (and Eloquent-drivermetaJSON rows when possible) into the localized structure, plus broad test coverage for localized saving, origin/cycle safety, and migration behavior.Written by Cursor Bugbot for commit c0c83dc. This will update automatically on new commits. Configure here.