[6.x] Multisite globals selection - #15253
Open
jaygeorge wants to merge 24 commits into
Open
Conversation
…herwise it's useless
…pan has an origin of NY > English, and NY > English has an origin of Tokyo > Japan Reject cyclic global site origins on save and in the Localization UI, and stop HasOrigin from recursing forever when a loop already exists. Also null-safe site lang when slugifying entries whose site is missing.
Keep group keys before attributes when saving sites and update Site augmentation expectations.
Preferred origin selection when grouped needs the same payload as the edit form.
Group labels come from sites.yaml config, not translation keys. Keep __() only for the fixed "Other" bucket.
It was only covered by unit tests and never called from the CP.
Walk origin chains with a visit set so ancestors() cannot hang, and block saving entries that form a loop.
Cover HasOrigin value/root resolution and Entry save/ancestors behavior when origins loop.
English uses the string key via __(); other locales can come from contributors.
Avoid a new Localization string; Localizable is already translated across locales.
Align merge bases so the PR diff against entry-grouping no longer includes unrelated 6.x files.
Reintroduced by merging multisite-entry-grouping; keep it out of this branch.
Bring over the group-label translation fix so it lives on the base branch.
PHPStan could not resolve root \Log aliases, and the trans-import check required use function Statamic\trans as __ in Entry.
Cycle tracking now falls back to spl_object_id so origin stubs without id() keep working. Also satisfy Pint spacing for the Statamic\trans import.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of the Problem
On multisite globals, a long list of localizations makes setting origins one row at a time cumbersome.
Before:
(on the
multisite-entry-groupingbranch). Here there is no way to set multiple origins at once:What this PR Does
Builds a better globals origin workflow on top of site grouping from
multisite-entry-grouping:After:
How to Reproduce