Error on import on fresh drupal 9 instalation

Created on 18 November 2020, over 4 years ago
Updated 2 January 2024, over 1 year ago

Problem/Motivation

Error on importing the bee configurations.

Steps to reproduce

1. On a fresh drupal 9 installation I installed the bee module using composer.
2. I created a new CT and make it bookable.
3. I exported the configuration and reset the database to check the import.
4. When I run the import command I encounter this error:

Error: Call to a member function getTargetEntityType() on null in Drupal\bat_event_series\Entity\EventSeriesType->getTargetEntityType() (line 98 of /var/www/html/youmanage/web/modules/contrib/bat/modules/bat_event_series/src/Entity/EventSeriesType.php) #0 /var/www/html/youmanage/web/modules/contrib/bat/modules/bat_event_series/src/Entity/EventSeriesType.php(114): Drupal\bat_event_series\Entity\EventSeriesType->getTargetEntityType()
#1 /var/www/html/youmanage/web/core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php(364): Drupal\bat_event_series\Entity\EventSeriesType->save()
#2 /var/www/html/youmanage/web/core/lib/Drupal/Core/Config/ConfigImporter.php(990): Drupal\Core\Config\Entity\ConfigEntityStorage->importCreate('bat_event_serie...', Object(Drupal\Core\Config\Config), Object(Drupal\Core\Config\Config))
#3 /var/www/html/youmanage/web/core/lib/Drupal/Core/Config/ConfigImporter.php(776): Drupal\Core\Config\ConfigImporter->importInvokeOwner('', 'create', 'bat_event_serie...')
#4 /var/www/html/youmanage/web/core/lib/Drupal/Core/Config/ConfigImporter.php(603): Drupal\Core\Config\ConfigImporter->processConfiguration('', 'create', 'bat_event_serie...')
#5 /var/www/html/youmanage/web/core/lib/Drupal/Core/Config/ConfigImporter.php(507): Drupal\Core\Config\ConfigImporter->processConfigurations(Array)
#6 /var/www/html/youmanage/vendor/drush/drush/src/Drupal/Commands/config/ConfigImportCommands.php(333): Drupal\Core\Config\ConfigImporter->doSyncStep('processConfigur...', Array)
#7 /var/www/html/youmanage/vendor/drush/drush/includes/drush.inc(206): Drush\Drupal\Commands\config\ConfigImportCommands->doImport(Object(Drupal\Core\Config\StorageComparer))
#8 /var/www/html/youmanage/vendor/drush/drush/includes/drush.inc(197): drush_call_user_func_array(Array, Array)
#9 /var/www/html/youmanage/vendor/drush/drush/src/Drupal/Commands/config/ConfigImportCommands.php(304): drush_op(Array, Object(Drupal\Core\Config\StorageComparer))
#10 [internal function]: Drush\Drupal\Commands\config\ConfigImportCommands->import(NULL, Array)
#11 /var/www/html/youmanage/vendor/consolidation/annotated-command/src/CommandProcessor.php(257): call_user_func_array(Array, Array)
#12 /var/www/html/youmanage/vendor/consolidation/annotated-command/src/CommandProcessor.php(212): Consolidation\AnnotatedCommand\CommandProcessor->runCommandCallback(Array, Object(Consolidation\AnnotatedCommand\CommandData))
#13 /var/www/html/youmanage/vendor/consolidation/annotated-command/src/CommandProcessor.php(176): Consolidation\AnnotatedCommand\CommandProcessor->validateRunAndAlter(Array, Array, Object(Consolidation\AnnotatedCommand\CommandData))
#14 /var/www/html/youmanage/vendor/consolidation/annotated-command/src/AnnotatedCommand.php(311): Consolidation\AnnotatedCommand\CommandProcessor->process(Object(Symfony\Component\Console\Output\ConsoleOutput), Array, Array, Object(Consolidation\AnnotatedCommand\CommandData))
#15 /var/www/html/youmanage/vendor/symfony/console/Command/Command.php(255): Consolidation\AnnotatedCommand\AnnotatedCommand->execute(Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#16 /var/www/html/youmanage/vendor/symfony/console/Application.php(1018): Symfony\Component\Console\Command\Command->run(Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#17 /var/www/html/youmanage/vendor/symfony/console/Application.php(271): Symfony\Component\Console\Application->doRunCommand(Object(Consolidation\AnnotatedCommand\AnnotatedCommand), Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#18 /var/www/html/youmanage/vendor/symfony/console/Application.php(147): Symfony\Component\Console\Application->doRun(Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#19 /var/www/html/youmanage/vendor/drush/drush/src/Runtime/Runtime.php(118): Symfony\Component\Console\Application->run(Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#20 /var/www/html/youmanage/vendor/drush/drush/src/Runtime/Runtime.php(49): Drush\Runtime\Runtime->doRun(Array, Object(Symfony\Component\Console\Output\ConsoleOutput))
#21 /var/www/html/youmanage/vendor/drush/drush/drush.php(72): Drush\Runtime\Runtime->run(Array)
#22 /var/www/html/youmanage/vendor/drush/drush/drush(4): require('/var/www/html/y...')
#23 {main}.

Extra details

If I run the config import command 2 more times the error does not appear anymore and the config is executed succesfully.

🐛 Bug report
Status

Postponed

Version

1.0

Component

Code

Created by

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024