webiny-js
webiny-js copied to clipboard
fix: fix form builder settings after switching to new locale
Changes
Resolve issue: Unable to submit a form in newly created locale.
Form submission was throwing "Form Builder" settings not found! error, since there were no Form Builder settings created for the new locale. This also caused the same issue when saving Form Builder settings form.
Issue was resolved by triggering Form Builder settings creation, when a new locale is created.
While fixing this issue I've found that the same is happening for the Website settings form, since Website settings are also not created for new locale. If this fix is ok, then something similar can be done inside api-page-builder to create settings after a new locale is created.
Also while testing this fix I've noticed that after switching to a new locale user is unable to create any pages until a page category with static slug is created. Is this expected behavior?
@adrians5j @Pavel910 What do you think?
How Has This Been Tested?
Manual
Documentation
None
@adrians5j While adding similar changes to PB I've noticed that there is no delete option in PB settings crud (FB settings crud has it). Should we add one? Then we will be able to delete settings after the locale is deleted (just like we do in FB now).
Yes, let's do it @neatbyte-vnobis . Thanks!
@adrians5j Currently, the FB/HCMS PR is focused on migrating only forms and submissions. Changes in this PR are related to FB settings (not sure what is current plan for FB settings migration to HCMS).
The FB-related changes can be included in the FB/HCMS PR, and, as you've suggested, the PB part can be moved to a separate PR.
@adrians5j Any updates on this one? Should we move PB changes to a separate PR or leave it as it is?