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.
According to the documentation, you can remove fields from the Source and Destination pages in the UI by creating a DNM (Do Not Migrate) group (or other appropriate name). However, you have to do it on a field-by-field basis, and in cases like the Metatag module, which adds a ton of fields, that creates ~50 fields I would have to add to DNM one by one. Is there a way to specify fields using a wildcard, such as
$this->addFieldMapping('metatag_*')->issueGroup('DNM');
or even just all subfields, since those are the bulk of all metagag fields listed in the UI:
$this->addFieldMapping('metatag_og:*)->issueGroup('DNM');
This would allow me to make my UI cleaner without making my code so bulky.
Thanks.
Comments
Comment #1
mikeryanComment #2
KarlSheaI have a migration with lots of enabled Metatag modules and I was determined to not have a giant list in code. You can add this to a base migration and then call it somewhere in your migration's constructor: