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.
I was trying to migrate a taxonomy, and found out that the allowDuplicateTerms option, that I had set to False, was not being honored. The problem is that DrupalTermMigration instantiates the destination without any options. I attach a very simple patch to fix this.
I also checked that all destination classes that extend MigrateDestinationEntity accept options, but the Drupal*Migration classes that create them don't pass them any.
Comment | File | Size | Author |
---|---|---|---|
#2 | migrate_d2d-pass-arguments-to-destinations-2099639-2.patch | 1.55 KB | Dave Hill |
001-migrate_d2d-pass_pass_arguments_to_destination.patch | 557 bytes | pablojais |
Comments
Comment #1
mrP CreditAttribution: mrP commentedComment #2
Dave Hill CreditAttribution: Dave Hill commentedThis is a slightly improved patch that uses similar approach to source options.
Comment #3
mikeryanGood idea, but a couple of things:
1. Please do the array_merge as sourceOptions does, which enables classes to set default options before calling their parent constructor.
2. It should be extended to all destinations that support options.
Thanks.