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.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Comments

nico.bertol created an issue. See original summary.

andy_w’s picture

In 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)

  • andy_w committed 7650f622 on 1.0.x
    Issue #3415982 by nico.bertol, andy_w: Break node editing down
    
andy_w’s picture

Status: Active » Fixed
andy_w’s picture

Status: Fixed » Closed (fixed)