Book export doesn't print included content #1827

Closed
opened 2026-02-05 02:00:23 +03:00 by OVERLORD · 3 comments
Owner

Originally created by @mr-vinn on GitHub (Aug 15, 2020).

Describe the bug
When I export a page or a chapter, content that I include with {{@123}} tags is rendered in the output. However, the literal tag is printed in the output when I export the book.

Steps To Reproduce
Steps to reproduce the behavior:

  1. Create a page that includes content from another page ({{@123}}).
  2. Export the book containing the page from step 1.
  3. The exported file prints the literal include tag.

Expected behavior
The page and chapter exports both print the rendered, included content instead of the literal include tag. I expected the book export to do the same.

Screenshots
Rendered page with an include tag:
image

Page source showing include tag:
image

Exported page:
image

Exported book:
image

Your Configuration (please complete the following information):

  • Exact BookStack Version (Found in settings): 0.29.3 (screenshots are from the demo site)
  • PHP Version: unknown
  • Hosting Method (Nginx/Apache/Docker): unknown
Originally created by @mr-vinn on GitHub (Aug 15, 2020). **Describe the bug** When I export a page or a chapter, content that I include with `{{@123}}` tags is rendered in the output. However, the literal tag is printed in the output when I export the book. **Steps To Reproduce** Steps to reproduce the behavior: 1. Create a page that includes content from another page (`{{@123}}`). 1. Export the book containing the page from step 1. 1. The exported file prints the literal include tag. **Expected behavior** The page and chapter exports both print the rendered, included content instead of the literal include tag. I expected the book export to do the same. **Screenshots** Rendered page with an include tag: ![image](https://user-images.githubusercontent.com/2551678/90301813-4e970180-de5f-11ea-80b7-91ee2bb104a8.png) Page source showing include tag: ![image](https://user-images.githubusercontent.com/2551678/90301839-5bb3f080-de5f-11ea-87f3-5a92bc64e461.png) Exported page: ![image](https://user-images.githubusercontent.com/2551678/90301869-a6ce0380-de5f-11ea-9592-2b93e4c9eafc.png) Exported book: ![image](https://user-images.githubusercontent.com/2551678/90301872-b2b9c580-de5f-11ea-96e0-31c687dc4979.png) **Your Configuration (please complete the following information):** - Exact BookStack Version (Found in settings): 0.29.3 (screenshots are from the demo site) - PHP Version: unknown - Hosting Method (Nginx/Apache/Docker): unknown
OVERLORD added the 🐛 Bug🚚 Export System labels 2026-02-05 02:00:23 +03:00
Author
Owner

@Science4583 commented on GitHub (Aug 31, 2020):

Not sure if this should be it's own report.

Similar to this, nested included content fails to render the same way. If Page A includes content from Page B which includes content from Page C, only the reference to Page C is shown when viewing Page A. However if you view Page B then Page C content will be included properly.

@Science4583 commented on GitHub (Aug 31, 2020): Not sure if this should be it's own report. Similar to this, nested included content fails to render the same way. If Page A includes content from Page B which includes content from Page C, only the reference to Page C is shown when viewing Page A. However if you view Page B then Page C content will be included properly.
Author
Owner

@mr-vinn commented on GitHub (Aug 31, 2020):

@mbazdell I think the behavior you described is intentional. This is from the user docs:

Note that the include behaviour is non-recursive so including will only work to a single level. This ensures performance and prevents users from breaking pages by creating include loops.

@mr-vinn commented on GitHub (Aug 31, 2020): @mbazdell I think the behavior you described is intentional. This is from the [user docs](https://www.bookstackapp.com/docs/user/reusing-page-content/): > Note that the include behaviour is non-recursive so including will only work to a single level. This ensures performance and prevents users from breaking pages by creating include loops.
Author
Owner

@Science4583 commented on GitHub (Sep 1, 2020):

You're absolutely correct! Thanks

@Science4583 commented on GitHub (Sep 1, 2020): You're absolutely correct! Thanks
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#1827