Problem/Motivation
No config term vocabs can be created or edited.
Steps to reproduce
Go to the config terms vocabularies overview page and add a new config terms vocab. Enter a title and click save. The following exception is thrown:
TypeError: Drupal\config_terms\Form\OverviewTerms::__construct(): Argument #2 ($entity_type_manager) must be of type Drupal\Core\Entity\EntityTypeManagerInterface, Drupal\Core\Render\Renderer given, called in /var/www/web/modules/contrib/config_terms/src/Form/OverviewTerms.php on line 58 in Drupal\config_terms\Form\OverviewTerms->__construct() (line 48 of modules/contrib/config_terms/src/Form/OverviewTerms.php).
Proposed resolution
The issue seems to happen in the constructor of the OverviewTerms form class. The arguments entity_type_manager and renderer are in the wrong order.
This can be fixed by exchanging entity_type_manager and renderer with each other in either the constructor or the static create function.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | 3394363-5.patch | 1.54 KB | pwolanin |
| #4 | 3394363-4-test-only.patch | 1.03 KB | pwolanin |
| #2 | config_terms-fix-exception-3394363-2.patch | 533 bytes | sjoerdwowww |
Comments
Comment #2
sjoerdwowww commentedAdded a patch which exchanges the entity_type_manager with the renderer in the static create function of OverviewTerms.
Comment #3
pwolanin commentedThanks - setting to NR to run the tests, but clearly we are missing a web test for this form
Comment #4
pwolanin commentedHere's a small test-only patch that should fail
Comment #5
pwolanin commentedUpdated patch with test change
Comment #8
pwolanin commented