Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Selective webform sync via config #7

Open
yorkshire-pudding opened this issue Nov 10, 2022 · 1 comment
Open

Selective webform sync via config #7

yorkshire-pudding opened this issue Nov 10, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@yorkshire-pudding
Copy link
Collaborator

yorkshire-pudding commented Nov 10, 2022

Having converted this module to use json for the config import and export, I'm thinking about possibilities for selectively importing and exporting webform configuration via the config system to assist with deployment between local/staging/test/live.

In a related issue raised by @argiepiano on the webform module, @herbdool points out some key considerations that would need to be taken into account with such functionality:

All this configuration is per node and nodes only exist in the database, not in config. So it's possible for someone to delete a node and the configuration would be left behind. Or sync the config from staging where the node exists to live where it doesn't exist. Or, where the node ID is actually for a different content type altogether. So we'd have to think about how to deal with those cases.

My thoughts so far are:

  • manual import and export to config for selected nodes
  • use content type in config file/item to enable a double check against node id and content type
  • Only import if exact match between node id and content type
  • bee command to allow this to be scripted

I'd be interested in any views on this. Would this work for you? If not, what do you think would work? How would any alternative solutions address the considerations?

@yorkshire-pudding yorkshire-pudding added the enhancement New feature or request label Nov 10, 2022
@argiepiano
Copy link

@yorkshire-pudding thanks for these thoughts.

I'm looking into Webform Share now. It would solve the issue I had when I originally made that post in Webform. (Thanks for porting it!). This module makes it easier to move/update components for a specific webform between development and production.

If we want to go the route of import/export through the configuration UI, then, as you and @herbdool said, we need to take into account the fact that the node ID may be different between environments, or inexistent. Such functionality (config ui import./export) would be be best as part the main Webform module, or as separate, new contrib module. I don't think it's worth modifying Webform Share to accommodate this, as it already does what it's supposed to do very well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants