book export Twig\Error\RuntimeError: The "filter" filter expects an array or "Traversable"

Created on 13 February 2023, over 1 year ago
Updated 23 September 2023, 9 months ago

Problem/Motivation

Path: /book/export/html/

Twig\Error\RuntimeError: The "filter" filter expects an array or "Traversable", got "integer". in twig_array_filter() (line 38 of themes/contrib/bootstrap_barrio/templates/layout/book-export-html.html.twig).

in {% for i in 1..depth-1|filter(i => i > 1) %}

Steps to reproduce

  • Create some book pages
  • Click on Printer-friendly version of one of the book pages

Proposed resolution

Use if condition instead of twig filter.

πŸ› Bug report
Status

Fixed

Version

5.5

Component

Code

Created by

πŸ‡¨πŸ‡­Switzerland boromino

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024