SOLVED Sage 9 blade bypassing layout app.blade.php

So, this problem is hunting me for days now. I’m migrating an old sage 9 alpha site (pre blade) to latest sage 9. All templates render right but the head element always comes empty. Long time I wondered why and then I saw that none of my markup in app.blade.php was being rendered, only the templates and partials specific to each page.

Any ideas how could this be?

My app.blade.php in resources/views/layouts looks like following:

<!doctype html>
<html {!! get_language_attributes() !!}>
  @include('partials.head')
  <body @php body_class() @endphp>

    <div class="wrap" role="document">
      @php do_action('get_header') @endphp

		<main class="container-fluid bg-light main mb-5">
			@yield('content')
		</main>
		@php do_action('get_footer'); @endphp
		@php wp_footer(); @endphp
	</div>

  </body>
</html>

Thanks in advance for any hint!

Reading my own question it became clear to me what the error was… How dumb! ^^
I forgot to extend the main layout @extends('layouts.app') inside my templates. Now everything works fine :slightly_smiling_face:

I hope this helps someone…

1 Like

This topic was automatically closed after 42 days. New replies are no longer allowed.