Skip to content

[6.x] Multisite globals selection - #15253

Open
jaygeorge wants to merge 24 commits into
multisite-entry-groupingfrom
multisite-globals-selection
Open

[6.x] Multisite globals selection#15253
jaygeorge wants to merge 24 commits into
multisite-entry-groupingfrom
multisite-globals-selection

Conversation

@jaygeorge

@jaygeorge jaygeorge commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

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-grouping branch). Here there is no way to set multiple origins at once:

2026-08-24 at 17 10 07@2x

What this PR Does

Builds a better globals origin workflow on top of site grouping from multisite-entry-grouping:

After:

2026-08-24 at 17 20 54@2x
  • Multi-select plus mass “Set origin to…”
  • Grouped origin pickers
  • Renames the section to Localizable (existing translation) instead of Sites (which duplicated the label)
  • Prevents circular origins (e.g. Tokyo → Japanese originating from NY → English and vice versa)
  • Adds tests
  • Improves issues mentioned here Multisite - Globals  ideas#657

How to Reproduce

  1. On a multisite install with site groups configured, open Globals → a set → ⋯ → Configure, and scroll to Localizable.
  2. Select several sites and use “Set origin to…” — selected rows should get that origin and enable if needed.
  3. Try to set origins in a loop (A → B and B → A) — it should error instead of hanging.
  4. (Optional) Create a circular entry origin chain and try to save — it should be rejected; reading values should not hang.

…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.
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.

1 participant