backdrop-contrib / d2b_migrate

GNU General Public License v2.0
5 stars 6 forks source link

Step "Download Available projects" breaks if there is Google Analytics module #27

Closed irinaz closed 8 months ago

irinaz commented 8 months ago

I am migrating site that has disabled "Google Analytics" module and download stops with the following error message. @quicksketch , you mentioned during sprint on Nov 18 that there is something specific about this module - can you share your insights? Thank you in advance!

Notice: Undefined index: google_analytics in d2b_migrate_analysis_download_projects() (line 388 of /Users/irinazaks/Sites/localhost/backdroppress/modules/d2b_migrate/d2b_migrate.module).

docwilmot commented 8 months ago

It seems the D8 module is called google_analytics while the Backdrop version is googleanalytics (the D7 version was also googleanalytics) so the function is looking for the wrong name.

irinaz commented 8 months ago

@docwilmot , thank you so much! If we are to fix this bug, what approach would you suggest?

docwilmot commented 8 months ago

Untested, try add before line 387:

if ($project_name == 'google_analytics`) {
  $project_name = 'googleanalytics';
}
docwilmot commented 8 months ago

This should be fixed. Projects with wrong name will need to be manually downloaded

irinaz commented 8 months ago

https://github.com/backdrop-contrib/d2b_migrate/issues/30 is solution to this issue