Problem/Motivation
I installed Migrate Wizard and dependencies through Composer. When I activated the module, the following error occurred:
PHP Fatal error: Type of Drupal\migrate_wizard\Form\BaseFormFields::$typedConfigManager must be Drupal\Core\Config\TypedConfigManagerInterface (as in class Drupal\Core\Form\ConfigFormBase) in /web/modules/contrib/migrate_wizard/src/Form/BaseFormFields.php on line 23
I tried via Drush or UI, but that doesn't matter. The module shows as enabled, but doesn't seem to work (no config pages)
Also any Drush action afterwards and some admin pages give the same error.
Environment details:
Drupal 11.1.1
PHP 8.3.11
MariaDB 10.11.6
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | After.mp4 | 13.4 MB | sayan_k_dutta |
| #5 | Before.mp4 | 2.72 MB | sayan_k_dutta |
Issue fork migrate_wizard-3504217
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
kul.pratap commentedComment #4
kul.pratap commentedWhen we installed the module in Drupal 11, the following error occurred:
However, in the module's code, the property was declared without a type:
protected $typedConfigManager = NULL;This meant that when Drupal tried to validate the type against the parent class (ConfigFormBase), it found a mismatch, causing the fatal error.
Solution: Proper Type Hinting
To resolve this issue, we explicitly declared the
$typedConfigManagervariable with the correct type in the constructorPlease review.
Thanks
Comment #5
sayan_k_dutta commentedCloned the repo and reviewed the MR. It seems that the MR solves the issue of PHP Fatal Error perfectly which was occuring during enabling the module. Attaching screencasts for reference and moving this to RTBC.
Comment #6
carlos romero commentedThank you for reporting and collaborating.
I'm closing this issue!
Comment #7
carlos romero commentedComment #8
carlos romero commented