[MAGNOLIA-343] Copy a page onto itself causes endless loop Created: 25/Apr/05  Updated: 20/Feb/15  Resolved: 25/Apr/05

Status: Closed
Project: Magnolia
Component/s: core
Affects Version/s: 2.01
Fix Version/s: 2.1 Final

Type: Bug Priority: Major
Reporter: Andreas Weder Assignee: Fabrizio Giustina
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

any


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:

 Description   

If you copy a page node onto itself, the copying operation gets into an endless loop. Copying never stops, you have to stop the server.

Ultimately, this is related to other copying bugs and should be handled properly by the JCR implementation.



 Comments   
Comment by Andreas Weder [ 25/Apr/05 ]

The following patch fixes the problem for the 2.02 branch. The idea is that the GUI simply doesn't allow copying a page onto itself, much like it already does for moving a page.

Index: C:/Projects/Magnolia_2_02_Branch/src/webapp/admindocroot/js/tree.js
===================================================================
— C:/Projects/Magnolia_2_02_Branch/src/webapp/admindocroot/js/tree.js (revision 547)
+++ C:/Projects/Magnolia_2_02_Branch/src/webapp/admindocroot/js/tree.js (working copy)
@@ -575,8 +575,13 @@
if (this.clipboardMethod==0 && id.indexOf(this.clipboardNode.id)==0 && pasteType!=0)

{ //move into itself is not possible - mgnlAlert("It's not possible to move a node into itself."); + mgnlAlert("It's not possible to move a node onto itself."); }

+ else if (this.clipboardMethod==1 && id.indexOf(this.clipboardNode.id)==0 && pasteType!=0)
+

{ + //move into itself is not possible + mgnlAlert("It's not possible to copy a node onto itself."); + }


else
{
if (lineDivId)

Comment by Fabrizio Giustina [ 25/Apr/05 ]

fixed in svn both for trunk and the 2.02 branch, thanks

Generated at Mon Feb 12 03:16:29 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.