2

On my development instance, I added a freeform form. Now I would like to deploy that form to the staging, or later, live site.

When committing my changes, I noticed that nothing was added to project.yaml. So I guess the changes are just saved in the DB and will not be synced at git-based deploy.

Is that by design? Can I enable useProjectConfigFile somewhere?

If not: how do I export the form definitions and deploy them to another instance? By MySQL?

2 Answers 2

1

Project config is designed to sync the architecture of your site, not the content, so structural changes can be made without affecting the content. Forms are seen as content, like entries, so this would be the expected behaviour.

The suggested workflow would be to create the form on the production site, then pull to local environment to do any front-end work, then push those changes to production.

The nystudio107 craft scripts are pretty useful for syncing databases and assets if needed.

6
  • Then again, static translations are also content
    – Urs
    Jul 4, 2020 at 12:15
  • But they’re not stored in the database so aren’t effected by the issues that project config solves.
    – dmatthams
    Jul 4, 2020 at 21:25
  • 1
    Yeah, just sayin that there are also other places where that separation isnt complete. Imho translations should be in the database as well. The reason they‘re not is just performance. A solution (getting off topic) might be an extension that stores translations in the db and writes a copy to the code base. Like a reverse project config
    – Urs
    Jul 5, 2020 at 11:48
  • I understand where you're coming from, but I find the easy way to think about it is that if it can be edited by the client, then it is out of the scope of project config.
    – dmatthams
    Jul 6, 2020 at 9:38
  • Yeah I just think client should also be able to edit translations (not only freeform, talking generally)
    – Urs
    Jul 6, 2020 at 20:46
0

In my experience none of the Solspace plugins migrate their admin stuff the "Craft" way.

I would not recommend useProjectConfigFile if you are using Freeform or Calendar, as this will lead to confusion.

1
  • 1
    Apparently freeform sees the form as content, not as definition. Indeed, this has proven a tad acrobatic: edit the form in the live instance, but add translations in the codebase on local. I found my workflow now; I have a sync-script that downloads the entire database to ddev on one command. It's not magic, and you still have to keep your head together as hell, but if it helps I can share it –
    – Urs
    Jul 1, 2020 at 20:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.