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.
Show error state and Retry when the asset request fails instead of rendering with null asset and crashing on asset.path.
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.
| if (JSON.stringify(values) === JSON.stringify(updated)) { | ||
| return | ||
| } | ||
|
|
There was a problem hiding this comment.
load() no longer returns promise, breaking await
Medium Severity
The load() method no longer returns the axios promise (the return keyword was removed), but handleCropReplaced() calls await this.load(). Since load() now returns undefined, the await resolves immediately, causing bustAndReloadImageCaches to fire before the asset data has actually reloaded.



References statamic/ideas#223
Note
Medium Risk
Touches core asset metadata persistence/caching and CP/API update flows to support per-site values, which could affect existing meta files and save behavior in multi-site setups. Includes migration logic and UI changes that need verification across localized and non-localized containers.
Overview
Adds localizable asset metadata for multi-site installs, allowing asset field data (eg alt/title) to vary per site while still supporting inherited “origin” values.
Updates the asset model/repository to store meta
dataper locale (with an optionalsitesorigin map), make meta caching locale-aware, avoid materializing inherited values on save, and treat focal point (focus) as non-localized.Extends CP and API/GraphQL endpoints to accept a
siteparameter and return localization context (available sites, origin values/meta, modified localized fields), and updates the asset editor/fieldtype UI to switch sites with unsaved-change confirmation.Adds an
AssetContainersetting to enable/disable localizable metadata per container, plus a newstatamic:assets:migrate-localizablecommand and tests covering persistence, migration behavior, and cycle-safe origin resolution.Written by Cursor Bugbot for commit e62ea36. This will update automatically on new commits. Configure here.