v4.4.8 - Preserve Site → Page navigation context
Bug Fix / UX
When a user enters the page editor from a Site relation manager (Sites → Site → Pages → Edit or Create), the receiving Filament page now keeps the originating-site context — instead of dropping the user into the global Pages resource with no breadcrumb back.
- New
HasFromSiteContexttrait captures?from_site=<id>once atmount()into a public Livewire property — durable across/livewire/updateround trips, so save / delete redirects don't silently lose context. EditCmsPageandCreateCmsPagenow show "Editing within site: " as a subheading, expose a "Back to site" header action, and redirect after save / delete / force-delete to the originating Site edit URL instead of the global Pages index.CmsPage::hasSiteIdColumn()exposed aspublic;site()belongsTo relation added;'site_id' => 'integer'cast added so loose Eloquent typing doesn't break validation.
Safety
- Single-site installs: trait's first guard checks
CmsPage::hasSiteIdColumn(). When the multisite migration hasn't added the column, every entry point returns null and lifecycle hooks fall through. Behaviour is identical to before. - Spoofed
from_site: validated against the loaded record'ssite_idpost-save (with a fallback to$ownerSiteIdpre-save so the back action renders on Create before Save). A mismatched id falls through to default behaviour — no breadcrumb leak. - SiteResource URL resolution:
try/catcharoundgetUrl()on cms-core'sSiteResourceand the multisite plugin'sSiteResourcein turn. Hosts without either resource registered get null and the back action silently drops out — noRouteNotFoundExceptionreaches the user.
Companion plugin release
The multisite plugin v2.3.0 (forthcoming) ships the ?from_site=<id> query addition on its PagesRelationManager. Hosts running the multisite plugin should update both core (this release) and the plugin to see the full UX. Either side can ship independently — old plugin + new core: trait stays inert because from_site is never sent. New plugin + old core: query param is ignored. No breakage in either combination.