Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

inertia laravel opens the page in a new modal #556

Open
PanWcislo opened this issue Nov 10, 2023 · 1 comment
Open

inertia laravel opens the page in a new modal #556

PanWcislo opened this issue Nov 10, 2023 · 1 comment

Comments

@PanWcislo
Copy link

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?

@craigrileyuk
Copy link

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.

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

No branches or pull requests

2 participants