The Crop config field is currently displayed too broadly in the Acquia DAM media type configuration form. It appears for media types where cropping does not apply, and it also appears when the asset delivery mode is set to Embed.
Cropping should only be configurable when:

  • Focal Point module is enabled.
  • The media type is image based.
  • The delivery option is Download and sync.

Problem/Motivation

Crop configuration is relevant only when the module stores a local image field that can actually be cropped. When the media type is not image-based, or when the delivery mode is set to Embed, the crop configuration should not be shown because there is no local synced image to crop.

Right now, the form shows crop configuration on media type edit pages where it is not applicable. This creates confusion for site builders and suggests that cropping is supported in scenarios where it is not.

Steps to reproduce

  • Go to the edit page of an Acquia DAM media type.
  • Observe that the Crop configuration section is visible.
  • Go to the edit page of an Acquia DAM: Image media type and configure the delivery mode as Embed.
  • Observe that the Crop configuration section is visible.

Proposed resolution

Add conditional logic so the crop configuration form elements are built only when the selected media type and asset mode support image cropping.
Possible checks:

  • Validate that the configured media source is image.
  • Validate that the selected asset mode is Download and sync.
  • Skip or hide the crop configuration section for Embed mode.

This improves form clarity and prevents invalid or misleading configuration options from being shown to site builders.

Issue fork acquia_dam-3587784

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’s picture

Assigned: Unassigned » rajeshreeputra

rohan-sinha made their first commit to this issue’s fork.

  • rohan-sinha committed d1bce539 on 1.1.x
    Resolve #3587784 "Fix: Crop configuration field is shown for unsupported...

  • rohan-sinha committed d1bce539 on migration-tools
    Resolve #3587784 "Fix: Crop configuration field is shown for unsupported...
rajeshreeputra’s picture

Assigned: rajeshreeputra » Unassigned
Status: Active » Fixed

MR merged!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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