Problem/Motivation
When I try to edit a node I get this message:
The website encountered an unexpected error. Try again later.
TypeError: Drupal\book_link_weight\Form\BookLinkWeightForm::__construct(): Argument #1 ($book_manager) must be of type Drupal\book\BookManager, Drupal\book\ProxyClass\BookManager given, called in /var/www/comges/web/core/lib/Drupal/Component/DependencyInjection/Container.php on line 259 in Drupal\book_link_weight\Form\BookLinkWeightForm->__construct() (line 23 of modules/contrib/book_link_weight/src/Form/BookLinkWeightForm.php).
Drupal version: 10.2.2
PHP version: 8.2.7
I don't know where to find more info. Tell me if you need.
Steps to reproduce
Install module, try to edit a node.
Uninstalling the module solves the problem.
Comments
Comment #2
andy_w commentedIn order to resolve the issue we need to use the BookManagerInterface as drupal 10.2 changed to use a proxy class for the book manager (see https://www.drupal.org/node/3397515)
Comment #4
andy_w commentedComment #5
andy_w commented