protonemedia/laravel-splade

"The response is not a Splade response." on production enviroment

Blixary opened this issue · 3 comments

  • Laravel Version: 10.47.0
  • PHP Version: #.#.#
  • Splade JS Version (npm): 1.4.16
  • Splade PHP Version (composer): 1.4.16
  • Dev environment (OS, Sail/Valet/etc): Ubuntu 22

You may use the built-in Artisan Command to show the installed versions of the packages:

php artisan splade:show-versions

Make sure both Splade packages (JS + PHP) are up-to-date and on the same version. For example, when using version 0.5.0 of the PHP package, you should use the same JavaScript package version.

Description:

When clicking on a Splade Link to a route that was created with Splade and also has the corresponding middleware, the error appears: "The response is not a Splade response. Did you use the Splade Middleware on this route?" - the link does not "open".

If you enter the relevant URL in the browser, the page works, but there are three zeros before the doctype in the HTML source code. It then looks something like this: https://imgur.com/l8Udu7P - Also, third party components like Filepond don't work correctly (wrong styling) on this page.

Locally, in development mode, this issue doesn't occure.

Steps To Reproduce Issue:

I can share a url link to a production enviroment where the issue is demontrated.

I suggestion would be check your templates or try searching for "000" in your code.

I suggestion would be check your templates or try searching for "000" in your code.

As the zeros aren’t present on development environment, it may be not a template error.

Please check to make sure that the route has the splade middleware.