- Issue created by @knowak
- Status changed to Needs review
6 months ago 7:08pm 17 June 2024
I think there is a spelling mistake in the class RouteProcessor in processOutbound on line 32
public function processOutbound($route_name, Route $route, array &$parameters, BubbleableMetadata $bubbleable_metadata = NULL): void {
if ($route->hasDefault('_migrate_group')) {
$parameters['migration_group'] = 'default';
if ($this->entityTypeManager->hasHandler('migration', 'storage')) {
$migration = $this->entityTypeManager
->getStorage('migration')
->load($parameters['migration']);
if (($migration !== NULL) && $group = $migration->get('migration_group')) {
$parameters['migration_group'] = $group;
}
}
}
}
I think it should be $parameters['migration_group'] not $parameters['migration'].
I came across this exception being throw in a different module and changing it seem to fix the issue.
[error] AssertionError: Cannot load the "migration" entity with NULL ID. in assert() (line 261 of /app/web/core/lib/Drupal/Core/Entity/EntityStorageBase.php) #0 /app/web/core/lib/Drupal/Core/Entity/EntityStorageBase.php(261): assert(false, 'Cannot load the...')
#1 /app/web/modules/contrib/migrate_tools/src/Routing/RouteProcessor.php(32): Drupal\Core\Entity\EntityStorageBase->load(NULL)
#2 /app/web/core/lib/Drupal/Core/RouteProcessor/RouteProcessorManager.php(52): Drupal\migrate_tools\Routing\RouteProcessor->processOutbound('entity.migratio...', Object(Symfony\Component\Routing\Route), Array, Object(Drupal\Core\GeneratedUrl))
I'll work on getting a patch created.
Needs review
6.0
Code