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

Save error after validation fail #9341

Closed
mPieczka opened this issue Nov 4, 2020 · 7 comments · Fixed by #9688
Closed

Save error after validation fail #9341

mPieczka opened this issue Nov 4, 2020 · 7 comments · Fixed by #9688

Comments

@mPieczka
Copy link

mPieczka commented Nov 4, 2020

Hi,

I got a validation error. Document type has a text-string field with email validation (maybe with others also it will happen). A user creates this document type node in the content tab. On creating user put bad data on validate field. Umbraco returns validation error for field correctly, but after fix and press the save button again, system return 404 error. Node is saved anyway but with incorrect value (before the fix).

Umbraco version

I see this issue on Umbraco versions: 8.8, 8.8.1 and my colleague updated 8.8 to 8.9, and it still exists.

Reproduction

Bug summary

After validation exception on creating a new node, saving returns 404 exception and saves node with incorrect filed value.

Specifics

I think it happens on all browsers, but I have checked chrome and firefox.

image
image
image

Steps to reproduce

  1. Create new empty visual studio c# web project, and install umbraco via nuget.
  2. Run the project and go through installation process.
  3. Add new document type without a template, add fields group, in the group add a mandatory text-string field with email validation and validation messages. Set document type to be able as root. Save document type.
  4. Go to the content tab and try to create a new node of the created document type.
  5. Pass incorrect value to the field and try to save.
  6. Fix value and try to save again
  7. Refresh the page

Expected result

If the validation fails, the node isn't created. After the validation fix, I can save the node.

Actual result

After fail validation message node is created but not displayed on the content list. After page refresh, it appears. User can't fix validation issue and save a node.


This item has been added to our backlog AB#9485

@nul800sebastiaan
Copy link
Member

Thanks, I just tested this on the upcoming 8.8.2 and 8.9.1 and this is fixed with PR #9215 - we hope to get those releases out early next week, apologies for the inconvenience!

@mPieczka
Copy link
Author

mPieczka commented Nov 10, 2020

Hi,

I have upgraded Umbraco version to 8.8.2, and the issue still exists. I have also tried upgrade to 8.9.1 and create new projects with those versions. In every variant, I had the same error.

@nul800sebastiaan can you reopen the issue?

@nul800sebastiaan
Copy link
Member

Sorry about that @mPieczka it looks like I missed the fact that you were trying to validate the property as an email address, we'll have to look into it.

@nul800sebastiaan nul800sebastiaan added state/sprint-candidate We're trying to get this in a sprint at HQ in the next few weeks status/regression type/bug labels Nov 20, 2020
@nul800sebastiaan
Copy link
Member

This is possibly a duplicate of #8954

@mPieczka
Copy link
Author

mPieczka commented Dec 7, 2020

I have found a workaround for this. Adding event listener to the content saving event (https://our.umbraco.com/documentation/reference/events/ContentService-Events) and cancelling it if an email is incorrect fixes the issue. In this case, a user gets additional information about 3rd party system cancel, but it works.

image

@nul800sebastiaan
Copy link
Member

nul800sebastiaan commented Jan 20, 2021

Apologies everyone for the delay.

This is now fixed with PR #9688 and #9690, this will be available next as patch releases for 8.7 and up, plus the release of 8.11.0 also next week. 👍

@nul800sebastiaan nul800sebastiaan added release/8.10.2 release/8.11.0 release/8.7.2 release/8.8.3 release/8.9.2 and removed state/sprint-candidate We're trying to get this in a sprint at HQ in the next few weeks labels Jan 20, 2021
@cornehoskam-way
Copy link

cornehoskam-way commented Feb 8, 2021

@nul800sebastiaan I seem to keep running into this same issue, even after upgrading to Umbraco version 8.11.1. After any kind of validation error has occurred, fixing said error does not allow for the Item to be saved, until the Item has been closed and reopened in Umbraco (and losing all changes made to it). Any idea why this may happen?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants