Warnings in logs from the node add form

Created on 6 March 2024, 10 months ago
Updated 11 April 2024, 8 months ago

When creating a new node that is part of a book the module gives the following warnings in the logs.

Warning: Trying to access array offset on value of type bool in Drupal\book\BookManager->bookSubtreeData() (line 1147 of /var/www/html/docroot/core/modules/book/src/BookManager.php)

Warning: Trying to access array offset on value of type bool in Drupal\book_link_weight\Form\BookLinkWeightForm->alterBookOutlineForm() (line 71 of /var/www/html/docroot/modules/contrib/book_link_weight/src/Form/BookLinkWeightForm.php)

This is caused by $form['book']['pid']['#default_value'] been = '-1' so no tree data is been loaded.

I will submit a merge request with a possible fix.

🐛 Bug report
Status

Fixed

Version

1.1

Component

Code

Created by

🇬🇧United Kingdom lstirk

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024