V8/Warn editor when deleting a content item that is in use#9119
V8/Warn editor when deleting a content item that is in use#9119dawoe wants to merge 105 commits intoumbraco:v8/item-trackingfrom dawoe:v8/temp_8694
Conversation
…or performance reasons. Looping through the descendants and checking each one individually for references was terribly slow
|
Also related to this: #8614 eg mark Media as being used when it's added to content via a Macro parameter... |
# Conflicts: # src/Umbraco.Web.UI/Umbraco/config/lang/en.xml # src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml
# Conflicts: # src/SolutionInfo.cs
* Add option to remove/cancel added crops * Move vm functions to top * Only show cancel button for empty/new crop
…ions. (cherry picked from commit 71a1817)
# Conflicts: # src/SolutionInfo.cs
… these dialogs with more content.
| <key alias="labelUsedInMediaDescendants">One or more of this item's descendants is being used in a media item</key> | ||
| <key alias="labelUsedInContentDescendants">One or more of this item's descendants is being used in a content item</key> | ||
| <key alias="labelUsedInMemberDescendants">One or more of this item's descendants is being used in a member</key> | ||
| <key alias="deleteWarning">The current item or one or more of this item's descendants is being used. Deleting this item can lead to broken links on your website.</key> |
There was a problem hiding this comment.
I think it would be better with a little shorter text, as its easier to read, something like this:
"This or its descendants is being used. Deleting can lead to broken links on your website."
|
@nielslyngsoe changes have been merged |
|
Hi there @dawoe! Thanks for the contribution here and apologies if it has been a while since you heard from us. We have been in the very fortunate position of having lots of work to do. With this in mind, we are writing to let you know that with the release of the Long Term Support (LTS) version, 8.18, we have now moved into the support phase of Umbraco 8. You can read all about that here but to surmise, we will be keeping Umbraco 8 safe and well by releasing patching for security or regression issues if they arise but no longer will we do that for bug fixes. The same is still true for features, although we stopped merging those some time ago. We'd love for you to keep contributing and while we are not able to merge this to Umbraco 8, if this is still something you'd like to see in Umbraco 9, please take a look and either create an issue to say so or find an issue that already exists. We'll be happy to give you some input around how you can adjust your pull request to target Umbraco 9. Even better, it might be something that Umbraco 9 already does or has. In which case, enjoy! Once again, a huge thank you for the time you have spent working with us. #H5YR |
* Adding TrackedReferencesController * Adding/changing views * Adding/Editing js files * RelationService changes * RelationRepository changes * Adding missing translations * Adding/Modifying tests * Beginning of #9125 migration * Introducing a new component + refactoring based on that * Abstracting + refactoring * Work on content unpublishing * Work on media.delete * Various small changes * Beginning of #9119 migration * Changes on content.delete * Various fixes * Adding new keys used in the listview bulk actions * Adding methods to get the items used in relations from array of ids * Adding the checkLinkedItems function to the trackedReferencesResource * Passing the selected items from a listview to unpublish and delete * Adding umb-tracked-references-listview * Adding umb-tracked-references-listview-table with language column * Fixes for tracked references * Changes in listview unpublish dialog * Changes in listview delete dialog * Removing Variants logic as it is not currently supported * Visual fixes * Closing dialogs on click * Fix wording * Fix breaking changes * Change to a single title "Items in use" instead of 2 different for Content and Media * No need for obsoleting because we can change new controllers * Return ActionResult from actions * V9: Prevent delete or unpublish of items that have references (#12047) * Introducing config settings that prevent delete or unpublish of items referenced by other items * Disable deletion of content items and show a new warning * Disable deletion of media items and show a new warning * Disable deletion of list view items * Disable unpublish and bulk unpublish * Add a new warning * V9: Displaying descendants in use as part of item tracking (#12039) * Replace HasReferencesInDescendants with GetPagedDescendantsInReferences * Display descendants in use on parent's info tab * Add getPagedDescendantsInReferences to trackedReferencesResource * Add lang keys for Descendants in use * Refactoring controller actions * Don't call check descendants usage when it is a new item * rename busfy to busy * always show references * rearrange for scrollbar to appear at the edge of the dialog * use the word referenced instead of used * change fallback texts * Added "IsDependency" to relation types * refactor of umb-tracked-references * rename checkLinkedItems to getPagedReferencedItems * rename check to load, to be consistent with the rest. * Refactored backend . Needs frontend fixes * Cleanup * Use filters * Front-end refactor to match refactored end-points * Fixed bug + warning * Fixed query (more then 2100 descensdants) and optimized it (using nested select instead of inner join). * remove comment * hideNoneDependencies including varying text for the configuration * Hack for SqlCE :( * some final adjustments for item tracking ui * Unbreak change Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com> Co-authored-by: Bjarke Berg <mail@bergmania.dk>
Prerequisites
If there's an existing issue for this PR then this fixes #8694
Description
This PR introduces a warning to editors when they try to delete a cotent item when the item or one of the underlying items of a items is in use.
Note for reviewers
This PR builds on top of PR #9118 so it's recommend that that one is reviewed and merged first.
Steps to test
See steps for content in #9116. When you try to delete the item a warning is shown + information of the references.