Skip to content

Fix localized seo fields for Eloquent driver users#383

Merged
jesseleite merged 1 commit into
masterfrom
fix-localizable-seo-data-for-eloquent
May 7, 2025
Merged

Fix localized seo fields for Eloquent driver users#383
jesseleite merged 1 commit into
masterfrom
fix-localizable-seo-data-for-eloquent

Conversation

@jesseleite
Copy link
Copy Markdown
Contributor

Statamic's Eloquent driver tracks __localized_fields on entry save to determine which fields should be included in localized data.

Even though seo field data was being saved, it was not properly showing in the control panel or in front end SEO meta for Eloquent users because the parent seo field was not being tracked by __localized_fields...

CleanShot 2025-05-07 at 11 30 46

This PR makes the parent seo field localizable, so that it can be tracked by __localized_fields in Eloquent...

CleanShot 2025-05-07 at 11 33 55

Note: Child fields within the seo array were already marked localizable, but this was more for the purpose of making child fields editable, since non-localizable fieldtypes are rendered as read-only inputs in the CP UI. This never affected Stache usage, but the parent seo field also needs to be localizable for __localized_fields as stated above.

Fixes #339

@jesseleite jesseleite merged commit a939f5c into master May 7, 2025
42 checks passed
@jesseleite jesseleite deleted the fix-localizable-seo-data-for-eloquent branch May 7, 2025 15:45
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.

Custom values keep switching back to default localization value

1 participant