inertia-laravel icon indicating copy to clipboard operation
inertia-laravel copied to clipboard

inertia laravel opens the page in a new modal

Open PanWcislo opened this issue 1 year ago • 1 comments

I have a problem with inertia and laravel. After updating files on the server, it sometimes happens that when switching between pages, the page will open in a new modal window. I don't know exactly what the problem is, but I think it's related to the cache and Laravel Mix and using webpack mix.version() in production?

PanWcislo avatar Nov 10 '23 20:11 PanWcislo

I think it's related to the cache and Laravel Mix and using webpack mix.version() in production?

It isn't. If you're seeing a modal in inertia, it's because you're sending a request for an Inertia page from the browser, but the server is sending back a standard HTML response.

Ensure that you have the Inertia Middleware installed properly and that it's applied on all relevant routes.

Furthermore, make sure that your controllers are returning either an inertia response or a redirection to an inertia response (e.g. return back();)

If you nail down the pages where the modal opens, this should help you track down the controller methods/routes where the issues are.

craigrileyuk avatar Jan 08 '24 06:01 craigrileyuk