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

Nested followLinks can result in incorrect embedding parameters #4055

Open
ybnd opened this issue Mar 6, 2025 · 0 comments
Open

Nested followLinks can result in incorrect embedding parameters #4055

ybnd opened this issue Mar 6, 2025 · 0 comments
Labels
affects: 7.x Issue impacts 7.x releases bug help wanted Needs a volunteer to claim to move forward

Comments

@ybnd
Copy link
Member

ybnd commented Mar 6, 2025

Describe the bug

It should be possible to declare nested links using followLink as follows:

export const BITSTREAM_PAGE_LINKS_TO_FOLLOW: FollowLinkConfig<Bitstream>[] = [
  followLink('bundle',
    {},
    followLink('primaryBitstream'),
    followLink('item')
  ),
  followLink('format')
]; 

with, the expected URL embed parameters
embed=bundle/primaryBitstream&embed=bundle/item&embed=format

i.e. the primary Bitstream and Item links at the same level. However, in practice the parameters become

embed=bundle/primaryBitstream&embed=bundle/primaryBitstream/item&embed=format

To Reproduce

TODO: vanilla DSpace reproduction steps

Workaround

The intended URL parameters can still be made as follows:

 export const BITSTREAM_PAGE_LINKS_TO_FOLLOW: FollowLinkConfig<Bitstream>[] = [
  followLink('bundle', {}, followLink('primaryBitstream')),
  followLink('bundle', {}, followLink('item')),
  followLink('format')
];
@ybnd ybnd added bug needs triage New issue needs triage and/or scheduling labels Mar 6, 2025
@github-project-automation github-project-automation bot moved this to 🆕 Triage in DSpace Backlog Mar 6, 2025
@ybnd ybnd added the affects: 7.x Issue impacts 7.x releases label Mar 6, 2025
@tdonohue tdonohue removed this from DSpace Backlog Mar 6, 2025
@tdonohue tdonohue added help wanted Needs a volunteer to claim to move forward and removed needs triage New issue needs triage and/or scheduling labels Mar 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects: 7.x Issue impacts 7.x releases bug help wanted Needs a volunteer to claim to move forward
Projects
Development

No branches or pull requests

2 participants