{"action":"created","issue":{"url":"https://api.github.com/repos/sulu/sulu/issues/2453","repository_url":"https://api.github.com/repos/sulu/sulu","labels_url":"https://api.github.com/repos/sulu/sulu/issues/2453/labels{/name}","comments_url":"https://api.github.com/repos/sulu/sulu/issues/2453/comments","events_url":"https://api.github.com/repos/sulu/sulu/issues/2453/events","html_url":"https://github.com/sulu/sulu/issues/2453","id":158574787,"number":2453,"title":"Copy page command copies multiple pages","user":{"login":"cdesign","id":5658799,"avatar_url":"https://avatars.githubusercontent.com/u/5658799?v=3","gravatar_id":"","url":"https://api.github.com/users/cdesign","html_url":"https://github.com/cdesign","followers_url":"https://api.github.com/users/cdesign/followers","following_url":"https://api.github.com/users/cdesign/following{/other_user}","gists_url":"https://api.github.com/users/cdesign/gists{/gist_id}","starred_url":"https://api.github.com/users/cdesign/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cdesign/subscriptions","organizations_url":"https://api.github.com/users/cdesign/orgs","repos_url":"https://api.github.com/users/cdesign/repos","events_url":"https://api.github.com/users/cdesign/events{/privacy}","received_events_url":"https://api.github.com/users/cdesign/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"wachterjohannes","id":1464615,"avatar_url":"https://avatars.githubusercontent.com/u/1464615?v=3","gravatar_id":"","url":"https://api.github.com/users/wachterjohannes","html_url":"https://github.com/wachterjohannes","followers_url":"https://api.github.com/users/wachterjohannes/followers","following_url":"https://api.github.com/users/wachterjohannes/following{/other_user}","gists_url":"https://api.github.com/users/wachterjohannes/gists{/gist_id}","starred_url":"https://api.github.com/users/wachterjohannes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wachterjohannes/subscriptions","organizations_url":"https://api.github.com/users/wachterjohannes/orgs","repos_url":"https://api.github.com/users/wachterjohannes/repos","events_url":"https://api.github.com/users/wachterjohannes/events{/privacy}","received_events_url":"https://api.github.com/users/wachterjohannes/received_events","type":"User","site_admin":false},"milestone":null,"comments":4,"created_at":"2016-06-05T21:05:49Z","updated_at":"2016-06-09T17:24:28Z","closed_at":"2016-06-09T06:42:34Z","body":"| Q | A\r\n| --- | ---\r\n| Bug? | yes\r\n| New Feature? | no\r\n| Sulu Version | 1.2\r\n\r\n#### Actual Behavior\r\n\r\nThe 'Copy page' command sometimes copies multiple pages. Specifically, if multiple copies of a page exist under the same parent node, when the original page is copied, that page *AND* all of its clones (under the same parent node) are copied.\r\n\r\nThis may be the same issue as: https://github.com/sulu/sulu/issues/2429\r\n\r\n#### Expected Behavior\r\n\r\nObviously, only the page selected should be copied.\r\n\r\n#### Steps to Reproduce\r\n\r\n1) default Sulu 1.2 install\r\n2) Create the following content hierarchy:**\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- Section 1\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- Page 1\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- Page 2\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- Page 3\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- Section 2\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- Section 3\r\n\r\n** Be sure to use the '+' button or 'Save and new' command to create the pages (not 'Copy page').\r\n\r\n3) Select Page 2 in the content hierarchy and clone it using the 'Copy page' command (under the gear dropdown menu at bottom).\r\n\r\n4) Rename the cloned page to 'Page 2 Copy'. Your content hierarchy should now look like this:\r\n\r\n<img width=\"568\" alt=\"content setup\" src=\"https://cloud.githubusercontent.com/assets/5658799/15807629/7da27462-2b28-11e6-9ae8-cc5d6ea0bb2e.png\">\r\n\r\n5) Now.. Select 'Page 1' and select 'Copy page' from the gear menu. Choose 'Section 2' as the destination parent.\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- Sulu correctly copies Page 1 to Section 2\r\n\r\n<img width=\"567\" alt=\"copy 1 result\" src=\"https://cloud.githubusercontent.com/assets/5658799/15808169/684b7632-2b36-11e6-8ac6-3e10c0747cc7.png\">\r\n\r\n6) Select 'Page 2' and select 'Copy page'. Choose 'Section 3' as the destination parent.\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- Sulu <b><u>incorrectly</u></b> copies both 'Page 2' and 'Page 2 Copy' to Section 3\r\n\r\n<img width=\"569\" alt=\"copy 2 result\" src=\"https://cloud.githubusercontent.com/assets/5658799/15808171/776c4128-2b36-11e6-9168-c8c48dfdb10a.png\">\r\n\r\nThis appears to only be an issue if the cloned page ('Page 2 Copy' in this case) exists at the same node level it's ancestor ('Page 2'). To see this, try the following:\r\n\r\n7) Delete 'Page 2' and 'Page 2 Copy' from Section 3 (just to get an empty section).\r\n\r\n8) Using the 'Move page' command, move 'Page 2 Copy' from Section 1 to Section 2.\r\n\r\n9) Copy 'Page 2' from Section 1 to Section 3 (repeating step #6).\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- Sulu correctly copies only 'Page 2' to Section 3.\r\n\r\n10) Now delete 'Page 2' from Section 3 (the page you just added).\r\n\r\n11) Move 'Page 2 Copy' from Section 2 back to Section 1.\r\n\r\n12) Copy 'Page 2' from Section 1 to Section 3 (repeating step #6 yet again).\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- Sulu <b>incorrectly</b> copies both 'Page 2' and 'Page 2 Copy' to Section 3\r\n\r\nSo it would appear that is only an issue when clones share the same parent node as the page they were cloned from.\r\n\r\nBtw.. if you create additional copies of 'Page 2' (within Section 1) and again copy 'Page 2' to Section 3, all of the clones are copied (along with 'Page 2') to the new section."},"comment":{"url":"https://api.github.com/repos/sulu/sulu/issues/comments/224966226","html_url":"https://github.com/sulu/sulu/issues/2453#issuecomment-224966226","issue_url":"https://api.github.com/repos/sulu/sulu/issues/2453","id":224966226,"user":{"login":"cdesign","id":5658799,"avatar_url":"https://avatars.githubusercontent.com/u/5658799?v=3","gravatar_id":"","url":"https://api.github.com/users/cdesign","html_url":"https://github.com/cdesign","followers_url":"https://api.github.com/users/cdesign/followers","following_url":"https://api.github.com/users/cdesign/following{/other_user}","gists_url":"https://api.github.com/users/cdesign/gists{/gist_id}","starred_url":"https://api.github.com/users/cdesign/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cdesign/subscriptions","organizations_url":"https://api.github.com/users/cdesign/orgs","repos_url":"https://api.github.com/users/cdesign/repos","events_url":"https://api.github.com/users/cdesign/events{/privacy}","received_events_url":"https://api.github.com/users/cdesign/received_events","type":"User","site_admin":false},"created_at":"2016-06-09T17:24:28Z","updated_at":"2016-06-09T17:24:28Z","body":"Awesome! Thx much. And this did solve the problem in my app."}}
{"actor":{"display_login":"cdesign"}}