Expand my Community achievements bar.

SOLVED

AEM Copy Publish URL for assets

Avatar

Level 1

I am trying to copy asset Publish URL. I tried below steps and getting empty instead of pubish url.

 

I am using AEM version: 6.5.12.0 and ACS commons: 5.1.2

 

Copy Publish URL tool
Enabled via CopyAssetPublishUrlFeature and externalized is configured with publish domain.
When I try to get the publish URL of an activated asset, the URL is empty, cannot copy anything. 

 

Steps to reproduce.

  1. Activate tool via com.adobe.acs.commons.dam.impl.CopyAssetPublishUrlFeature
  2. Have publish host configured in externalizer
  3. Publish asset 
  4. Go to props of that asset 
  5. Copy Publish URL button is visible
  6. Click on Copy Publish URL
  7. Publish URL is empty

VenkateshKA2_0-1675747992089.pngVenkateshKA2_1-1675748082013.png

 

Can someone please suggest how to resolve this issue

 

Thanks

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @VenkateshKA2,

According to the documentation you have to create Wrapper Client Library node definition apart feature flag an externalizer configuration.
setup-info.jpg

You can find detailed information about this under this page:

Wrapper Client Library definition for Copy Publish URL functionality can be found under (commented section):

Below is an example you can use. It assumes that Wrapper Client Library will be created in weretail, but if you have your own project you should include it there.
crx-structure.jpg

Simply follow those steps:

  1. Created acs-commons nt:folder under /apps/weretail/clientlibs/vendor.
  2. Create copy-publish-url as cq:ClientLibraryFolder under /apps/weretail/clientlibs/vendor/acs-commons
  3. Add all the properties you can see on above screen (crx screen or screen from github)
  4. Add empty css.txt and js.txt under /apps/weretail/clientlibs/vendor/acs-commons/copy-publish-url - like on the screen

That is all, assuming your externalizer configuration is correct and feature flag is enabled Copy Publish URL should work. (make sure you have refreshed browser with opened asset, because new client lib has to be loaded)

 

View solution in original post

4 Replies

Avatar

Employee Advisor

I have followed the steps and able to replicate the issue.

I will keep you posted if I am able to find anything.

Avatar

Correct answer by
Community Advisor

Hi @VenkateshKA2,

According to the documentation you have to create Wrapper Client Library node definition apart feature flag an externalizer configuration.
setup-info.jpg

You can find detailed information about this under this page:

Wrapper Client Library definition for Copy Publish URL functionality can be found under (commented section):

Below is an example you can use. It assumes that Wrapper Client Library will be created in weretail, but if you have your own project you should include it there.
crx-structure.jpg

Simply follow those steps:

  1. Created acs-commons nt:folder under /apps/weretail/clientlibs/vendor.
  2. Create copy-publish-url as cq:ClientLibraryFolder under /apps/weretail/clientlibs/vendor/acs-commons
  3. Add all the properties you can see on above screen (crx screen or screen from github)
  4. Add empty css.txt and js.txt under /apps/weretail/clientlibs/vendor/acs-commons/copy-publish-url - like on the screen

That is all, assuming your externalizer configuration is correct and feature flag is enabled Copy Publish URL should work. (make sure you have refreshed browser with opened asset, because new client lib has to be loaded)