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.

  1. If the download and sync option is not selected, make the Asset reference field visible.
  2. 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.

Command icon 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:

Issue fork acquia_dam-3500484

Command icon 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

rajeshreeputra created an issue. See original summary.

rajeshreeputra changed the visibility of the branch 3500484-media-view-display to hidden.

rajeshreeputra’s picture

Issue summary: View changes

rajeshreeputra’s picture

Project: Media: Acquia DAM » Acquia DAM
Version: 2.x-dev » 1.1.x-dev

chandu7929 made their first commit to this issue’s fork.

rajeshreeputra’s picture

Status: Active » Needs review

Requesting review.

chandu7929’s picture

Status: Needs review » Needs work

Pulling back in NW since its not working as expected.

chandu7929 changed the visibility of the branch 3500484-media-view-display to active.

chandu7929 changed the visibility of the branch 3500484-media-view-display to hidden.

chandu7929’s picture

Status: Needs work » Needs review

Updated MR with required changes hence requesting review.

rajeshreeputra’s picture

Title: Media view display handling not honored during migration » Media view display handling not honored during download and sync
Issue summary: View changes
rajeshreeputra’s picture

Issue summary: View changes
rajeshreeputra’s picture

Issue summary: View changes
japerry’s picture

Note, 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.

japerry’s picture

Status: Needs review » Needs work
chandu7929’s picture

Status: Needs work » Needs review

The requested changes have been incorporated. Hence NR

chandu7929’s picture

Thanks for the feedback, @vishal! I've refactored the code and improved the logic based on your suggestions.

japerry’s picture

Status: Needs review » Needs work

Left comments in the MR.

chandu7929’s picture

Status: Needs work » Needs review

chandu7929 changed the visibility of the branch 1.0.x to hidden.

ankitv18 made their first commit to this issue’s fork.

  • japerry committed 1dbf2719 on 1.1.x
    Issue #3500484 by japerry, chandu7929, rajeshreeputra: Media view...
japerry’s picture

Status: Needs review » Fixed

Finally passed tests, committed!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

rajeshreeputra’s picture

Category: Bug report » Support request