We are required to detailed working steps to use this module.
This could help other to use this module.

Comments

sureshcj created an issue. See original summary.

sureshcj’s picture

Title: Working Steps rquired. » Working Steps Required.
sureshcj’s picture

Any update ?

natemow’s picture

StatusFileSize
new23.08 KB

I managed to get this working for a migration from 7.x. Here's what I did:

I started with all of the following modules enabled: webform, migrate, migrate_drupal, migrate_drupal_ui, migrate_upgrade, migrate_tools, migrate_plus, migrate_source_csv -- not all of which are relevant here, just listing my baseline.

  • Make sure your legacy webform module is up to date. 7.x-4.x adds a bunch of new columns related to progress bars that aren't present in previous releases.
  • Download and install webform_migrate.
  • Copy the "migration_templates" and "src" folders from the webform_migrate directory to your existing webform directory.
  • In the new webform/migration_templates dir, copy either the d6/* or d7/* files up a level, i.e. webform/migration_templates/d7_webform.yml
    • !!important!! Remove this line from both config files: migration_group: migrate_drupal_7 -- this can leave you with unwanted config cruft if you try to rollback or start over completely.
  • Run this with your legacy D6 or D7 db creds: drush migrate-upgrade --legacy-db-url=mysql://user:pass@localhost/database --configure-only -- this will create a ton of new migrate* tables in your database. This also creates the "migrate_drupal_7" migration group.
  • You should now see the installed webform_migrate routines somewhere on example.com/admin/structure/migrate/manage/migrate_drupal_7/migrations

    webform_migrate installed
  • Run the migrations via Drush: drush migrate-import upgrade_upgrade_d7_webform --execute-dependencies; drush migrate-import upgrade_upgrade_d7_webform_submission --execute-dependencies;
  • Review the results at example.com/admin/structure/webform and do a happy dance because it worked!
natemow’s picture

Eureka! Got it working this morning...updated my previous comment #4 with complete HOWTO.

natemow’s picture

Status: Active » Needs review
myhemant’s picture

Great, Now its working for me.
After following the above steps now able to migrate webform from D7 to D8.

:)

bill_redman’s picture

I tried the steps in #4 but when I executed the drush migrate_upgrade... --configure-only step I got the following error:

The d7_webform_submission plugin must define the source_module property

I moved the d7*.yml files up a level as indicated and moved the migration_templates and src directories to the webform directory as indicated. By the way, there already existed a src and Plugin directory in webform, but the applicable migrate directory was placed in Plugin. I don't know if this matters or if perhaps something else needed moving.

I ran the patch provided at https://www.drupal.org/project/webform_migrate/issues/2971329 but it did not resolve the problem. Error still occurs.

I should also mention that I have already migrated my entire website. Does that make a difference?

Any suggestions will be most welcome.

RickZebra’s picture

Bill_redman you have to make sure the d7/d6_webform.yml and d7/d6_webform_submission.yml is in the root of the Webform module. Once I moved them up it ran.

Edit: nope that didn't work I am getting the same error as Bill_redman

veronicaseveryn’s picture

Here's the structure of my Webform module after I copied the files into it from webform_migrate (I needed to run D7 to D8 migration. by the way, I didn't enable this module, just grabbed the files from it):

webform_folder_structure

And to fix "The d7_webform_submission plugin must define the source_module property" error you need to add "source_module" definition into both D7WebformSubmission.php and D7Webform.php files, for example:

webform_folder_structure

Also, after you copied files into Webform module, don't forget to change the namespace for both D7WebformSubmission.php and D7Webform.php files, so that it doesn't say "webform_migrate" in the path.

indys’s picture

I have followed all the steps in #4, get the same error as #8:

The d7_webform_submission plugin must define the source_module property

Followed fix in #10. Drush gives me this error:

[Syntax Error] Expected Doctrine\Common\Annotations\DocLexer::T_CLOSE_PAREN
THESIS, got 'source_module' at position 44 in class Drupal\webform\Plugin\m
igrate\source\d7\D7Webform.

Any ideas on how to fix? Thanks in advance.

othermachines’s picture

@indys - That's a syntax error where you've defined source_module. Without seeing your code, my guess is you're missing a comma.

hypertext200’s picture

Status: Needs review » Fixed

I updated the readme.md hope that helps.

  • 54fb761 committed on 8.x-1.x
    Issue #2930108 by veronicaSeveryn, natemow: Working Steps Required
    

Status: Fixed » Closed (fixed)

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

michelle’s picture

I'm looking at the readme and it still seems pretty sparse: https://cgit.drupalcode.org/webform_migrate/tree/README.md . Comment #4 in this issue has a lot more detail that could maybe be used as a start?

michelle’s picture

#4 worked for me at first but then it stopped working and I had to start over I managed to get it working in a much simpler way. I just had to rename the template files like this and then copy them to the sync directory and then run drush cim:

migrate_plus.migration.upgrade_d7_webform.yml
migrate_plus.migration.upgrade_d7_webform_submission.yml

iancawthorne’s picture

I would like to add that the post by @Michelle at #17 also worked for me, resulting in a successful migration of webforms, webform_submissions and attachment to their original webform content type nodes. No need to enable the webform_migrate module, just copy the yml files as described and drush cim.

If doing this via the config ui instead of drush cim, I think the correct "Configuration type" to import against is "Migration". Having done the drush cim, I can see when going to single export of configuration that the webform and webform submission options both appear when "Migration" is the type selected.

I hope this helps. It would be really good to get these steps added to the documentation, as it really is a useful migration that appears to work well!

renatog’s picture

I followed the #4 and works well here.

P.s. In README.md we don't have these steps, it would be amazing if we updated the readme with these steps.

renatog’s picture

StatusFileSize
new2.77 KB

Follow the patch with README.md updated with the steps present on #4