Closed (fixed)
Project:
Webform: Migrate
Version:
8.x-1.0-alpha1
Component:
Documentation
Priority:
Major
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
12 Dec 2017 at 07:57 UTC
Updated:
12 Mar 2020 at 15:46 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
sureshcj commentedComment #3
sureshcj commentedAny update ?
Comment #4
natemow commentedI 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.migration_group: migrate_drupal_7-- this can leave you with unwanted config cruft if you try to rollback or start over completely.drush migrate-upgrade --legacy-db-url=mysql://user:pass@localhost/database --configure-only-- this will create a ton of newmigrate*tables in your database. This also creates the "migrate_drupal_7" migration group.drush migrate-import upgrade_upgrade_d7_webform --execute-dependencies; drush migrate-import upgrade_upgrade_d7_webform_submission --execute-dependencies;Comment #5
natemow commentedEureka! Got it working this morning...updated my previous comment #4 with complete HOWTO.
Comment #6
natemow commentedComment #7
myhemant commentedGreat, Now its working for me.
After following the above steps now able to migrate webform from D7 to D8.
:)
Comment #8
bill_redman commentedI 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.
Comment #9
RickZebra commentedBill_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
Comment #10
veronicaseveryn commentedHere'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):
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:
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.
Comment #11
indys commentedI 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.
Comment #12
othermachines commented@indys - That's a syntax error where you've defined source_module. Without seeing your code, my guess is you're missing a comma.
Comment #13
hypertext200I updated the readme.md hope that helps.
Comment #16
michelleI'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?
Comment #17
michelle#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
Comment #18
iancawthorne commentedI 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!
Comment #19
renatog commentedI 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.
Comment #20
renatog commentedFollow the patch with README.md updated with the steps present on #4