[MGNLSITE-67] Image variations with integer names defined in YAML theme are not available Created: 13/Jul/16  Updated: 24/Mar/22  Resolved: 24/Mar/22

Status: Closed
Project: Magnolia Site Module
Component/s: None
Affects Version/s: 1.0.7
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Christopher Zimmermann Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File agency.yaml    
Issue Links:
dependency
depends upon MAGNOLIA-6719 Map2Bean should always interpret map ... Closed
relation
is related to MGNLSITE-48 Create registry for themes to allow t... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:

 Description   

When using a YAML theme, the image variations are not available in the project. When trying to access a defined variation in a script, the following warnings are logged:
Supplied variation [1366] could not be found. Please update your configuration.

When viewing the theme in the definitions app, (https://nexus.magnolia-cms.com/#nexus-search;quick~definitions) The theme is present - but under the variations node is nothing.



 Comments   
Comment by Christopher Zimmermann [ 13/Jul/16 ]

efochr Figured out that the variations defined in this YAML file did not work because their names are integers. Apparently Map2Bean loaded these as integers and then the variant resolver could not match them to the strings supplied in the templating scripts.
Possibly Map2Bean could be updated to always interpret the key in map as a String.

Comment by Evzen Fochr [ 13/Jul/16 ]

My findings are that in yaml we need to define variation name as string "1366". If name is not in quotes yamlConversion convert it to Integer and than VariationAwareImagingSupport can't find this variation.

Comment by Christopher Zimmermann [ 24/Mar/22 ]

This is a YAML thing. So I don't see what we should do here. Closing as Won't fix.

Generated at Mon Feb 12 07:12:23 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.