[MGNLUI-6253] Allow MultiFields using jcrChildNodeProviders to read children regardless of their names (followup to 6190) Created: 29/Sep/20  Updated: 28/Jan/21  Resolved: 16/Dec/20

Status: Closed
Project: Magnolia UI
Component/s: None
Affects Version/s: None
Fix Version/s: 6.2.6

Type: Bug Priority: Neutral
Reporter: Šimon Demočko Assignee: Šimon Demočko
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: 7.25h
Original Estimate: Not Specified

Attachments: PNG File Screenshot 2020-12-03 at 10.58.35.png    
Issue Links:
Cloners
is cloned by MAGNOLIA-7908 Some refactorings and additions to ut... Closed
is cloned by MGNLPN-511 Downstream clone - Allow MultiFields ... Closed
Issue split
split to MAGNOLIA-7936 Exception message from ABean#init met... Closed
split to MGNLUI-6388 Convert NodeDeepEqualsAssertBuilder i... Open
split to MGNLUI-6285 Consider notifying in Definition's ap... Open
split to MGNLUI-6288 DefaultJcrNodeOrderHandler is prefix ... Open
dependency
is depended upon by MGNLPN-511 Downstream clone - Allow MultiFields ... Closed
documentation
to be documented by MGNLUI-6401 DOC: New 'strict' property in ByIndex... Closed
relation
is related to MGNLUI-6274 Multivalue field is not displayed cor... Closed
supersession
supersedes MGNLPN-515 Exception on Choose Audience action Closed
supersedes MGNLUI-6190 Refactor dependencies for MGNLUI-6253... 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
Release notes required:
Yes
Documentation update required:
Yes
Date of First Response:
Epic Link: MultiFields compatibility
Sprint: UI FW 12, UI FW 13, UI FW 14, UI FW 16, UI FW 17
Story Points: 8

 Comments   
Comment by Šimon Demočko [ 23/Oct/20 ]

Not a complete list yet, but some things we'll need to document somehow:

  • when a user already configured multi field with {@link info.magnolia.ui.editor.CurrentItemProvider}, but uses {@link ByIndexedChildNodes.Definition} the resolving of nodes will be set {@link ByIndexedChildNodes.Definition#setStrict(boolean)} to false, because otherwise other non-multi related nodes would be resolved as multis, resulting in errors and possibly overwritten non-multi related data.
  • when {@link JcrChildNodeProviderDefinition#isSupportI18N()} is false that configuration flattens localized multi parent nodes into a single parent. Then child nodes need to be resolved to respect their locale suffixes, which wouldn't happen when strict is false. It would resolve everything beneath the parent for any locale. This is to support compatibility of non-ported transformer classes like MultiValueSubChildrenNodePropertiesTransformer and DelegatingMultiValueSubnodeTransformer.
     
    If users configured their multis not using jcrMultiField alias or JcrMultiFieldDefiniiton or any of its extensions but used MultiFieldDefinition directly (using "multiFied") alias and somehow ended up with one of the configurations above, they would not be safeguarded against a bad configuration, so they would have to change their configuration to jcrMultiField.
     
    This one is quite difficult to grasp and document, so we might end up not putting it anywhere and only react to it as necessary if support tickets will arrive. 
  • https://documentation.magnolia-cms.com/display/DOCS62/Magnolia+6+UI+ports+of+5+UI+field+transformer+classes will need example configurations or clarified description of the configuration, because it's easy to misconfigure with current instructions
  • (2020-12-01) I'll add more details soon.
Comment by Šimon Demočko [ 14/Dec/20 ]
  • Contacts configuration:
  • jcrGetIndexedChildNode is used internally by entry resolution mechanisms. It cannot be set for itemProvider of the multi-field. That is one level up to where it is and should be used. However, the alias suggests encouragement for common usage, while it's really an implementation detail that could rarely be useful to someone. We'll remove the alias and remove the doc mention from Item Provider's page in MGNLUI-6457 PR.
  • ByLexicographicallyIndexedChildNodes: failed to reproduce. Have you used a correct configuration? It should look like this:
          i18n: true
          $type: jcrMultiField
          itemProvider:
            $type: jcrChildNodeProvider
            supportI18N: false
          entryResolution:
            class: info.magnolia.ui.editor.ByLexicographicallyIndexedChildNodes$Definition
          orderHandler: 
            class: info.magnolia.ui.editor.LexicographicallyIndexedJcrNodeOrderHandler$Definition

This page explains it, but I would suggest example configuration or rewriting it, cause it's easy to misconfigure https://documentation.magnolia-cms.com/display/DOCS62/Magnolia+6+UI+ports+of+5+UI+field+transformer+classes

Generated at Mon Feb 12 09:34:38 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.