My XML source file doesn't have any namespaces defined. Without the attached patch I get this error message:

Notice: Undefined index: namespaces in Drupal\migrate_plus\Plugin\migrate_plus\data_parser\Xml->registerNamespaces() (line 303 of modules/contrib/migrate_plus/src/Plugin/migrate_plus/data_parser/Xml.php).
Drupal\migrate_plus\Plugin\migrate_plus\data_parser\Xml->registerNamespaces(Object) (Line: 149)
Drupal\migrate_plus\Plugin\migrate_plus\data_parser\Xml->getSimpleXml() (Line: 204)
Drupal\migrate_plus\Plugin\migrate_plus\data_parser\Xml->fetchNextRow() (Line: 110)
Drupal\migrate_plus\DataParserPluginBase->next() (Line: 94)
Drupal\migrate_plus\DataParserPluginBase->rewind() (Line: 167)
Drupal\migrate_plus\Plugin\migrate_plus\data_parser\Xml->rewind() (Line: 195)
Drupal\migrate_plus\DataParserPluginBase->count() (Line: 387)
Drupal\migrate\Plugin\migrate\source\SourcePluginBase->count() (Line: 108)
Drupal\migrate_tools\Controller\MigrationListBuilder->buildRow(Object) (Line: 229)
Drupal\Core\Entity\EntityListBuilder->render() (Line: 22)
Drupal\Core\Entity\Controller\EntityListController->listing('migration')
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 574)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
call_user_func_array(Object, Array) (Line: 139)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 62)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 98)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 77)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 50)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 628)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

osman created an issue. See original summary.

osman’s picture

osman’s picture

Status: Active » Needs review
osman’s picture

Issue summary: View changes

  • mikeryan committed ad92910 on 8.x-2.x authored by osman
    Issue #2785717 by osman: registerNamespaces() method should check...
mikeryan’s picture

Status: Needs review » Fixed

Committed, thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.