Problem/Motivation
I am running a custom migration using drush and the Migrate Tools module. I have the Disqus module enabled, although the custom migration does not handle Disqus. Whenever I run a migration or even check the status, I get two warning messages:
$ drush migrate-status --group=base
Invalid argument supplied for foreach() Migration.php:631 [warning]
Invalid argument supplied for foreach() Migration.php:631 [warning]
Proposed resolution
I have tracked the problem to migration_templates/d7_disqus_settings.yml: we should replace the line
'advanced/sso/disqus_logo':
with
'advanced/sso/disqus_logo': disqus_logo
Remaining tasks
User interface changes
None.
API changes
None.
Data model changes
None.
Comments
Comment #2
benjifisherThe attached patch implements the fix described above. Using this patch, I no longer get the warning messages.
Comment #3
benjifisherAt first, I assumed that the intention of
'advanced/sso/disqus_logo':was to set that component to an empty value (the default set inconfig/install/disqus.settings.yml.On second thought, since
disqus_logois one of the variables listed in thesourcesection of the migration, the intention is probably to map the value of that variable. I am attaching a patch that does this.Either patch should prevent the warnings. I have not tested, but I expect this second patch to correctly migrate the
disqus_logovariable, if set.Since these are 1-line patches, I am not attaching an interdiff.
Comment #4
marvil07 commented@benjifisher, I have tested that the patch makes the warnings disappear in unrelated migrations, e.g. on a migrate status, as originally reported.
Update: One thing to have this working after applying is to run a cache rebuild.
Comment #5
gaurav.kapoor commentedModified the patch as migration_template directory has been renamed to migrations.
Comment #7
gaurav.kapoor commented