Open DanDiplo opened 4 years ago
Oooh nice one, I'll investigate 👍
@DanDiplo oooh scratch that... I did think it sounded familiar, this one. I created a PR for it a while back: #7746
@kjac Ahh, cool. I did search to see if there was an existing issue, but guess my search text was different as I didn't see this. Hopefully the fix will be merged in next release. Thanks for looking!
Hi all, our apologies for coming to the discussion just now. 🙈
I've tested this on the latest Umbraco 10 (v10.4.0) and while the "Add content" button still doesn't appear when you remove all items (the single item), you still get the validation issue when Saving and Publishing and you can bring back the item when refreshing (thus discarding the changes).
I will make this up for grabs for v10 or above as we, unfortunately, will not be able to fix this for v8. We would like to make sure that the "Add content" button appears when we "Remove all items". It seems like the add button is missing only when the min and max of the NC are set to 1. When trying with a higher value than 1 for min/max, it is not an issue.
Here is a video reproducing the problem on Umbraco 10.4.0:
Hi @DanDiplo,
We're writing to let you know that we would love some help with this issue. We feel that this issue is ideal to flag for a community member to work on it. Once flagged here, folk looking for issues to work on will know to look at yours. Of course, please feel free work on this yourself ;-). If there are any changes to this status, we'll be sure to let you know.
For more information about issues and states, have a look at this blog post.
Thanks muchly, from your friendly Umbraco GitHub bot :-)
The PR in https://github.com/umbraco/Umbraco-CMS/pull/7746 should be good as an inspiration point 😄
If you create a Nested Content item with Min and Max items both set to 1 and then subsequently use the "Remove all items ..." option for it then it removes the item but doesn't add back the "Add content" button. This leaves you unable to complete the field.
Umbraco version
I am seeing this issue on Umbraco version: 8.6.3
Reproduction
Bug summary
A Nested item with Min and Max items set to 1 can be removed but never added back. This causes a validation error that cannot be fixed as you can never add the item back.
Steps to reproduce
Once added content you then see an option when hovering over the three dots to "Remove all items" of the Nested Content:
Select the "Remove all items" option and this removes the content. However, it does not add back the "Add Content" button so you are left like this:
If you the try and save or publish the document you get a validation error as you have not added the 1 item required:
However, you can never add the required content as the "Add Content" button is not there. This makes it impossible to complete the content or publish the page.
The only way around this is to set the Min Value to 0 on the Nested Content.