Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
Steps to reproduce:
- Install D8 with the Standard profile
- Enable Book module
- Navigate to /admin/structure/book
- Create a new book page (/node/add/book), setting the value in Book outline > Book to '- Create a new book -'
See this fatal error:
Fatal error: Call to a member function urlInfo() on a non-object in /Users/sreeves/Sites/d8.dev/core/modules/book/src/Controller/BookController.php on line 76
Proposed resolution
Fix it.
Remaining tasks
- Write patch to fix the bug
- Write test coverage
User interface changes
n/a
API changes
TBD, not likely
Comment | File | Size | Author |
---|---|---|---|
#3 | 2348413-3.patch | 1.44 KB | star-szr |
#3 | 2348413-3-testonly.patch | 850 bytes | star-szr |
#1 | 2348413-book-1.patch | 622 bytes | tim.plunkett |
Comments
Comment #1
tim.plunkettBookManager::loadBooks puts the urlInfo in ['url'].
We need test coverage here.
Comment #2
star-szrThanks! I can put together a web test.
Comment #3
star-szrThis should do the trick.
Comment #5
tim.plunkettGreat! Thanks @Cottser
Comment #6
alexpottCan we get a followup to improve the documentation of getAllBooks to describe what is in the array it returns.
Committed a75e52a and pushed to 8.0.x. Thanks!