TVI Admin Interface crashes when installed on Drupal 11

Created on 26 August 2024, 3 months ago
Updated 21 September 2024, 2 months ago

Problem/Motivation

After migrating TVI from D10 -> D11 (patch to come), I tried going into the TVI Admin interface and was presented with this error :

The website encountered an unexpected error. Try again later.

ArgumentCountError: Too few arguments to function Drupal\Core\Form\ConfigFormBase::__construct(), 1 passed in /data/www/drupal/tomthorp-me.d10/web/modules/contrib/tvi/src/Form/TaxonomyViewsIntegratorSettingsForm.php on line 35 and exactly 2 expected in Drupal\Core\Form\ConfigFormBase->__construct() (line 43 of core/lib/Drupal/Core/Form/ConfigFormBase.php).

After investigating further, there is a change to Drupal Core's "EntityTypeManager" class, such that the 'set methods' are removed - thus the code in TVI has to be reworked.

Steps to reproduce

Perform a D10->D11 upgrade with TVI module + patch (patch to come).

Proposed resolution

Re work code based upon this Drupal note : ClassResolver and EntityTypeManager now require the service container as a constructor parameter instead of setting it using setContainer() .

🐛 Bug report
Status

Needs review

Version

2.0

Component

Code

Created by

🇦🇺Australia tomthorp

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024