Skip to content

V8/Warn editor when deleting a content item that is in use#9119

Closed
dawoe wants to merge 105 commits intoumbraco:v8/item-trackingfrom
dawoe:v8/temp_8694
Closed

V8/Warn editor when deleting a content item that is in use#9119
dawoe wants to merge 105 commits intoumbraco:v8/item-trackingfrom
dawoe:v8/temp_8694

Conversation

@dawoe
Copy link
Contributor

@dawoe dawoe commented Oct 8, 2020

Prerequisites

  • I have added steps to test this contribution in the description below

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.

@marcemarc
Copy link
Contributor

Also related to this: #8614 eg mark Media as being used when it's added to content via a Macro parameter...

@dawoe dawoe changed the title V8/Warn editor when deleting a media item that is in use V8/Warn editor when deleting a content item that is in use Oct 9, 2020
nul800sebastiaan and others added 21 commits May 19, 2021 10:21
…be any language (#10278) (#10284)

Co-authored-by: Niels Lyngsø <nsl@umbraco.com>
Co-authored-by: Mads Rasmussen <madsr@hey.com>
…be any language (#10278)

* Variant sorting should take into account that there might not be any language available

* fix languages

Co-authored-by: Niels Lyngsø <nsl@umbraco.com>
Co-authored-by: Mads Rasmussen <madsr@hey.com>
(cherry picked from commit e19a598)
issue #10186

typo in IsExternalModelsBuilderInstalled -> Umbraco.ModelsBuider

(cherry picked from commit b783399)
# Conflicts:
#	src/SolutionInfo.cs
…be any language (#10278) (#10284)

Co-authored-by: Niels Lyngsø <nsl@umbraco.com>
Co-authored-by: Mads Rasmussen <madsr@hey.com>
(cherry picked from commit 017b56e)
* Add option to remove/cancel added crops

* Move vm functions to top

* Only show cancel button for empty/new crop
# Conflicts:
#	src/SolutionInfo.cs
<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>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Member

nielslyngsoe commented May 25, 2021

@dawoe I see this Branch/PR is using the same code as #9125

Can I ask you to port over those changes? so they use the same approach? (or merge them, how you like.)

If any trouble let me know, I will be available.

Thanks in advance.

@dawoe
Copy link
Contributor Author

dawoe commented May 27, 2021

@nielslyngsoe changes have been merged

elit0451 added a commit that referenced this pull request Jan 28, 2022
@umbrabot
Copy link

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
Your friendly Umbraco GitHub bot 🤖 🙂

@umbrabot umbrabot closed this Feb 22, 2022
bergmania added a commit that referenced this pull request Mar 7, 2022
* 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.