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

Filter by active content elements first before deduplicating references #19

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hackerman26
Copy link

This fixes a bug where the image credits for an image would not show up if there were two content elements on a page referencing the same image and the first content element being disabled.

This fixes a bug where the image credits for an image would not
show up if there were two content elements on a page referencing the same
image and the first content element being disabled.
@hackerman26
Copy link
Author

How to Reproduce:

Create two content elements (e.g. TextMedia) referencing the same image.
Then deactivate the first content element.
The image credits won't show up in the frontend.

This happens because deactivating a content element does not deactivate the associated file reference as well.
This pull-request fixes the issue by first filtering out references that do not belong to active content elements
and then deduplicating the references.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant