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.
This errors on migration with Drupal 8.5+ see attached issue and CR for cause. Source Plugin annotation must provide the 'source_module" key.
#2908282: Throw exception for source plugins without a source_module property
Change Record: https://www.drupal.org/node/2911881
Comment | File | Size | Author |
---|---|---|---|
#5 | 2950206-5-domain-migrate-plugin.patch | 885 bytes | agentrickard |
#3 | interdiff.2950206.2-3.txt | 1.01 KB | mikelutz |
#3 | 2950206-3.domain.-error-The-d7domain-plugin-must-define-the-sourcemodule-property.patch | 549 bytes | mikelutz |
Comments
Comment #2
agentrickardThat was a nice bug report. Thanks for the context.
Here's a patch for testing.
Comment #3
mikelutzActually, it needs to go in the annotation for the source plugin, not the migration itself. I meant to file the patch earlier, I just didn't have time yesterday.
Comment #4
agentrickardAh. I didn't write that part and forgot it was there. Thanks.
Comment #5
agentrickardAs I understand https://www.drupal.org/node/2831566, we also should add destination_module to the template, which is provided as a convenience for developers.
Updated patch.
Comment #6
mikelutzAh yes, that is a good practice as well. My main concern with this issue was that once 8.5 drops today, If the source_module annotation isn't there, all Drupal migrations will error out if the module is installed, but yes, that is best practice, and if you want to finish a cleanup of the migrations, change the name of the 'migration_templates' directory to 'migrations' as well, since 'migration_templates' is deprecated too.
Either way, I've been recommending maintainers get this committed quickly so as to not break migrations with 8.5.
Comment #7
agentrickardOk, fixed.
Comment #8
agentrickardWell, I tagged alpha13, but can;t make a release yet.
Comment #9
mwebaze CreditAttribution: mwebaze as a volunteer and at JSI Research & Training Institute, Inc. (JSI) commentedIt doesn't look like this issue has been fixed in 8.5. I am trying to upgrade from D7 to D8 and getting 'The name plugin must define the source_module property.'
Comment #10
agentrickard@mwebaze that sounds like a core issue. alpha13 contains the code required by the change notice.
Comment #11
mwebaze CreditAttribution: mwebaze as a volunteer and at JSI Research & Training Institute, Inc. (JSI) commented@agentrickard I figured out what was causing it. One of the contrib modules did implement its @MigrateSource with a source and destination id. The error is not so specific so I had to go through the contrib modules to find out which one has a migration plugin implemented and check for missing source_module id. Once I uninstalled it, it went fine