Skip to content

Fix robots meta ignoring new fields when legacy array exists#538

Merged
duncanmcclean merged 1 commit into7.xfrom
robots-meta
Apr 17, 2026
Merged

Fix robots meta ignoring new fields when legacy array exists#538
duncanmcclean merged 1 commit into7.xfrom
robots-meta

Conversation

@duncanmcclean
Copy link
Copy Markdown
Member

This pull request fixes an issue where the robots_indexing and robots_following fields were ignored when the legacy robots array was present in the cascade data.

This was happening because Cascade::robots() checked for the legacy robots array first and returned early if it existed. In practice, this meant that if site defaults still had the old robots: [index, follow] format (e.g. from a v5 migration that was never re-saved), any explicit robots_indexing or robots_following values set on an entry or localized site were silently ignored.

This PR fixes it by reversing the priority in Cascade::robots() — the newer robots_indexing/robots_following fields are now checked first. The legacy robots array is only used as a fallback when none of the new fields are set.

Fixes #535
Caused by #405
Caused by #441

@duncanmcclean duncanmcclean merged commit 86e74cb into 7.x Apr 17, 2026
14 checks passed
@duncanmcclean duncanmcclean deleted the robots-meta branch April 17, 2026 10:22
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.

Cascade::robots() ignores localized robots_indexing/robots_following when origin has legacy robots array

1 participant