Skip to content

V8/Warn a editor when unpublishing a content item that is being used #9125

Closed
dawoe wants to merge 99 commits intoumbraco:v8/item-trackingfrom
dawoe:v8/temp_8695
Closed

V8/Warn a editor when unpublishing a content item that is being used #9125
dawoe wants to merge 99 commits intoumbraco:v8/item-trackingfrom
dawoe:v8/temp_8695

Conversation

@dawoe
Copy link
Contributor

@dawoe dawoe commented Oct 9, 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 #8695

Description

This PR introduces a warning in the unpublish dialog when the item or one of the underlying items is being use.

unpublish-warning

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 reproduce

Link a item somewhere in content. Then try to unpublish the item or one of the ancestors.
A warning will be shown to the editor. During checking the unpublish button is also hidden.

Dave

dawoe added 21 commits October 8, 2020 10:27
…or performance reasons. Looping through the descendants and checking each one individually for references was terribly slow
@emmaburstow
Copy link
Contributor

Hey @dawoe

Thanks for the work, here. You're a gem. We'll shout if we need anything.

Em

dawoe added 8 commits October 24, 2020 17:02
# Conflicts:
#	src/Umbraco.Web.UI/Umbraco/config/lang/en.xml
#	src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml
# Conflicts:
#	src/Umbraco.Web.UI/Umbraco/config/lang/en.xml
#	src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml
# Conflicts:
#	src/Umbraco.Web.UI.Client/src/common/directives/components/references/umbtrackedreferences.component.js
#	src/Umbraco.Web.UI.Client/src/views/components/references/umb-tracked-references.html
#	src/Umbraco.Web.UI/Umbraco/config/lang/en.xml
#	src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml
nul800sebastiaan and others added 18 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
@nielslyngsoe
Copy link
Member

nielslyngsoe commented May 25, 2021

Hi Dave,

I´m reviewing your code and I must say I love this!

I´m rearranging the dialog a little bit, to move the references below varaints-selection and the alert to the bottom, to have it close related to the action. Then it works like a summery of all the information above. The dialog is quite big now, so we should propaly have a look at the at one point, but for now lets keep it like this.

image

Oh, And if there is a reference, the submit button style is changed to "Danger".

@nielslyngsoe
Copy link
Member

@dawoe Ive pushed some changes to your branch. Please verify and test that wether you are okay with these changes. Lets me know what you think.

Good work btw. :-)

@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.