Problem/Motivation
The misplacement of the Acquia DAM-related field in the view display, triggered when updating the media type and change in value for the "Download and Sync Assets" option, is causing the media to disappear from the content.
Steps to reproduce
- Have a umami (or similar demo site) installed
- Ensure you have acquia_dam 1.1.x version.
- Install Acquia DAM & media_library
- Authenticate site in the configuration and then authorize the user
- Add view display mode for media
- Large
- Medium
- Small
- Visit Acquia DAM: Image media type and enable view display mode.
- Update Asset reference field embed styles per view mode & Save changes
- Edit Acquia DAM: Image media type and check the Download and sync option & save changes
- Visit Acquia DAM: Image media type view display and validate each display has the on-site asset storage field in content region with image style form Asset reference field.
- Edit Acquia DAM: Image media type and uncheck the Download and sync option & save changes
- Visit Acquia DAM: Image media type view display and validate each display has the Asset reference field in content region with image style form on-site asset storage field.
Proposed resolution
Adjust the view displays with field in content region and associated settings based on the download and sync option chosen during the media update. This will ensure compatibility and proper display of media assets.
- If the download and sync option is not selected, make the Asset reference field visible.
- If the download and sync option is selected, ensure that the On-site stored asset file field is visible.
By updating the view display to reflect these conditions, we can restore the visibility of media within the content and enhance the overall user experience.
Issue fork media_acquiadam-3500484
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3500484-media-view-display
compare
- 3500484-migration-media-view-display
changes, plain diff MR !32
2 hidden branches
Issue fork acquia_dam-3500484
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #4
rajeshreeputraComment #6
rajeshreeputraComment #9
rajeshreeputraRequesting review.
Comment #10
chandu7929 commentedPulling back in NW since its not working as expected.
Comment #13
chandu7929 commentedUpdated MR with required changes hence requesting review.
Comment #14
rajeshreeputraComment #15
rajeshreeputraComment #16
rajeshreeputraComment #17
japerryNote, the changes proposed in #3497382: Thumbnails missing for media items after enabling on-site asset storage should be in this PR. a cursory review shows that its at least part of it is in this MR.
Comment #18
japerryComment #19
chandu7929 commentedThe requested changes have been incorporated. Hence NR
Comment #20
chandu7929 commentedThanks for the feedback, @vishal! I've refactored the code and improved the logic based on your suggestions.
Comment #21
japerryLeft comments in the MR.
Comment #22
chandu7929 commentedComment #27
japerryFinally passed tests, committed!
Comment #30
rajeshreeputra