Download, Share and Cart buttons are not working in Asset Share Commons Publish page
Download, Share and Cart buttons are not working in Asset Share Commons Publish page while it is working fine in Author Instance of AEMaaCS
We have tried below solutions to resolve it but its not working
Checked read permissions (to the everyone user for the anonymous use case) on:
/conf/xxx/wcm/settings/templates /conf/xxx/wcm/settings/policies /etc/cloudsettings
Checked the dispatcher codes Published the pages/templates
Its a blocker for us and impacting the production go live
Kindly confirm if you have faced this in past or have some guidance around the solution
hi @anjuathakur can you expand on not working? Is it a 404 error for the partial modal .html request or is it a javascript error? Can you share the browser console and the network requests tab using dev tools?
Hi @godanny86, there are no errors in console Here are the issues: AUTHOR:
- The assets share details are displayed when clicking the SHARE button.
- Cart modal contains the details of the assets that are added to the cart.
- DOWNLOAD button is working.

PUBLISH:
- The assets share details are missing when clicking the SHARE button.
- Cart modal is empty.
- DOWNLOAD button is not working.

Here's Network tab when clicking share button:

What version of AEMaaCS? What version of AssetShare Commons?
Can you look at the parameters of the POST request to the .partial.html? Are the asset paths being sent?
The payload for the POST request for Cart, Download, Share should all look something similar to this:

Assuming a list of paths is being sent, i have to image they're not able to be converted to AssetModels in this logic:
https://github.com/adobe/asset-share-commons/blob/master/core/src/main/java/com/adobe/aem/commons/assetshare/components/actions/impl/ActionHelperImpl.java#L54-L63
return Arrays.stream(requestParameters)
.filter(Objects::nonNull)
.map(RequestParameter::getString)
.filter(StringUtils::isNotBlank)
.map(path -> Text.unescape(path))
.map(path -> request.getResourceResolver().getResource(path))
.filter(Objects::nonNull)
.map(resource -> modelFactory.getModelFromWrappedRequest(request, resource, AssetModel.class))
.filter(Objects::nonNull)
.collect(Collectors.toList());
Hi @godanny86, We are using ASC v2.2.0-1
The payload for the POST request for Cart, Download, Share is same for us.

hmm, that looks right. There must be something on the server side where those Assets aren't being resolved to an Asset Model. Does this happen on a local publish instance using the AEM quickstart SDK?
Also what version of CS are you running?
@Jaski96 Were you able to uncover anything else WRT this issue?
Closing - but please re-open if you are still experiencing this problem/can provide more details.