What this patch does is allow the export of webform_validation rules using the webform_share module
props to mmkc for the code.
see patch
This may help others for the similar issue in the webform_validation queue #1038208: Allow rules to be exported and imported with node_export module
See specifically the logic in the two functions:
webform_share_components_update_form_submit
and
webform_share_export
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | webform_share_export_validation_rules-2397397-1.patch | 3.51 KB | joseph.olstad |
Comments
Comment #1
joseph.olstadThis patch will apply to webform_share v1.2 or the 2013-Oct-26 dev build OR to the 1.x branch of webform_share's git repo from the commit tagged 2013-Oct-26
Comment #2
ladybug_3777 commentedI will be doing some testing of this patch for you and I (or a coworker) should be back with our results soon.
Comment #3
ladybug_3777 commentedSo far I have found (with some basic testing) that your patch does work and it does seem to be properly exporting webform validations. However, once our webforms become more complex (for example including field sets), the webform share module starts to fall apart (even without your patch). All of the fields disappear from the webform unless we apply the patch found on this page: https://www.drupal.org/node/1956622 HOWEVER, the patch on that page and the patch you created here cannot be applied together because there is a conflict between them.
I've noticed that this module has become a bit abandoned. It has been almost 2 years since ANYTHING has been committed, even to the dev version. This is starting to become a problem because the community is fixing issues, but without someone committing those issues to the dev version (at least) the community cannot continue to build patches together. They will eventually overlap and conflict with one another like we see here.
Due to the abandonment of this module we are seeking different ways to export/import our webforms. Node Export is a good solution, but it too lacks the export/import of the webform validation piece. We've looked into webform UUID (along with webform features) but again, validation is not being captured.
I know that the webform validation module is attempting to work on this issue, but it still needs work:
https://www.drupal.org/node/1038208
If anyone has a solution to the issue of exporting/importing validation for webforms I would love to hear about it. All my research keeps leading me to a dead end on this topic.
Comment #4
joseph.olstadwhat might be a solution down the road is https://www.drupal.org/project/webform_entity
having everything in webforms as entities will allow you to use features export for entities. We would be interested in this for deployment of webforms as entities. (push from one master server to many other children sites for example)
Comment #5
cravecode commentedI'd like to mention a module called "Node Export Webform" I created that extends node_export to handle webforms and webform_validation. It also corrects some issue I ran into with Node Export munging up some components.
Comment #6
ladybug_3777 commentedNice! I'll check that out cravecode! I ended up developing our own validation export module, but I'd like to see how it compares to the work you've done.
Thanks for the update!
Comment #7
liam morlandComment #8
alan d. commentedThis needs a re-roll with other commits.
PS. Watch your tabs / spaces.