Details
-
Task
-
Resolution: Done
-
Neutral
-
None
-
6.2
-
None
-
-
Empty show more show less
-
Empty show more show less
-
UI FW 14
-
2
Description
Check whether it is still good practice to use currentItemProvider with composite and switchable fields. We are already warning against its use with multi fields (see https://documentation.magnolia-cms.com/display/DOCS62/Item+providers#Itemproviders-Foranydatasource).
If you use currentItemProvider with complex fields, make sure that none of the inner field names clash with:
- Other inner field names at the level where currentItemProvider is used
- Other field names one level up where the complex field is defined
In other words, when using currentItemProvider, every field at every level must have a unique name. Otherwise, nodes sharing the same name could be resolved by multiple fields that use currentItemProvider, which means their content would be overwritten.
See the following example:
form:
properties:
one_compositeField:
$type: compositeField
itemProvider:
$type: currentItemProvider
properties:
inner_simple:
label: simple
$type: textField # first text
inner_simple2:
label: simple
$type: textField # second text
second_compositeField:
$type: compositeField
itemProvider:
$type: currentItemProvider
properties:
inner_simple:
label: simple
$type: textField # fourth text
inner_simple3:
label: simple
$type: textField # third text
# Problem:
Einstein:
inner_simple : fourth text # first text got overwritten
inner_simple2 : second text
inner_simple3: third text
# Using jcrChildNodeProvider in both would fix the problem:
Einstein:
one_compositeField:
inner_simple : first text
inner_simple2 : second text
second_compositeField:
inner_simple : fourth text
inner_simple2 : third text
Checklists
Attachments
Issue Links
- relates to
-
MGNLUI-6222 DOC: currentItemProvider should not be used in multi fields
-
- Closed
-
-
MGNLUI-6316 DOC: Default to jcrChildNodeProvider in jcrMultiField
-
- Closed
-
-
MGNLUI-6332 DOC: Better explanation of itemProvider on multi field page
-
- Closed
-