-
Bug
-
Resolution: Fixed
-
Neutral
-
2.1
-
None
-
-
Empty show more show less
-
Yes
-
Saigon 87, Saigon 88
-
5
DamTemplatingFunctions.getAssetMap(asset) returns keys for the DC metadata but all of the values which should come from the asset are blank.
To Reproduce - try the following Freemarker in a template:
[#assign assetMap = damfn.getAssetMap(asset).metadata.dc] [#list assetMap?keys as prop] ${prop} = ${assetMap[prop]}<br> [/#list]
This is because the asset app editor stores all the dc values in properties with no dc prefix, for example
publisher
source
But in the JcrDublinCore class, the property names are named differently, they have a "dc_" prefix, for example:
dc_publisher
dc_source
This is a bug introduced in DAM 2 in the JcrDublinCore class.
In DAM 1.2.x the constants do not have the dc_ prefix.
See: https://git.magnolia-cms.com/gitweb/?p=modules/dam.git;a=blob;f=src/main/java/info/magnolia/dam/providers/jcr/JcrDublinCoreAssetMetadata.java;h=102c44367d43a9192fc27ca2d20af00586c59f16;hb=refs/heads/magnolia-module-dam-1.2.x
And tests also demonstrate that the properties should not have the prefix:
https://git.magnolia-cms.com/gitweb/?p=modules/dam.git;a=blob;f=src/test/resources/damAssetAndMetadataNodeTree.properties;h=33bacad85424e8e43550052b341f9778af8ba21d;hb=refs/heads/magnolia-module-dam-1.2.x
- is depended upon by
-
MTE-4 New Product Demo - Alpha
- Closed
- relates to
-
JCRTOOLS-40 JCR Tools does not support property has multiple values
- Closed