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

fix(Content): Title override on Assets json transformation #30127 #30408

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

Conversation

valentinogiardino
Copy link
Contributor

Proposed Changes

  • Updated DotAssetViewStrategy to avoid overwriting the title field in the transformation map.
  • Replaced map.put(TITLE_FIELD, fileName) with map.computeIfAbsent(TITLE_FIELD, k -> fileName) to ensure the title is only set if it is not already present.

Checklist

  • Tests
  • Translations
  • Security Implications Contemplated (add notes if applicable)

Additional Info

This fix prevents the title field from being overwritten when a DotAsset is transformed. The issue occurred because the title field was being replaced with the asset’s filename, even if it already had a value.

Video

issue-asset-title-override.mp4

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.

Content API/GraphQL: Title Property Inconsistency on Assets
1 participant