[MGNLUI-5591] JCR clipboard may contain references to deleted nodes Created: 16/Dec/19  Updated: 24/Jan/20  Resolved: 23/Jan/20

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

Type: Bug Priority: Major
Reporter: Christoph Meier Assignee: Rishab Dhar
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

CE-demo-webapp; 6.2 (Snapshot: 2019.12.10 09:26:46)
CE-demo-webapp; 6.2 (Snapshot: 2019.12.14 20:36:46)

OS-X 10.14.6, Forefox-71


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: UI Framework & 6.2 Ramp up 15
Story Points: 3

 Description   

JCR clipboard keeps the references to the copied/cut nodes, even after their possible deletion. In case that happens, even canPasteInto checks may fail (like elaborately described in cmeier's investigation).

Proposal to fix:
Sanitise the node existence within clipboard either on every access to stored items or as a result of observation update.



 Comments   
Comment by Aleksandr Pchelintcev [ 06/Jan/20 ]

initial description cmeier

I have observed various Actions availability not in sync issues on the new Pages app.

I differentiate between

  • Case which requires an app restart
  • Case which requires subapp swap

to properly update the actions availability.

I assume the issues described here have nothing to do with action availability configuration.
There is another issue, where Publish incl. subpages is not available, which I assume is a "gap" in the action config.
The issue with Publish incl. subpages is described in PAGES-216 (not here); however I cannot completely excludes that this issue and the one described in 216 are related.

Case which requires an app restart

This is the "worst case" I have observed. (It has confused me for quite some time. But now at least I know how to reproduce it. The reproduction procedure is a bit complex, but I cannot offer a simpler atm.)

To reproduce

  • Create the subtree /aaa/bbb/ccc
  • Do a copy paste: copy /aaa -> paste it as child of /aaa/bbb
  • Delete /aaa ; publish deletion
  • Again, create /aaa
  • Select /aaa and try to Publish.

The action Publish is not available.
The app is now in a "strange state".
E.g. you can now still "Delete" pages, but you cannot execute "Publish deletion" (on other pages).

It doesnt't help to open a detail editor.
To overcome the problem, you must close the app and reopen it.

This "strange state" may have also an influence on the availability of other actions. I have just analyzed in details those which are listed here.

What is described until here, I could reproduce "always".
The next subsection is quasi the worst case of the worst case ... that one does not happen always.

Worst case scenario

In the "worst" case (of the already worst case ... ups) the workspace seems to be "screwed".
When following the procedure above, then adding another node like /xxx
the app may create the subtree /untitled/xxx instead. (/untitled is also of type mgnl:page, but has no value on the property template.)
I have observed this many times, however, I cannot reproduce it always.
The really bad thing in that case is ... closing and reopeing the app does not "fix" the issue.
In such a case I was tempted to completely clean the JCR repo and reinstall the bundle from scratch.

Case which requires subapp swap

In this case, the Actions availability on the detail subapp is out of sync, however, by swapping to the browser and then swap back to the detail subapp, the Actions availability gets properly updated.

To reproduce

  • Create the page /xxx ; maybe add some content
  • OPen it with the Detail subapp, use the action "Preview".
  • Now we get the action "Publish" -> Use it, publish.
  • Check on the pub.context whether the Pblish was successful. Usually works.

After having published, on the Detail subapp, the action "Publish" remains, the action "Unpublish" does not appear.
But it should be vice versa. "Unpublish" should appear, "Publish" should disappear.

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