[MGNLUI-3593] Choose dialog of a content app fails with NPE if no tree view is defined Created: 17/Sep/15  Updated: 15/Apr/16  Resolved: 06/Oct/15

Status: Closed
Project: Magnolia UI
Component/s: app
Affects Version/s: 5.3.11
Fix Version/s: 5.3.12, 5.4.3

Type: Bug Priority: Major
Reporter: Tom Wespi Assignee: Christoph Meier
Resolution: Fixed Votes: 0
Labels: pm
Remaining Estimate: 0d
Time Spent: 1d 2h 34m
Original Estimate: Not Specified

Attachments: PNG File screen1.png     PNG File screen2.png     PNG File screen3.png     PNG File screen4.png     PNG File screen5.png    
Issue Links:
relation
is related to MGNLUI-3615 Deprecate WorkbenchView#addContentVie... 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
Date of First Response:
Sprint: Basel 13
Story Points: 5

 Description   

Problem Statement: content apps can also manage list based data. A list of countries for example. This works until the content should be referenced in another app. Then the choose dialog fails to open because it expects the tree view.

Justification: I came across this problem in several situations where developers try to do the next steps with content apps. It is hopefully not hard to fix

Solution: If it is only a configuration issue then the at least the error message should give more information why the call failed.

Original report by Tom
When no "Tree View" is defined in an App's "contentViews", only a "List View" (as often happen in structured data), it ends with a NPE because magnolia always try to load the "Tree View" at first.

When Adding a "Tree View" everything is working, but we do not want a Tree View, since in the Edtior can move Nodes into nodes, which should not be possible.

Stacktrace: https://gist.github.com/p4elkin/d40c12c10c699c851663



 Comments   
Comment by Christoph Meier [ 06/Oct/15 ]

Fix is on branch "MGNLUI-3593".

Comment by Aleksandr Pchelintcev [ 07/Oct/15 ]

Looks good to me generall. Some remarks though:

  • The commit claims 'code simplification' has happened - but was it really necessary to get rid of all those 'this.' refs? Is it a new coding standard to not use them whenever possible? =) Or is it just too aggressive IDE settings?
  • WorkbenchViewImpl.addContentView - annotation precede the JavaDoc, we usually do that vice-versa
  • WorkbenchPresenter.resolveWorkbenchRoot - ditto
Generated at Mon Feb 12 09:08:11 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.