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.

Comments

SjoerdWowww created an issue. See original summary.

sjoerdwowww’s picture

StatusFileSize
new533 bytes

Added a patch which exchanges the entity_type_manager with the renderer in the static create function of OverviewTerms.

pwolanin’s picture

Status: Active » Needs review

Thanks - setting to NR to run the tests, but clearly we are missing a web test for this form

pwolanin’s picture

StatusFileSize
new1.03 KB

Here's a small test-only patch that should fail

pwolanin’s picture

StatusFileSize
new1.54 KB

Updated patch with test change

The last submitted patch, 4: 3394363-4-test-only.patch, failed testing. View results

  • pwolanin committed 46dfc4e2 on 8.x-1.x
    Issue #3394363 by pwolanin, SjoerdWowww: Fix exception when viewing...
pwolanin’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.