Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
If I go through the setup process, and then do an import it works fine.
If I click into the Authors migration
- then add a custom field mapping, (any mapping, I tried mapping first name from wordpress into a textfield in Drupal)
- then click save
- then run the Authors migration again I get:
Call to undefined method MigrateFieldMapping::getXpath() in /path/to/contrib/migrate/plugins/sources/xml.inc on line 370
If I revert, the error goes away and the migration runs fine. I have the latest stable wordpress_migrate, with the latest stable migrate.
Thank you.
Comment | File | Size | Author |
---|---|---|---|
#2 | mapping_editor_does_not-2447115-2.patch | 2.06 KB | mikeryan |
Comments
Comment #1
mikeryanThe field mapping editor is part of Migrate. The handling of XML sources involves a custom field mapping class which takes an xpath argument, and the mapping editor is generating normal field mappings. This will be tricky...
Comment #2
mikeryanWell, got as far as this patch, which prevents the fatal error by using the right class. However, the saved field mappings have no xpaths, so they're not going to work (at least mappings from the XML source - mappings just consisting of a default value will work). The real answer is to add an xpath field to the mapping editor for XML migrations, don't really have time to tackle that at the moment.
Comment #4
mikeryanDone - the field mapping editor will now add an Xpath column for XML migrations, allowing you to view and edit your xpaths.
Comment #5
mikeryan