[MGNLUI-6838] JCR browser keeps mgnl:tmpDeleted$Node selected Created: 03/Feb/21  Updated: 23/Sep/21  Resolved: 16/Sep/21

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

Type: Bug Priority: Medium
Reporter: Julian Nodarse Assignee: Adam Siska
Resolution: Fixed Votes: 2
Labels: maintenance, ui-team-support
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Problem/Incident
Relates
relates to MAGNOLIA-8040 After deleting node in JCR browser pa... Closed
causality
duplicate
duplicates MGNLUI-6360 Deleted nodes stay in value context i... Closed
is duplicated by MGNLUI-6828 JCR browser doesn't remove deleted it... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[X]* Doc/release notes changes? Comment present?
[X]* Downstream builds green?
[X]* Solution information and context easily available?
[X]* Tests
[X]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[X]* Steps to reproduce, expected, and actual results filled
[X]* Affected version filled
Date of First Response:
Sprint: UI FW 36, UI FW 37
Story Points: 3

 Description   

There is inconsistent behavior when deleting nodes and importing content. For all test cases below, create some content at the root level in the pages app / website workspace and continue with each case's instructions.

Case 1
Export the node via JCR app
Delete it via JCR app
Re-import it onto the JCR app -> receive “node already exists message”. I then saw on the bottom left corner the path for mgnl:tmpDeleted$Node

[^Case 1.mov]

Case 2
Export the node via JCR app
Delete it via JCR app.
Close the JCR app
Re-open JCR app
Reimport the node -> import success. No error message.

[^Case 2.mov]

Case 3
Export the node
Delete it via JCR app.
Close the JCR app.
Open the JCR tools app
Click the importer tab
Selected the node to upload
Select "website" workspace
Select the “only import if no existing node” option
Click import -> receive “node already exists” message for mgnl:tmpDeleted$Node

This shouldn't happen as the node is deleted already so it shouldn't exist at all and you should be able to import it.

Case 4
Export the node
Delete it via pages app (not JCR app).
Open the JCR app
Import the page node via import button -> import success. No error message

Case 5
Export the node
Delete it via pages app (not JCR app).
Open the JCR tools app
Click on the importer tab
Select the node to upload
Select "website" workspace
Select the “only import if no existing node” option
Click import -> receive “node already exists” message for mgnl:tmpDeleted$Node

Again - this shouldn't happen as the node is deleted already so it shouldn't exist at all and you should be able to import it.

Workaround
Use one of the successful cases above to import content.
Try not to edit nodes directly on the JCR.

Other Notes
This was tested on 6.2.6
Discussion on Slack https://magnolia-cms.slack.com/archives/CKSC4TJQK/p1612423701093000



 Comments   
Comment by Simon Tourville [ 25/Mar/21 ]

Any fix plan in the next release?

Comment by Simon Tourville [ 14/Jun/21 ]

Very happy to see this ticket moving!

(I cannot tell you the amount of problems this is causing losing our UUID when deleting and importing content!)

Workaround: Using groovy to clean it up every time we delete something.

Comment by Marvin Kerkhoff [ 24/Jun/21 ]

Hi @Simon i would be very happy if you can add the groovy script you are using into the ticket. I am currenty getting this issue and my JCR Browser says that the workspace is completly empty and i already tried reindexing whatsover. It seems that every import also with the successful one at the top will create new uuids which creates a lot of other issues.

Comment by Simon Tourville [ 28/Jun/21 ]

@Marvin,

Here is the script we always have to run after deleting a node and reimporting it.

Any plan to solve it in a near future?

session = ctx.getJCRSession('website');
try {
 node = session.getNode('/mgnl:tmpDeleted$Node');
 node.remove();
} catch(Exception ex) {
 println("Erreur 'website': " + ex);
} 
session.save();session = ctx.getJCRSession('dam')
try {
 node = session.getNode('/mgnl:tmpDeleted$Node')
 node.remove();
} catch(Exception ex) {
 println("Erreur 'dam': " + ex);
} 
session.save()
Comment by Roman Kovařík [ 14/Sep/21 ]

Reopened:

still an issue, a little different behaviour not published vs. published node.

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