Custom book block is not using parent default configuration

Created on 7 December 2023, about 1 year ago
Updated 3 January 2024, 12 months ago

Problem/Motivation

I can't place a custom book navigation block using Drupal's UI. I get what appears to be an Ajax error, and unfortunately my console isn't much help other than stating it's an Ajax 200 error. I checked another theme to see if it was possible that it was my theme, but it doesn't work in Claro either. I'm running Drupal 10.1.7 locally. This does look somewhat similar to an older (resolved) issue, 3221654.

Steps to reproduce

Install the module, then go to admin/structure/block and try to add the custom book navigation block in a region.

This looks like exactly what I need to be able to show my book menus as expanded, so I'd love to be able to use it. Thank you in advance for any help you can provide.

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

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

Merge Requests

Comments & Activities

  • Issue created by @tsurvuli
  • Status changed to Postponed: needs info about 1 year ago
  • 🇩🇪Germany simonbaese Berlin

    Unable to reproduce. Can you please provide more information?

    • Which browser are you using? Does the error prevail in other browsers?
    • Does the error show, when placing other blocks?
    • What is the complete error AJAX error message?
    • Does any related error show in the reports (/admin/reports/dblog)?
    • Are there other modules that could cause this behavior?
  • @simonbaese,

    In answer to your questions:

    Which browser are you using? Does the error prevail in other browsers?
    I was using Chrome, but error persists in Edge. I'm assuming it happens in Safari and Firefox as well but I haven't tested them.

    Does the error show, when placing other blocks?
    No, it doesn't.

    What is the complete error AJAX error message?
    It's huge, but here's the first part which looks like maybe what you might need:

    "\nAn AJAX HTTP error occurred.\nHTTP Result Code: 200\nDebugging information follows.\nPath: /admin/structure/block/add/custom_book_navigation/hhsds?region=sidebar_first\nStatusText: parsererror\nResponseText: Warning: Undefined array key \"use_top_level_title\" in /app/docroot/core/modules/book/src/Plugin/Block/BookNavigationBlock.php on line 113\n[{\"command\":\"settings\",\"settings\":{\"ajaxPageState\":{\"theme\":\"claro\",\"theme_token\":\"yPltGbVFEAkLR7nAUBnafWSDBzlW5YEvTHh0vt3Qte4\",\"libraries\"

    Does any related error show in the reports (/admin/reports/dblog)?
    No, there isn't anything there.

    Are there other modules that could cause this behavior?
    I do have Menu Block enabled. I tried uninstalling it and just using Custom Book Block and core menu blocks, but error still happens when I try to add a custom book navigation block.

  • Status changed to Needs work about 1 year ago
  • Status changed to Needs review about 1 year ago
  • 🇩🇪Germany simonbaese Berlin

    It seems like you are using a patch from this issue Allow book navigation title to be overridden by top-level node title Postponed . The Custom Book Block did not play well with the changed parent configuration. Please use the changes from the merge request or the attached patch file and test again.

  • 🇩🇪Germany simonbaese Berlin

    The posted patch may conflict with the changes from another open issue Start level and active branch of tree Needs review !

  • 🇩🇪Germany simonbaese Berlin

    Merging this since I would like to publish a new release soon. Please continue the discussion here if there are further issues.

    • simonbaese committed d8e1f5d9 on 1.0.x
      Issue #3406886 by simonbaese, tsurvuli: Custom book block is not using...
  • Status changed to Fixed about 1 year ago
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024