umbraco / Umbraco-CMS

Umbraco is a free and open source .NET content management system helping you deliver delightful digital experiences.
https://umbraco.com
MIT License
4.42k stars 2.67k forks source link

[BUG] Content Item duplicates when saving twice after create - Happens when `Enable list view` = `true` #15945

Open r-Larch opened 6 months ago

r-Larch commented 6 months ago

Which Umbraco version are you using? (Please write the exact version, example: 10.1.0)

13.2.2 - also happens in 13.1.1

Bug summary

When creating a child content item in a parent where Enable list view = true the item will be duplicated on second Save (not save and publish)

Specifics

Happens in infinite editor.

Steps to reproduce

Expected result / actual result

The item will not be duplicated.

Details

It looks like a BUG in the backend.

First save: (node gets an id)

image

Second Save: (the node id gets sent to the backend)

image

Second Save Server response: (the backend responds with a new id!)

image
github-actions[bot] commented 6 months ago

Hi there @r-Larch!

Firstly, a big thank you for raising this issue. Every piece of feedback we receive helps us to make Umbraco better.

We really appreciate your patience while we wait for our team to have a look at this but we wanted to let you know that we see this and share with you the plan for what comes next.

We wish we could work with everyone directly and assess your issue immediately but we're in the fortunate position of having lots of contributions to work with and only a few humans who are able to do it. We are making progress though and in the meantime, we will keep you in the loop and let you know when we have any questions.

Thanks, from your friendly Umbraco GitHub bot :robot: :slightly_smiling_face:

Zeegaan commented 6 months ago

I sadly cannot reproduce this, below is a GIF of me trying to reproduce, am I doing anything wrong here ? 🤔

CantReproduce

ealse commented 4 months ago

@Zeegaan We got the same problem, but you have to use the infinite editor. We have had a similar problem in the past and back then I fixed it in this issue: https://github.com/umbraco/Umbraco-CMS/pull/12874

We are now upgraded from Umbraco version 10.4.0 to 13.3.0 and the problem is back again.

It looks like the problem is the "action" value in the PostSave payload. The id exists but the action is still "action": "saveNew"

Here is an example with a new umbraco 13.3.0 project: https://github.com/umbraco/Umbraco-CMS/assets/50272817/e316f2e3-0e98-41f8-815f-bd1641ea427d