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
Comment | File | Size | Author |
---|---|---|---|
#2 | wxt-library-fix-dependency-injection-3300107-2.patch | 532 bytes | smulvih2 |
Comments
Comment #2
smulvih2The patch attached fixes the error.
Comment #3
joseph.olstadtaking the liberty of calling this RTBC.
Comment #4
phot0x CreditAttribution: phot0x commentedPatch tested and working great. Thanks!
Comment #5
sylus CreditAttribution: sylus commentedCommitted and attributed!