This page shows the exact structural changes made to fix the white screen issue in the AdminLTE theme.
%body% was inside sidebar navigation
<aside class="main-sidebar">
<div class="sidebar">
<nav class="mt-2">
<ul class="nav nav-sidebar">
%body% <!-- WRONG LOCATION -->
<aside class="control-sidebar">...</aside>
</div>
Problems:
%body% moved to proper content area
<aside class="main-sidebar">
<div class="sidebar">
<nav class="mt-2">
<ul class="nav nav-sidebar">
<!-- Navigation items -->
</ul>
</nav>
</div>
</aside>
<div class="content-wrapper">
<section class="content">
<div class="card-body main">
%body% <!-- CORRECT LOCATION -->
</div>
</section>
</div>
Benefits:
The difference is clear when you see the login success message:
Result: White screen, broken layout
Result: Proper layout, working theme
themes/AdminLTE/layout.html - Primary fix: moved %body% placeholderthemes/AdminLTE/topbody.html - Simplified to prevent conflictsthemes/AdminLTE/botbody.html - Simplified to prevent conflictsThe core issue was that AdminLTE's layout.html had the %body% placeholder inside a <ul class="nav nav-sidebar"> element, which is designed for navigation menu items, not general page content. When login success messages or other page content was rendered, it created invalid HTML and broke the layout.
The fix moves the %body% placeholder to AdminLTE's designated content area using proper AdminLTE CSS classes and structure, ensuring all page content renders correctly while maintaining the theme's visual design.