Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Change AEM Deletion Functionality

Avatar

Avatar
Give Back
Level 4
Jineet_Vora
Level 4

Likes

42 likes

Total Posts

45 posts

Correct Reply

22 solutions
Top badges earned
Give Back
Ignite 1
Boost 5
Boost 3
Boost 25
View profile

Avatar
Give Back
Level 4
Jineet_Vora
Level 4

Likes

42 likes

Total Posts

45 posts

Correct Reply

22 solutions
Top badges earned
Give Back
Ignite 1
Boost 5
Boost 3
Boost 25
View profile
Jineet_Vora
Level 4

12-05-2019

There is a requirement from business to change the default AEM deletion functionality.

Current functionality: When an already activated asset/web page is deleted from author instance, AEM first deactivates the asset/web page (results in deletion of the same from Publisher instance) and then it deletes the page from author.

Expected functionality: When an already activated asset/web page is deleted from author instance, AEM should not deactivate the asset/web page from publisher and instead only delete the page from author instance.

Although, AEM is following a good practice to deactivate first from publisher and then delete from author which will not result in creation of ghost pages. Business wants to follow an approach where we can avoid unintentional deletes from authors/producers which doesn't result in deletion of the content from all the instances.

I kind off reverse engineered the AEM delete process which executes a servlet call /bin/wcmcommand with parameter 'deletePage', however it is the core functionality and I want to understand the best approach before making any change.

P.S. We are using AEM v6.3

Any response will be appreciated.

Thank you,

Jineet

Replies

Avatar

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,275 likes

Total Posts

3,151 posts

Correct Reply

887 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,275 likes

Total Posts

3,151 posts

Correct Reply

887 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile
Arun_Patidar
MVP

13-05-2019

First, Why you need this. If you don't want to delete assets/web page from Publisher, just don't delete.

If you change the functionality, which only deletes page/assets at the author, how would you delete/unpublished things later at publish environment?

Avatar

Avatar
Give Back 50
Employee
berliant
Employee

Likes

207 likes

Total Posts

315 posts

Correct Reply

98 solutions
Top badges earned
Give Back 50
Give Back 5
Give Back 3
Give Back 25
Give Back 10
View profile

Avatar
Give Back 50
Employee
berliant
Employee

Likes

207 likes

Total Posts

315 posts

Correct Reply

98 solutions
Top badges earned
Give Back 50
Give Back 5
Give Back 3
Give Back 25
Give Back 10
View profile
berliant
Employee

13-05-2019

Jineet, this is expected behavior and it will not be changed. You would not be able to unpublish your content if it does not exist on an author instance.

Avatar

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,406 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,406 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile
smacdonald2008
Level 10

13-05-2019

This does not sound like a supported use case. Sounds like a hack and will not be supported by the AEM Cust Care team.

Avatar

Avatar
Give Back
Level 4
Jineet_Vora
Level 4

Likes

42 likes

Total Posts

45 posts

Correct Reply

22 solutions
Top badges earned
Give Back
Ignite 1
Boost 5
Boost 3
Boost 25
View profile

Avatar
Give Back
Level 4
Jineet_Vora
Level 4

Likes

42 likes

Total Posts

45 posts

Correct Reply

22 solutions
Top badges earned
Give Back
Ignite 1
Boost 5
Boost 3
Boost 25
View profile
Jineet_Vora
Level 4

13-05-2019

smacdonald2008berliantArun Patidar

It is just to avoid unintentional delete. We have had such scenario where one of the author mistakenly deleted a folder of assets from author instance (which deactivated the asset from publisher and then deleted the asset folder from author). Since this type of activity is not reversible and we had no backup of that asset folder containing number of documents and files, we had no option to restore the files.

Apart from being cautious, can this situation be avoided? Any approach here to disable deactivation on deletion when we click 'Delete' option from siteadmin?

Many thanks!

Avatar

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,275 likes

Total Posts

3,151 posts

Correct Reply

887 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,275 likes

Total Posts

3,151 posts

Correct Reply

887 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile
Arun_Patidar
MVP

13-05-2019

The alternative is to disable/hide delete button and introduce delete workflow with participant step to approve/reject deletion and then delete page/assets using java api.

Avatar

Avatar
Validate 10
Level 3
ankurk67503819
Level 3

Likes

15 likes

Total Posts

89 posts

Correct Reply

1 solution
Top badges earned
Validate 10
Validate 1
Boost 10
Boost 5
Boost 3
View profile

Avatar
Validate 10
Level 3
ankurk67503819
Level 3

Likes

15 likes

Total Posts

89 posts

Correct Reply

1 solution
Top badges earned
Validate 10
Validate 1
Boost 10
Boost 5
Boost 3
View profile
ankurk67503819
Level 3

13-05-2019

You should be creating a set of users or groups who can only delete the folders or publish the content.

In this usecase you dont need to write any custom code rather you need to create proper set of users with correct permission and sets of users to review or approve you can use OOB workflows as well.

Avatar

Avatar
Validate 1
Level 3
pankajkdhingra
Level 3

Likes

16 likes

Total Posts

28 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile

Avatar
Validate 1
Level 3
pankajkdhingra
Level 3

Likes

16 likes

Total Posts

28 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile
pankajkdhingra
Level 3

17-09-2019

Hi Arun,

How we can hide delete button for DAM asset?

Avatar

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,275 likes

Total Posts

3,151 posts

Correct Reply

887 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,275 likes

Total Posts

3,151 posts

Correct Reply

887 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile
Arun_Patidar
MVP

17-09-2019

Hi,

Overlay  /libs/dam/gui/content/assets/jcr:content/actions/selection/delete/granite:rendercondition to apps folder i.e.

/apps/dam/gui/content/assets/jcr:content/actions/selection/delete/granite:rendercondition

and add following properties to this granite:rendercondition node

1834003_pastedImage_1.png

expression

Boolean

false

sling:resourceType

String

granite/ui/components/coral/foundation/renderconditions/simple

Simple — Granite UI 1.0 documentation

Avatar

Avatar
Validate 1
Level 3
pankajkdhingra
Level 3

Likes

16 likes

Total Posts

28 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile

Avatar
Validate 1
Level 3
pankajkdhingra
Level 3

Likes

16 likes

Total Posts

28 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile
pankajkdhingra
Level 3

18-09-2019

Thanks Arun

I was able to hide the delete button by using sling resource merger but the new challenge is to show a new button and trigger workflow from it. Thanks a lot in advance.