Traversial Links Page Title Has Unexpectedly Changed

Created on 23 June 2025, 21 days ago

Hello, I have a Drupal 10 site and at /admin/structure/book there are two books with the following titles:

Neon - Administration Guide
Neon - User Guide

Beneath that is the Traversial Links block, which appears below the content for every page in the book. Now, prior to the "2.0.1" update, the title of this block was based on the title as seen above (see also "Before-2.0.1" screenshot). For example:

Neon - Administration Guide Page Links
Neon - User Guide Page Links

However, after updating to 2.0.1, these titles have now changed to:

10 Page Links
17 Page Links

See "After-2.0.1" screenshot. Note: those numbers aren't correct either - since there are 7 book pages in the admin guide and 4 book pages in the user guide.

I looked for a way to edit this, but am not seeing anything and am not sure why this is happening (other than assuming it's related to the changes from https://www.drupal.org/project/book/issues/3497281 ✨ Add an option to display the top level page in BookNavigationBlock Active ).

It'd be great to have the Traversial Links block show the book titles again as specified at /admin/structure/book. Any help with this would be much appreciated.

πŸ› Bug report
Status

Active

Version

2.0

Component

User interface

Created by

πŸ‡ΊπŸ‡ΈUnited States jimmb

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

Comments & Activities

  • Issue created by @jimmb
  • πŸ‡ΊπŸ‡ΈUnited States jimmb
  • πŸ‡ΊπŸ‡ΈUnited States jimmb
  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Think the update hooks were wrong can you try https://www.drupal.org/project/book/issues/3531800 πŸ› 'show_top_item' is not a supported key. Active

  • πŸ‡ΊπŸ‡ΈUnited States jimmb

    Thanks for the reply! Though I'm not sure what you'd like me to try, exactly? I took a look at that other issue and am not sure what my next steps would be...

  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    There's an MR open on that issue.

  • πŸ‡ΊπŸ‡ΈUnited States jimmb

    Got it, thanks. I will need to learn how to do a merge request, actually, but will look into it and get back to you!

  • πŸ‡ΊπŸ‡ΈUnited States jimmb

    I haven't figured out how to do a MR yet (would be nice if there was some actual good documentation on this process somewhere), but in the meantime I see there is a fix now for https://www.drupal.org/project/book/issues/3531800 πŸ› 'show_top_item' is not a supported key. Active

    And so I have updated to 2.0.2, which includes that fix and which should presumably also apply that MR as part of the update (?) ...

    However, I see that the incorrect Traversal Links block titles are still showing.

    But hopefully this gives you some good additional info. and this can keep moving forward. I'll wait to hear back from you on the status and what my next steps should be.

  • πŸ‡ΊπŸ‡ΈUnited States smustgrave
  • Hello, was taking a look at this. Wasn't able to reproduce, although I am little confused. There isn't a traversal links block, the traversal links are enabled in the book content type display config. Markup for that is preprocessed then sent to book-navigation.html.twig. Seems like yours might be using a twig override or other preprocessing. They look like this ootb (with book olivero)

  • πŸ‡ΊπŸ‡ΈUnited States jimmb

    Hello, thanks for looking into this more. And you are correct that I'm overriding the default "book-navigation.html.twig" and "book-tree.html.twig" files at /web/modules/contrib/book/templates using files with the same names at: /web/themes/custom/custom-dxpr-theme/templates/navigation

    My reasons for doing this and the process I used are detailed at: https://www.drupal.org/project/book/issues/3498328 πŸ’¬ Twig Templates Location and CSS Styling Questions Active

    I have also attached the 2 custom twig files here for reference: "dxpr-book-tree-html-twig.txt" and "dxpr-book-navigation-html-twig.txt"
    Note: I had to put these in a .txt file format to upload them, hence the slight difference in naming and formatting ...

    The main point is that these overrides were working well and looking fine until I upgraded to Book version 2.0.1. So apparently something in this latest version (and also in 2.0.2) isn't playing nicely with the overrides.

    Hopefully this is something that can be fixed on the module side, so that it doesn't disrupt my existing and otherwise benign theme overrides.

Production build 0.71.5 2024