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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mikeryan’s picture

Title: Error with custom field mapping from UI » Mapping editor does not properly save XML mappings
Project: WordPress Migrate » Migrate
Issue tags: +Migrate 2.8

The 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...

mikeryan’s picture

Version: 7.x-2.3 » 7.x-2.x-dev
Status: Active » Needs work
Issue tags: -Migrate 2.8
FileSize
2.06 KB

Well, 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.

  • mikeryan committed 96354eb on
    Issue #2447115 by mikeryan: Add xpath handling to the field mapping...
mikeryan’s picture

Status: Needs work » Fixed

Done - the field mapping editor will now add an Xpath column for XML migrations, allowing you to view and edit your xpaths.

mikeryan’s picture

Issue tags: +Migrate 2.8

Status: Fixed » Closed (fixed)

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