roots / sage

WordPress starter theme with Laravel Blade components and templates, Tailwind CSS, and a modern development workflow
https://roots.io/sage/
MIT License
12.69k stars 3.06k forks source link

Admin bar breaking error pages #3166

Closed marcbelletre closed 8 months ago

marcbelletre commented 8 months ago

Version

10

What did you expect to happen?

The error pages should display correctly with the admin bar displayed. The option is checked by default on a clean Wordpress setup.

What actually happens?

The layout of the error pages is broken when the admin bar is shown.

Here is an error page on a clean Sage 10 install. I just echoed an undefined variable in the App composer.

Capture d’écran 2023-12-18 à 16 55 39

When switching to incognito mode the error page looks fine.

Capture d’écran 2023-12-18 à 16 55 56

I also tried with Laravel Ignition with the same result.
I found that the entire HTML of the page is sent into the "New" item menu as wa can see here:

Capture d’écran 2023-12-18 à 17 00 39

Steps to reproduce

System info

Log output

No response

Please confirm this isn't a support request.

Yes

marcbelletre commented 8 months ago

Thank you @Log1x for the PR.

For anyone having the same issue, the fix is to move the layout markup from index.php to layouts/app.blade.php as shown here.