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

benjifisher created an issue. See original summary.

benjifisher’s picture

Assigned: benjifisher » Unassigned
Status: Active » Needs review
StatusFileSize
new542 bytes

The attached patch implements the fix described above. Using this patch, I no longer get the warning messages.

benjifisher’s picture

Issue summary: View changes
StatusFileSize
new551 bytes

At first, I assumed that the intention of 'advanced/sso/disqus_logo': was to set that component to an empty value (the default set in config/install/disqus.settings.yml.

On second thought, since disqus_logo is one of the variables listed in the source section 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_logo variable, if set.

Since these are 1-line patches, I am not attaching an interdiff.

marvil07’s picture

Status: Needs review » Reviewed & tested by the community

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

gaurav.kapoor’s picture

Modified the patch as migration_template directory has been renamed to migrations.

  • benjifisher authored 1d18b36 on 8.x-1.x
    Issue #2987620 by benjifisher: Warnings caused by migration template
    
gaurav.kapoor’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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