[MGNLUI-3973] After zip import, location points to non-existing /untitled node, shows multi-item actionbar section Created: 06/Aug/16  Updated: 15/May/17  Resolved: 30/Aug/16

Status: Closed
Project: Magnolia UI
Component/s: actionbar, admincentral, tree/list
Affects Version/s: 5.4.8
Fix Version/s: 5.4.9, 5.5

Type: Bug Priority: Neutral
Reporter: Sang Ngo Huu Assignee: Oanh Thai Hoang
Resolution: Fixed Votes: 0
Labels: import, tree
Remaining Estimate: 0d
Time Spent: 1d 7h
Original Estimate: 3d

Issue Links:
causality
dependency
depends upon MGNLDAM-671 Update version handler to configure f... Closed
relation
is related to MGNLUI-3950 Actionbar inactive after importing Closed
is related to MGNLUI-4202 Make Zip upload behavior configurable 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
Date of First Response:
Sprint: Saigon 59
Story Points: 3

 Description   

Similarly to linked ticket MGNLUI-3950, UI selection status is a bit inconsistent after a zip import action.

Current proposal is to create a folder with the zip file name and select/expand this one; should be a reasonable behavior change.


Former issue title and description:
Expand, collapse then expand the sibling of node which has just imported causes NPE

Steps to reproduce:

  • Access any apps has import action with tree view like pages, config app
  • Select root node
  • Import a node
  • Expand sibling node (modules in config app) then collapse it, then expand again. You will see an error.

Here is error log:

com.vaadin.event.ListenerMethod$MethodException: Invocation of method nodeCollapse in info.magnolia.ui.workbench.tree.TreeViewImpl$CollapsedNodeListener failed.
	at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:528)
	at com.vaadin.ui.TreeTable.fireCollapseEvent(TreeTable.java:856)
	at com.vaadin.ui.TreeTable.toggleChildVisibility(TreeTable.java:569)
	at com.vaadin.ui.TreeTable.changeVariables(TreeTable.java:429)
	at info.magnolia.ui.vaadin.grid.MagnoliaTreeTable.changeVariables(MagnoliaTreeTable.java:86)
...
Caused by: java.lang.NullPointerException
	at info.magnolia.ui.workbench.tree.TreeViewImpl.isDescendantOf(TreeViewImpl.java:289)
	at info.magnolia.ui.workbench.tree.TreeViewImpl.unselectDescendants(TreeViewImpl.java:274)
	at info.magnolia.ui.workbench.tree.TreeViewImpl.access$500(TreeViewImpl.java:68)
	at info.magnolia.ui.workbench.tree.TreeViewImpl$CollapsedNodeListener.nodeCollapse(TreeViewImpl.java:266)


 Comments   
Comment by Mikaël Geljić [ 10/Aug/16 ]

Nice catch, and thanks for the detailed steps to reproduce—for me it failed right when collapsing the folder (without expanding again).
I can confirm it on personas app on demo.

Comment by Oanh Thai Hoang [ 16/Aug/16 ]

This ticket can reproduce in demo author version 5.4.8 and it is fixed by MGNLUI-3950 because the eventBus will send CCE and the workbench will be refreshed as well. But there is still one case for Upload Zip archive in Asset app need to be fixed with the same code

Comment by Mikaël Geljić [ 16/Aug/16 ]

Excellent, shall we give it a shot then?

As for what itemId to fire the CCE with (i.e. which item to select), I'm thinking we could create a folder with the zip file name and select/expand this one; but it's a change of behavior, so we'll probably to cross-check with weder here as well. Any opinion?

Comment by Oanh Thai Hoang [ 06/Sep/16 ]

for release note:

After clicking Upload Zip archive action in Assets app, a folder with the asset zip file name will be created, selected, expanded and kept all uploading contents

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