[MGNLUI-5060] New framework: move filtering logic from wrapper back to data provider Created: 28/Feb/19  Updated: 30/Jul/19  Resolved: 25/Jul/19

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

Type: Bug Priority: Neutral
Reporter: Roman Kovařík Assignee: Roman Kovařík
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: 1h 26m
Time Spent: 41m
Original Estimate: Not Specified

Issue Links:
Relates
relates to MGNLUI-4556 Reinstate preview functionality in ac... Closed
causality
caused by MGNLUI-5000 Timebox: Assess JCR TreeGrid function... Closed
dependency
is depended upon by MGNLUI-5098 DOC: previewDefinition property of Jc... Closed
duplicate
duplicates MGNLUI-5115 previewDefinition of jcr data source ... 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
Epic Link: UI framework: basic features
Sprint: UI Framework 2

 Description   

The logic for filtering items based on node/property types was originally in the JCR data providers.

Then with the introduction of node wrapper management we've moved it into the content decorator logic.

This brought these problems:

  1. JCR preview provider doesn't work anymore as the binary node is filtered out
  2. nodes can be sent to actions which shouldn't be limited by the data provider needs

Additionally, system properties are always filtered out, which is not correct for any app (JCR browser).

 



 Comments   
Comment by Roman Kovařík [ 23/Jul/19 ]

Another symptom:

Caused by: javax.jcr.ItemExistsException: This node already exists: /untitled/defineVariantDistribution
	at org.apache.jackrabbit.core.NodeImpl.addNode(NodeImpl.java:1299) ~[jackrabbit-core-2.18.1.jar:2.18.1]
	at org.apache.jackrabbit.core.session.AddNodeOperation.perform(AddNodeOperation.java:111) ~[jackrabbit-core-2.18.1.jar:2.18.1]
	at org.apache.jackrabbit.core.session.AddNodeOperation.perform(AddNodeOperation.java:37) ~[jackrabbit-core-2.18.1.jar:2.18.1]
	at org.apache.jackrabbit.core.session.SessionState.perform(SessionState.java:216) ~[jackrabbit-core-2.18.1.jar:2.18.1]
	at org.apache.jackrabbit.core.ItemImpl.perform(ItemImpl.java:91) ~[jackrabbit-core-2.18.1.jar:2.18.1]
	at org.apache.jackrabbit.core.NodeImpl.addNodeWithUuid(NodeImpl.java:1818) ~[jackrabbit-core-2.18.1.jar:2.18.1]
	at org.apache.jackrabbit.core.NodeImpl.addNode(NodeImpl.java:1778) ~[jackrabbit-core-2.18.1.jar:2.18.1]
	at info.magnolia.jcr.wrapper.DelegateNodeWrapper.addNode(DelegateNodeWrapper.java:129) ~[magnolia-core-6.2-SNAPSHOT.jar!/:?]
	at info.magnolia.jcr.decoration.ContentDecoratorNodeWrapper.addNode(ContentDecoratorNodeWrapper.java:131) ~[magnolia-core-6.2-SNAPSHOT.jar!/:?]
	at info.magnolia.jcr.wrapper.DelegateNodeWrapper.addNode(DelegateNodeWrapper.java:129) ~[magnolia-core-6.2-SNAPSHOT.jar!/:?]
	at info.magnolia.jcr.decoration.ContentDecoratorNodeWrapper.addNode(ContentDecoratorNodeWrapper.java:131) ~[magnolia-core-6.2-SNAPSHOT.jar!/:?]
	at info.magnolia.jcr.wrapper.DelegateNodeWrapper.addNode(DelegateNodeWrapper.java:129) ~[magnolia-core-6.2-SNAPSHOT.jar!/:?]
	at info.magnolia.jcr.decoration.ContentDecoratorNodeWrapper.addNode(ContentDecoratorNodeWrapper.java:131) ~[magnolia-core-6.2-SNAPSHOT.jar!/:?]
	at info.magnolia.jcr.wrapper.MgnlPropertySettingNodeWrapper.addNode(MgnlPropertySettingNodeWrapper.java:210) ~[magnolia-core-6.2-SNAPSHOT.jar!/:?]
	at info.magnolia.jcr.wrapper.DelegateNodeWrapper.addNode(DelegateNodeWrapper.java:129) ~[magnolia-core-6.2-SNAPSHOT.jar!/:?]
	at info.magnolia.jcr.decoration.ContentDecoratorNodeWrapper.addNode(ContentDecoratorNodeWrapper.java:131) ~[magnolia-core-6.2-SNAPSHOT.jar!/:?]
	at info.magnolia.audit.MgnlAuditLoggingContentDecoratorNodeWrapper.addNode(MgnlAuditLoggingContentDecoratorNodeWrapper.java:84) ~[magnolia-core-6.2-SNAPSHOT.jar!/:?]
	at info.magnolia.jcr.wrapper.DelegateNodeWrapper.addNode(DelegateNodeWrapper.java:129) ~[magnolia-core-6.2-SNAPSHOT.jar!/:?]
	at info.magnolia.jcr.decoration.ContentDecoratorNodeWrapper.addNode(ContentDecoratorNodeWrapper.java:131) ~[magnolia-core-6.2-SNAPSHOT.jar!/:?]
	at info.magnolia.jcr.wrapper.DelegateNodeWrapper.addNode(DelegateNodeWrapper.java:129) ~[magnolia-core-6.2-SNAPSHOT.jar!/:?]
	at info.magnolia.jcr.decoration.ContentDecoratorNodeWrapper.addNode(ContentDecoratorNodeWrapper.java:131) ~[magnolia-core-6.2-SNAPSHOT.jar!/:?]
	at info.magnolia.ui.datasource.jcr.JcrNodeWrapper.addNode(JcrNodeWrapper.java:93) ~[magnolia-ui-framework-jcr-6.2-SNAPSHOT.jar!/:?]
	at info.magnolia.jcr.util.NodeUtil.createPath(NodeUtil.java:637) ~[magnolia-core-6.2-SNAPSHOT.jar!/:?]
	at info.magnolia.jcr.util.NodeUtil.createPath(NodeUtil.java:614) ~[magnolia-core-6.2-SNAPSHOT.jar!/:?]
	at info.magnolia.ui.databinding.FetchJcrSubNode.lambda$read$0(FetchJcrSubNode.java:86) ~[magnolia-ui-framework-jcr-6.2-SNAPSHOT.jar!/:?]

hasNode check returns false as the node is hidden by the filtering logic (if mgnl:contentNode is not listed in the datasource definition) but fails on addNode call.

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