Description
Following PSML given in folder.metadata:
<?xml version="1.0" encoding="iso-8859-1"?>
<folder>
<title>Assistant</title>
<metadata name="title" xml:lang="de">Assistant</metadata>
<metadata name="priority">20</metadata>
</folder>
When I know try to get the metadata when rendering the navigation in a MenuElementImpl object representing this folder, you always get null returned.
Following code causes the bug in MenuElementImpl:
public GenericMetadata getMetadata()
{
// return node metadata
if (node != null)
{
GenericMetadata metadata = node.getMetadata();
if ((metadata != null) && ((metadata.getFields() == null) || metadata.getFields().isEmpty()))
}
return null;
}
The inner if statement returns false, if elements are in the collection. But that is not good, becaus so you get null returned, if there are fields in the colleciton.
The inner if statement should be something like:
if ((metadata != null) && (metadata.getFields() != null) && !metadata.getFields().isEmpty()))
Best Regards
Robert Schmelzerr