Skip to content

2.0.6: Fix plugin scaffold: Livewire::addNamespace() broke live-editing

Choose a tag to compare

@gp247net gp247net released this 12 Jul 13:12
Registering the plugin's Livewire component under a "/"-separated namespace
(matching $extensionPath, used for views/lang) rendered the admin screen
fine on first load, but every subsequent Livewire update request failed to
resolve the component back: Livewire\Finder::normalizeName() replaces "/"
with "." before parsing the namespace out of an incoming request, but not
when generating the name on initial render. The mismatch throws
ComponentNotFoundException -> release-token mismatch, and the browser shows
"This page has expired" on every single edit.

Nothing in this scaffold actually referenced the component by its aliased
name, so the fix is to drop the registration entirely (matching how the
News plugin's Livewire screens are wired: routed directly by class
reference, letting Livewire auto-generate and resolve the component name
from its FQCN, which round-trips correctly with no custom namespace involved).