umbraco / The-Starter-Kit

31 stars 36 forks source link

Ensure contact form isn't imported if it already exists #70

Closed clausjensen closed 4 years ago

clausjensen commented 4 years ago

Some of the install code is being run twice and while this is likely not correct either, I do not have the overview of what is causing this to happen - whether it is in the starterkit or in the way packages are handled.

To avoid regression problems related to trying to prevent this from running twice, I've instead made a check to ensure the contact form isn't imported as a duplicate if it already exists.

This has worked without any issues for quite some time due to a file simply being overwritten when a form was imported twice, but if Forms is configured to store forms in the database, this will now cause duplicate form entries to be added to the database.