Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Asset having .doc and .ppt are not rendering in details page with presentation.html and document.html #1204

Open
skumuda opened this issue Nov 22, 2024 · 5 comments
Assignees
Milestone

Comments

@skumuda
Copy link

skumuda commented Nov 22, 2024

When .doc and .ppt asset is opened in assetdetails page it not rendered properly.

Environment

  • AEM Version: 6.5.21
  • Asset Share Commons Version: 3.8.0
  • Author, Publish or both? both

To Reproduce
Steps to reproduce the behavior:

  1. Go to '/content/asset-share-commons/en/light.html'
  2. Click on any asset which has .doc or .ppt extension
  3. It takes to asset-details page

Expected behavior
For .doc URL should be navigating to
http://localhost:5502/content/asset-share-commons/en/light/details/document.html/content/dam/asset-share-commons/en/public/documents/document-sample.doc

For .ppt URL should be navigating to
http://localhost:5502/content/asset-share-commons/en/light/details/presentation.html/content/dam/asset-share-commons/en/public/documents/powerpoint-sample.ppt

Actual :
URL navigates to
http://localhost:5502/content/asset-share-commons/en/light/details.html/content/dam/asset-share-commons/en/public/documents/document-sample.doc

URL navigates to
http://localhost:5502/content/asset-share-commons/en/light/details.html/content/dam/asset-share-commons/en/public/documents/powerpoint-sample.ppt

Screenshots
Screenshot 2024-11-22 184613
image

@davidjgonzalez
Copy link
Contributor

davidjgonzalez commented Nov 22, 2024

I recommend using the "newer" (i guess old now :)) Content Type asset selector. This will let you make specific details pages for Word Docs and Powerpoint (word-doc.html and powerpoint.html). You can see the complete mapping list int he ContentTypeImpl.java linked below + screenshot.

The default AssetType asset details selector relies on the AEM API's mimetype to type mapping which a) has changed in the past which is not good for ASC and b) doesnt always make sense for how assets need to be displayed on a details page.

Once you have the desired mapping of type -> asset details page, you can add/configure a preview component (You can try using the Assets Details - Image) and configure it on the page to display the image asset rendition that you want to show on the details page (You have to make sure you are generating image renditions of course).

2024-11-22 at 4 20 PM

@skumuda
Copy link
Author

skumuda commented Nov 25, 2024

Hi @davidjgonzalez
Thank you for your suggestion. Selecting 'Content Type' as asset selector it works for .ppt and .pptx (Asset details page points to powerpoint.html). However for document, .doc works fine and navigates to word-doc.html but .docx does not seem to be working. The reason could be the incorrect mapping in ContentTypeImpl.java where the mimetype for .docx has an additional /.

image

@davidjgonzalez
Copy link
Contributor

@skumuda how embarrassing (for me :)) ... fixed it in 3.8.22 which is out now.

@davidjgonzalez davidjgonzalez added this to the 3.8.22 milestone Nov 25, 2024
@davidjgonzalez davidjgonzalez self-assigned this Nov 25, 2024
@skumuda
Copy link
Author

skumuda commented Nov 26, 2024

@davidjgonzalez Thank you. Its working now :)
However, I would need another suggestion of yours on below scenario:

  1. Video which is DRM restricted does not load on asset details page - Is this the expected behavior? Because other videos which is not DRM restricted loads fine.

@davidjgonzalez
Copy link
Contributor

What rendition are you loading in the preview?

The DRM blocks the original since if you can load the video in the preview, then you can technically download it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants