U4-4782 - Duplicate content after validation error correction

Created by Pawel Choroszczak 29 Apr 2014, 12:41:20 Updated by Sebastiaan Janssen 19 Aug 2014, 12:53:19

Two field are mandatory, a title (textstring) and text(richtext editor). If I forget to fill text, i get an error about it. When I fill it and save, Umbraco saved them both, one with only title and the second with title and text. The second one get a name with "(1)" on the end

3 Attachments

Comments

Chris Lord 13 May 2014, 11:21:32

This is very frustrating, seeing this in 7.1.2


Brian Williams 16 May 2014, 16:42:36

Any news on this? It is incredibly frustrating.


Kenn Jacobsen 29 May 2014, 17:29:09

This is still present in 7.1.4. Just to clarify, here are steps to reproduce:

  1. Create a doctype with an "Email address" property
  2. Create a document based on this doctype and save it without entering an email address
  3. After the save submit, the email validation error occurs
  4. Choose "stay" in the "unsaved changes" dialog
  5. Enter a correct email address and save the document again
  6. The document is saved as a new document, causing the duplicate content error

See attached screen shots.


Christian Luebeck 25 Jun 2014, 08:07:43

Any update? This bug renders validation unusable... :(


Matt Muller 10 Jul 2014, 20:01:48

ditto - this is causing issues with a deployment we are doing at Microsoft


Shannon Deminick 16 Jul 2014, 03:25:37

This must be fixed in the latest codebase because i cannot replicate this. See:

http://screencast.com/t/YtqVVo2w0C


Robert Foster 16 Jul 2014, 03:41:56

Which version did you try it in? 7.1.5 branch? Let me know and I'll try to replicate it as well...


Shannon Deminick 16 Jul 2014, 03:43:26

yup, 7.1.5


Kenn Jacobsen 16 Jul 2014, 06:30:59

Looks like it's fixed in 7.1.5, I can't reproduce it either (tested build 199).


Shannon Deminick 16 Jul 2014, 07:12:52

That's great news :)


Andrey Shchekin 18 Aug 2014, 03:06:32

Encountered that in 7.1.4, I can still reproduce it in 7.1.5 (latest from GitHub as of 18.08.2014). For me it only happens when Validation is set, Mandatory works correctly.

So Shannon Deminick's screencast works for me, but validation doesn't.


Andrey Shchekin 18 Aug 2014, 03:32:27

OK, it seems this happens because Mandatory is validated before submit, but Validation is actually validated on server. Server saves whether Validation succeeds or not, then reports any errors and suggests a redirect.

However due to the error response, the form is still considered dirty, and instead of an unconditional redirect valFormManager shows "You have unsaved changes" dialog. If you agree to the redirect, it all works well, if not -- the unsaved copy might be saved a second time, creating a duplicate.


Shannon Deminick 18 Aug 2014, 19:58:00

Good find, i can replicate that.


Shannon Deminick 18 Aug 2014, 20:58:49

Fixed in f4c2b7419a87604337fbcf6e0c63c8a63e6be636


Priority: Major

Type: Bug

State: Fixed

Assignee: Shannon Deminick

Difficulty: Normal

Category:

Backwards Compatible: True

Fix Submitted:

Affected versions: 7.1.2, 7.1.4

Due in version: 7.1.5

Sprint:

Story Points:

Cycle: