dotCMS / core

Headless/Hybrid Content Management System for Enterprises
http://dotcms.com
Other
866 stars 467 forks source link

Binary info "File link" only refers to first binary field in contentlet #28461

Open jdcmsd opened 6 months ago

jdcmsd commented 6 months ago

Parent Issue

No response

Problem Statement

In contentlets with multiple binary fields, if you open the info pane in any given binary field, it correctly displays version path, ID path, etc., but the File Link only spits out the first Binary in the contentlet.

Steps to Reproduce

  1. Open contentlet with multiple binary fields with uploaded assets
  2. Click the "i" button to open the info pane
  3. Click the File Link
    • Result will be the first binary asset, no matter which one you had opened.

https://github.com/dotCMS/core/assets/102264829/86d8ca92-d913-406b-8ded-d73d3072bf49

This problem is caused by the URL path; the file link needs to include the field variable name of the binary field in question, similar to how it appears in the Version and Id paths.

The variable name is so important, we can even omit the file name itself as long as the variable name is included (note the address below).

Screenshot 2024-05-07 at 12 17 05 PM

Acceptance Criteria

File links should change to refer to their respective target images. I think it needs to change from

https://{host}/dA/{contentId}/{fileName}?{languageId}

to

https://{host}/dA/{contentId}/{binaryVarName}/{fileName}?{languageId}

dotCMS Version

dotcms-core 1.0.0-SNAPSHOT (April 30, 2024 11:38 AM)

Proposed Objective

User Experience

Proposed Priority

Priority 3 - Average

External Links... Slack Conversations, Support Tickets, Figma Designs, etc.

No response

Assumptions & Initiation Needs

No response

Quality Assurance Notes & Workarounds

No response

Sub-Tasks & Estimates

No response

github-actions[bot] commented 3 months ago

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 30 days.

jdcmsd commented 3 months ago

Confirmed that this is still the case on the current version.

jdotcms commented 1 week ago

Yeah, I was able to reproduce it, and the issue is on the resource link, fixing it

github-actions[bot] commented 1 week ago

PRs: