-
Bug
-
Resolution: Fixed
-
Neutral
-
5.5.2
-
None
-
None
-
-
Empty show more show less
-
Basel 88
-
2
Currently when field's keys are populated, the generator walks from parent to parent and collects their names (via FieldDefinitionKeyGenerator#getParentName which merely attempts to call a getName() method). Under certain circumstances, some parents in such chain may not produce the name for some reason.
One example could be a ContentDefinition:
@I18nabe public class ContentDefinition { private List<FieldDefinition> outlineFields; private String defaultBlock; private List<String> blocks; public List<FieldDefinition> getOutlineFields() { return outlineFields; } public void setOutlineFields(List<FieldDefinition> outlineFields) { this.outlineFields = outlineFields; } ... }
Such definition is included in an article editor sub-app descriptor and delivers such information as block identifiers and also the collection of the outline field definitions. Those fields should be i18n-izable and sufficient keys could look like <app>.<sub-app>.<rest-of-field-key>. All works fine except for ContentDefinition does not provide its name which results in a warning similar to the following:
..:Cannot obtain name of parent object: info.magnolia.editor.content.ContentDefinition$$EnhancerByCGLIB$$614a4d1b.getName().
We don't care about the content definition's name and field key generator doesn't fail on its absence - only emits the warning and moves on.
Shouldn't we just lower the severity of the log statement to debug for such cases?
- relates to
-
CONTEDIT-57 FieldDefinitionKeyGenerator produces incomplete keys '.fieldName.label' for fields outside of a dialogs/tabs
- Closed
-
MGNLUI-4169 Simplify FieldDefinitionKeyGenerator's logic of parent names collection
- Open