Preview throws fatal error when children present
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3506840. --> Reported by: [agentrickard](https://www.drupal.org/user/20975) Related to !82 >>> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <p>Book preview throws a fatal error in Drupal 11.1.2.</p> <h4 id="summary-steps-reproduce">Steps to reproduce</h4> <ol> <li> <li>Create a new book page.</li> <li>Make it a new book</li> <li>Add a child page</li> <li>Edit the original book page</li> <li>Hit the Preview button</li> </ol> <p>Throws:</p> <pre>TypeError: Drupal\book\ProxyClass\BookManager::bookSubtreeData(): Argument #1 ($link) must be of type array, null given, called in /var/www/html/docroot/modules/contrib/book/src/BookOutline.php on line 49 in Drupal\book\ProxyClass\BookManager-&gt;bookSubtreeData() (line 209 of modules/contrib/book/src/ProxyClass/BookManager.php). </pre><h3 id="summary-proposed-resolution">Proposed resolution</h3> <p>Pending investigation</p> <h3 id="summary-remaining-tasks">Remaining tasks</h3> <p>Find and fix root cause</p> <h3 id="summary-ui-changes">User interface changes</h3> <p>Unknown, but not likely</p> <h3 id="summary-api-changes">API changes</h3> <p>Unknown, but not likely</p> <h3 id="summary-data-model-changes">Data model changes</h3> <p>Unknown, but not likely</p>
issue