I needed some minor fixes to get this plugin working with a wordpress source.

diff --git a/src/Plugin/migrate/source/MigrateXmlIterator.php b/src/Plugin/migrate/source/MigrateXmlIterator.php
index 807af4e..460629d 100644
--- a/src/Plugin/migrate/source/MigrateXmlIterator.php
+++ b/src/Plugin/migrate/source/MigrateXmlIterator.php
@@ -92,7 +92,7 @@ class MigrateXmlIterator implements \Iterator {
    *   The name of the MigrateXmlReader class.
    */
   public function getReaderClassName() {
-    return '\Drupal\migrate_plus\Plugin\migrate\source\MigrateXmlReader';
+    return '\Drupal\migrate_source_xml\Plugin\migrate\source\MigrateXmlReader';
   }

   /**
@@ -149,6 +149,13 @@ class MigrateXmlIterator implements \Iterator {
   /**
    * {@inheritdoc}
    */
+  public function count() {
+    return $this->xmlSource->computeCount();
+  }
+
+  /**
+   * {@inheritdoc}
+   */
   public function next() {
     $this->currentElement = NULL;
     $this->currentKey = NULL;
diff --git a/src/Plugin/migrate/source/XmlBase.php b/src/Plugin/migrate/source/XmlBase.php
index c75c683..87df3e6 100644
--- a/src/Plugin/migrate/source/XmlBase.php
+++ b/src/Plugin/migrate/source/XmlBase.php
@@ -75,7 +75,7 @@ abstract class XmlBase extends SourcePluginBase {
     parent::__construct($configuration, $plugin_id, $plugin_definition, $migration);

     if (empty($configuration['iterator_class'])) {
-      $iterator_class = '\Drupal\migrate_plus\Plugin\migrate\source\MigrateXmlIterator';
+      $iterator_class = '\Drupal\migrate_source_xml\Plugin\migrate\source\\MigrateXmlIterator';
     }
     else {
       $iterator_class = $configuration['iterator_class'];
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

digitaldonkey created an issue. See original summary.

digitaldonkey’s picture

mkolar’s picture

Thanks for the patch, Fixed my issue

jcnventura’s picture

The module maintainer should definitively make the 'refactor' branch official and stop having everyone submitting patches to the different versions in use.

mikeryan’s picture

Status: Needs review » Fixed

Committed, thanks.

Status: Fixed » Closed (fixed)

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