Randomly page display the source code #5383

Open
opened 2026-02-05 10:01:30 +03:00 by OVERLORD · 1 comment
Owner

Originally created by @Melv1no on GitHub (Jul 30, 2025).

Describe the Bug

BookStack has been running smoothly for several months. However, recently and sporadically, the application fails to render pages correctly: instead of displaying the expected HTML output, it sometimes shows the raw Blade template source code (see example below). This happens without any updates or configuration changes and appears randomly — the issue may disappear after a page refresh, only to reoccur later.

Example of displayed content:

@extends('layouts.tri') @section('body') @include('books.parts.list', ['books' => $books, 'view' => $view, 'listOptions' => $listOptions]) @stop @section('left') @if($recents) {{ trans('entities.recently_viewed') }} @include('entities.list', ['entities' => $recents, 'style' => 'compact']) @endif {{ trans('entities.books_popular') }} @if(count($popular) > 0) @include('entities.list', ['entities' => $popular, 'style' => 'compact']) @else {{ trans('entities.books_popular_empty') }} @endif {{ trans('entities.books_new') }} @if(count($new) > 0) @include('entities.list', ['entities' => $new, 'style' => 'compact']) @else {{ trans('entities.books_new_empty') }} @endif @stop @section('right') {{ trans('common.actions') }} @if(userCan('book-create-all')) [@icon('add') {{ trans('entities.books_create') }} ](https://wiki.redacted.com/fr/%7B%7B%20url()) @endif @include('entities.view-toggle', ['view' => $view, 'type' => 'books']) [@icon('tag') {{ trans('entities.tags_view_tags') }} ](https://wiki.redacted.com/fr/%7B%7B%20url('/tags')%20%7D%7D) @if(userCan('content-import')) [@icon('upload') {{ trans('entities.import') }} ](https://wiki.redacted.com/fr/%7B%7B%20url('/import')%20%7D%7D) @endif @stop

Additional Notes:
Temporarily disabling the database cache in the .env file, then re-enabling it, resolved the issue.
There are no related errors in the logs; the application continues to return HTTP 200 responses, even when the Blade source is rendered.
This is not related to the proxy configuration, as the issue also occurs when accessing the application directly via localhost.

Bookstack version: BookStack v25.05.2
PHP Version: PHP 8.3.23
Server running under apache2

Steps to Reproduce

Any page could be affected by this problem, but I imagine it's not really possible to reproduce it reliably.

Expected Behaviour

I'm simply reporting the issues I've been encountering, and if possible, I'd like to better understand the reasons behind them — if you happen to know.

Screenshots or Additional Context

No response

Browser Details

Any browser

Exact BookStack Version

v25.05.2

Originally created by @Melv1no on GitHub (Jul 30, 2025). ### Describe the Bug BookStack has been running smoothly for several months. However, recently and sporadically, the application fails to render pages correctly: instead of displaying the expected HTML output, it sometimes shows the raw Blade template source code (see example below). This happens without any updates or configuration changes and appears randomly — the issue may disappear after a page refresh, only to reoccur later. Example of displayed content: ` @extends('layouts.tri') @section('body') @include('books.parts.list', ['books' => $books, 'view' => $view, 'listOptions' => $listOptions]) @stop @section('left') @if($recents) {{ trans('entities.recently_viewed') }} @include('entities.list', ['entities' => $recents, 'style' => 'compact']) @endif {{ trans('entities.books_popular') }} @if(count($popular) > 0) @include('entities.list', ['entities' => $popular, 'style' => 'compact']) @else {{ trans('entities.books_popular_empty') }} @endif {{ trans('entities.books_new') }} @if(count($new) > 0) @include('entities.list', ['entities' => $new, 'style' => 'compact']) @else {{ trans('entities.books_new_empty') }} @endif @stop @section('right') {{ trans('common.actions') }} @if(userCan('book-create-all')) [@icon('add') {{ trans('entities.books_create') }} ](https://wiki.redacted.com/fr/%7B%7B%20url()) @endif @include('entities.view-toggle', ['view' => $view, 'type' => 'books']) [@icon('tag') {{ trans('entities.tags_view_tags') }} ](https://wiki.redacted.com/fr/%7B%7B%20url('/tags')%20%7D%7D) @if(userCan('content-import')) [@icon('upload') {{ trans('entities.import') }} ](https://wiki.redacted.com/fr/%7B%7B%20url('/import')%20%7D%7D) @endif @stop` Additional Notes: Temporarily disabling the database cache in the .env file, then re-enabling it, resolved the issue. There are no related errors in the logs; the application continues to return HTTP 200 responses, even when the Blade source is rendered. This is not related to the proxy configuration, as the issue also occurs when accessing the application directly via localhost. Bookstack version: [BookStack v25.05.2](https://github.com/BookStackApp/BookStack/releases) PHP Version: PHP 8.3.23 Server running under apache2 ### Steps to Reproduce Any page could be affected by this problem, but I imagine it's not really possible to reproduce it reliably. ### Expected Behaviour I'm simply reporting the issues I've been encountering, and if possible, I'd like to better understand the reasons behind them — if you happen to know. ### Screenshots or Additional Context _No response_ ### Browser Details Any browser ### Exact BookStack Version v25.05.2
OVERLORD added the 🐛 Bug label 2026-02-05 10:01:30 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Aug 7, 2025):

Hi @Melv1no,
This is very closely related to #5628. It'd be worth going through that thread and following any of my guidance there.

@ssddanbrown commented on GitHub (Aug 7, 2025): Hi @Melv1no, This is very closely related to #5628. It'd be worth going through that thread and following any of my guidance there.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#5383