Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.

Disable or Remove "Replace" button on Name Conflict pop-up

Avatar

Level 2

Hi,

i want to remove or disable the "Replace" button on the name conflict pop-up. any ideas of where to start? 

To recreate the scenario. In any assets folder, try to upload an asset which is already existing in the folder. in which case AEM will show you a pop-up which looks like this.

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

8 Replies

Avatar

Community Advisor

Warning: I am not very good at this - somebody who understands this topic needs to elaborate / correct me before you put to much hope or effort into this answer.
It seems to me that there is a node in CRXDE 
/libs/dam/gui/content/bulkimport/wizard/jcr:content/body/items/form/items/wizard/items/import_config/items/fixedcolumns/items/fieldset/items/import_mode/items/replace
I would start there to look for the _coral-Dialog-footer in order to disable this
<button is="coral-button" variant="secondary" class="_coral-Button _coral-Button--secondary" size="M"><coral-button-label class="_coral-Button-label">Replace</coral-button-label></button>

Second warning:
You will have to make an overlay node in apps - since you should not change anything in libs.
Last warning: 
This might be not the right way to do it  - and i am very interested how you archieved this - if you are able to do it. 
Keep me updated.

Avatar

Level 2

Hi Adilos, 

thank you for the response. i cannot find /libs/dam/gui/content/bulkimport/wizard... path in my crxde. iam i missing something?.

will definitely post if i have any updates.

Avatar

Community Advisor

I just checked in my local enviroment. It is there.
Please try to search within CRXDE for "REPLACE".
But - i say it again - this is my uneducated first guess. 

AdilosCantuerk_0-1692688023605.png

 

Avatar

Level 2

Hi Adilos,

i found it. and i tried overlay. but it didnt work. 

so, my node in libs is at libs/dam/gui/content/assets/extractarchivewizard/jcr:content/body/items/form/items/wizard/items/conflictsStep/items/fixedColumns/items/fixedColumn1/items/conflictColumn/items/radiogroup/items

 

ASP_Corp_0-1692719256853.jpeg

 

/apps/dam/gui/content/assets/extractarchivewizard/jcr:content/body/items/form/items/wizard/items/conflictsStep/items/fixedColumns/items/fixedColumn1/items/conflictColumn/items/radiogroup/items

 

ASP_Corp_2-1692719400291.png

 

Avatar

Level 2

All right, i finally got it resolved. so the actual path to overlay is /libs/dam/gui/coral/components/commons/fileupload/js/fileupload.js.

Avatar

Community Advisor

Sorry for misleading you. I thought my path looked very promising.
Did you get the changes done? Does it work?

Avatar

Community Advisor

The "Replace" and "Create Version" can be disabled by customizating canOverwrite() function in 

/libs/dam/gui/coral/components/commons/fileupload/clientlibs/fileupload/js/fileupload.js

We just need to overlay the js file and update the function

 

Caution:

Do not disable for all users, as it would take the functionality away from admin as well. 


Aanchal Sikka

Avatar

Administrator

@ASP_Corp do you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.



Kautuk Sahni