Skip to content

[6.x] Do not set the Inertia root view globally#14942

Open
lazerg wants to merge 1 commit into
statamic:6.xfrom
lazerg:fix-inertia-cp-root-view
Open

[6.x] Do not set the Inertia root view globally#14942
lazerg wants to merge 1 commit into
statamic:6.xfrom
lazerg:fix-inertia-cp-root-view

Conversation

@lazerg

@lazerg lazerg commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

CpServiceProvider::boot() set the Inertia root view globally with Inertia::setRootView('statamic::layout'), so apps that render their own Inertia frontend outside the control panel inherited it and their pages (including Inertia error responses) rendered inside Statamic's CP layout. The control panel already sets its own root view via the HandleInertiaRequests middleware on every CP route, so the global call isn't needed and just leaks into the host app.

Fixes #14619

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.

CpServiceProvider::boot() sets Inertia rootView globally, breaking apps that run Inertia outside the CP

1 participant