Resource::getUrl(panel: 'server') still uses the wrong panel in spaUrlExceptions()

My app is using SPA problem is i have a blade with a component using wire:ignore which causes it to initialise twice when going backward/forward one page. This doesn't happen when i remove ->spa() from the PanelProvider so i thought i'd add it the page to spaUrlExceptions() Am i missing something ?
No description
No description
13 Replies
Martin Oscar
Martin OscarOP3w ago
I managed to make it sort of work with
->spaUrlExceptions(fn (): array => [
Console::getUrl(panel: 'server', tenant: Server::query()->find(1)),
])
->spaUrlExceptions(fn (): array => [
Console::getUrl(panel: 'server', tenant: Server::query()->find(1)),
])
But
->spaUrlExceptions(fn (): array => [
Console::getUrl(panel: 'server', tenant: Filament::getTenant()),
])
->spaUrlExceptions(fn (): array => [
Console::getUrl(panel: 'server', tenant: Filament::getTenant()),
])
Still doesn't work Also tried url('server/*/console') but spa is still enabled on that url
toeknee
toeknee2w ago
You cannot run get Tenant from the panel provider because the panel hasn't booted yet. That's why it doesn't work.
Martin Oscar
Martin OscarOP2w ago
Hey thanks for your reply. Ok, then how am i supposed to exclude /server/{tenant}/console from spa ? Even the url('/server/*/console') couldn't save me
toeknee
toeknee2w ago
does /server/*/console work?
Martin Oscar
Martin OscarOP2w ago
Sadly doesn't; its like if spaExceptions are never working unless i use * so might aswell not use spa in the first place; i just want to disable it on the console page tho
toeknee
toeknee2w ago
*/console
Martin Oscar
Martin OscarOP2w ago
Still nothing
Using filament 3.2.124 it that can help
toeknee
toeknee2w ago
What about....
->spaUrlExceptions(['*/server/{tenant:id}/console'])
->spaUrlExceptions(['*/server/{tenant:id}/console'])
Martin Oscar
Martin OscarOP2w ago
nope
toeknee
toeknee2w ago
ahh god knows then, look into how the spaUrlExceptions function works
Martin Oscar
Martin OscarOP2w ago
Is there a way i could debug using smth like dump($this->hasSpaMode()); ?
toeknee
toeknee2w ago
If you use an IDE you can click down into the vendor folders and then debug it accordingly

Did you find this page helpful?