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

duplicate form exception #425

Closed
tom-activeis opened this issue Oct 14, 2020 · 3 comments
Closed

duplicate form exception #425

tom-activeis opened this issue Oct 14, 2020 · 3 comments

Comments

@tom-activeis
Copy link

tom-activeis commented Oct 14, 2020

server error when saving a form that has a duplicate name

Message: "An error has occurred."
StackTrace: " at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable1 source, Func2 predicate)
↵ at Umbraco.Forms.Web.Editors.FormController.FormExist(String formName)
↵ at Umbraco.Forms.Web.Editors.FormController.SaveForm(FormDesign formData)

Specifics

Umbraco forms version 8.5.3

Steps to reproduce

  1. copy an existing form
  2. rename it to remove the appended "(1)" so has same name as existing form
  3. form is renamed (form gets saved with duplicate name)
  4. form cannot be modified or saved any further (e.g. adding fields)

Expected result

form gets saved OR should be unable to save form on step 3 on duplicate name

Actual result

server error on form save


This item has been added to our backlog AB#9084

@ronaldbarendse
Copy link

If the forms are stored in the database, this might be related to #402.

@tom-activeis
Copy link
Author

tom-activeis commented Oct 21, 2020

ah, we're not storing forms in database in this project though

it looks as though there might be validation to prevent forms of the same name being created, but this must be being bypassed when the form is copied and renamed, as in the steps to reproduce supplied

@clausjensen clausjensen added the state/sprint-candidate We're trying to get this in a sprint at HQ in the next few weeks label Oct 28, 2020
@AndyButland
Copy link

In looking to resolve this today, I couldn't replicate - so seems it has been resolved at some point since the issue was raised.

I've tested with forms configured for storage on disk and in the database, and in both cases if I copy a form and enter the name of the current or another existing form, the name is suffixed with " (1)" or similar to ensure form names are unique.

I'll close tag as part of the latest release though was likely fixed in an earlier version.

@AndyButland AndyButland added release/8.7.5 and removed state/sprint-candidate We're trying to get this in a sprint at HQ in the next few weeks labels Jul 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants