Problem/Motivation

The wxt_library 8.x-6.x branch introduces LanguageManagerInterface via dependency injection to the SearchCanadaBlockForm form. The language manager is added to the construct method but not the create method. This causes the following error:

TypeError: Drupal\wxt_library\Form\SearchCanadaBlockForm::__construct(): Argument #2 ($language_manager) must be of type Drupal\Core\Language\LanguageManagerInterface, Drupal\Core\Render\Renderer given, called in /var/www/html/modules/custom/wxt_library/src/Form/SearchCanadaBlockForm.php on line 77 in Drupal\wxt_library\Form\SearchCanadaBlockForm->__construct() (line 58 of modules/custom/wxt_library/src/Form/SearchCanadaBlockForm.php).

https://git.drupalcode.org/project/wxt_library/-/blob/8.x-6.x/src/Form/SearchCanadaBlockForm.php

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

smulvih2 created an issue. See original summary.

smulvih2’s picture

Status: Active » Needs review
FileSize
532 bytes

The patch attached fixes the error.

joseph.olstad’s picture

Status: Needs review » Reviewed & tested by the community

taking the liberty of calling this RTBC.

phot0x’s picture

Patch tested and working great. Thanks!

sylus’s picture

Status: Reviewed & tested by the community » Fixed

Committed and attributed!

Status: Fixed » Closed (fixed)

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