Bug description
When an entry has a localization, fields that are synced/inherited from the origin entry render correctly in the Statamic Control Panel. The localized entry shows the origin value when the field has not been changed locally.
However, when querying the localized entry through the API, those inherited field values are returned as empty strings instead of falling back to the origin entry’s values.
If I manually change the same fields on the localization, the values are stored on the localized entry and then appear correctly in the API response.
Expected behavior: API responses for localized entries should return the resolved field value, including inherited/synced values from the origin entry when no local override exists.
Actual behavior: API responses return empty values for fields that visually resolve correctly in the Control Panel.
Screenshots show:
- Localized entry displaying inherited SEO values in the Control Panel
- API response returning empty
meta_title and meta_description
- Localized entry after changing/saving the values
- API response then returning the values correctly
Field is synced with origin:
(meta title and description)
API response:
Changed field values:
API Response:
How to reproduce
- Set up a Statamic site with multiple locales/sites enabled.
- Create a collection with fields that are available on localized entries, for example:
meta_title
meta_description
- Create an entry in the origin locale and fill in those fields.
- Create a localization of that entry.
- Do not change/override the synced fields on the localized entry.
- Open the localized entry in the Control Panel.
- Confirm that the fields visually show the inherited values from the origin entry.
- Query the localized entry through the API.
- Notice that the inherited fields are returned as empty strings
- Go back to the localized entry, change/save those same fields locally.
- Query the API again.
- The fields are now returned correctly in the API response.
Logs
Environment
Environment
Laravel Version: 13.7.0
PHP Version: 8.5.5
Composer Version: 2.9.7
Environment: local
Debug Mode: ENABLED
Maintenance Mode: OFF
Timezone: UTC
Locale: en
Cache
Config: NOT CACHED
Events: NOT CACHED
Routes: NOT CACHED
Views: CACHED
Drivers
Broadcasting: log
Cache: file
Database: mysql
Logs: stack / single
Mail: log
Queue: redis
Session: database
Storage
public/storage: NOT LINKED
Sentry
Enabled: MISSING DSN
Environment: local
Laravel SDK Version: 4.25.0
PHP SDK Version: 4.25.0
Release: NOT SET
Sample Rate Errors: 100%
Sample Rate Performance Monitoring: 100%
Sample Rate Profiling: NOT SET
Send Default PII: ENABLED
Statamic
Addons: 9
Sites: 12 (Trucks Nederland, Trucks België | Nederlands, Trucks International | English, and 9 more)
Stache Watcher: Enabled (auto)
Static Caching: Disabled
Version: 6.15.0 PRO
Statamic Addons
appswithlove/statamic-one-click-content-translation: 6.0.3
just-better/bard-link-suggestions: 0.0.1
just-better/translations-overview: dev-feature/statamic-6
just-better/url-reference-updater: dev-feature/statamic-6
justbetter/lost-in-translation: dev-feature/statamic-6
justbetter/statamic-entry-translator: 0.2.0
markkravchuk/statamic-activity-book: 1.0.1
statamic/eloquent-driver: 5.6.3
statamic/importer: 2.1.0
Statamic Eloquent Driver
Addon Settings: file
Asset Containers: file
Assets: eloquent
Blueprints: file
Collection Trees: eloquent
Collections: file
Entries: eloquent
Fieldsets: file
Form Submissions: file
Forms: file
Global Sets: file
Global Variables: eloquent
Navigation Trees: eloquent
Navigations: file
Revisions: eloquent
Sites: file
Taxonomies: file
Terms: eloquent
Tokens: file
Installation
Fresh statamic/statamic site via CLI
Additional details
No response
Bug description
When an entry has a localization, fields that are synced/inherited from the origin entry render correctly in the Statamic Control Panel. The localized entry shows the origin value when the field has not been changed locally.
However, when querying the localized entry through the API, those inherited field values are returned as empty strings instead of falling back to the origin entry’s values.
If I manually change the same fields on the localization, the values are stored on the localized entry and then appear correctly in the API response.
Expected behavior: API responses for localized entries should return the resolved field value, including inherited/synced values from the origin entry when no local override exists.
Actual behavior: API responses return empty values for fields that visually resolve correctly in the Control Panel.
Screenshots show:
meta_titleandmeta_descriptionField is synced with origin:
(meta title and description)
API response:
Changed field values:
API Response:
How to reproduce
meta_titlemeta_descriptionLogs
Environment
Installation
Fresh statamic/statamic site via CLI
Additional details
No response