{"action":"created","issue":{"url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/issues/1066","repository_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms","labels_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/issues/1066/labels{/name}","comments_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/issues/1066/comments","events_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/issues/1066/events","html_url":"https://github.com/AlchemyCMS/alchemy_cms/issues/1066","id":161136902,"number":1066,"title":"Copying language tree errors with \"RecordInvalid\"","user":{"login":"m43nu","id":2545317,"avatar_url":"https://avatars.githubusercontent.com/u/2545317?v=3","gravatar_id":"","url":"https://api.github.com/users/m43nu","html_url":"https://github.com/m43nu","followers_url":"https://api.github.com/users/m43nu/followers","following_url":"https://api.github.com/users/m43nu/following{/other_user}","gists_url":"https://api.github.com/users/m43nu/gists{/gist_id}","starred_url":"https://api.github.com/users/m43nu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m43nu/subscriptions","organizations_url":"https://api.github.com/users/m43nu/orgs","repos_url":"https://api.github.com/users/m43nu/repos","events_url":"https://api.github.com/users/m43nu/events{/privacy}","received_events_url":"https://api.github.com/users/m43nu/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/labels/bug","name":"bug","color":"e11d21"},{"url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/labels/needs%20to%20be%20confirmed","name":"needs to be confirmed","color":"c7def8"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2016-06-20T07:59:34Z","updated_at":"2016-09-16T15:26:09Z","closed_at":null,"body":"AlchemyCMS Version: 3.3.0\r\nRails Version: 4.2.6\r\n\r\nI'm trying to copy our main language tree for a new language and it breaks after a few pages and states:\r\n`ActiveRecord::RecordInvalid Validierung von URL-Name ist bereits vergeben. ist fehlgeschlagen.`\r\n![error](https://cloud.githubusercontent.com/assets/2545317/16186261/c4f4b648-36c9-11e6-8f6a-6d27acce7deb.png)\r\n\r\nI checked where in the tree the copying failed and saw that the method created a copy in the main-language tree as well (not in the copied one).\r\n\r\nIt's hard to reproduce as our page-tree is kind of heavy and complex, and it breaks on different pages and not on a specific one (tried a few times).\r\nWhen I want to remove the copied tree to start all over, it states:\r\n`ActiveRecord::RecordNotFound Couldn't find Alchemy::Element with 'id'=2578`\r\n![error-2](https://cloud.githubusercontent.com/assets/2545317/16186898/7dfe213a-36cd-11e6-9411-205a21dd336f.png)\r\n\r\nAnd I have to delete some pages and elements manually.\r\n\r\nMaybe there are any \"ghosts\" in the database?"},"comment":{"url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/issues/comments/247630144","html_url":"https://github.com/AlchemyCMS/alchemy_cms/issues/1066#issuecomment-247630144","issue_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/issues/1066","id":247630144,"user":{"login":"tvdeyen","id":42868,"avatar_url":"https://avatars.githubusercontent.com/u/42868?v=3","gravatar_id":"","url":"https://api.github.com/users/tvdeyen","html_url":"https://github.com/tvdeyen","followers_url":"https://api.github.com/users/tvdeyen/followers","following_url":"https://api.github.com/users/tvdeyen/following{/other_user}","gists_url":"https://api.github.com/users/tvdeyen/gists{/gist_id}","starred_url":"https://api.github.com/users/tvdeyen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tvdeyen/subscriptions","organizations_url":"https://api.github.com/users/tvdeyen/orgs","repos_url":"https://api.github.com/users/tvdeyen/repos","events_url":"https://api.github.com/users/tvdeyen/events{/privacy}","received_events_url":"https://api.github.com/users/tvdeyen/received_events","type":"User","site_admin":false},"created_at":"2016-09-16T15:26:09Z","updated_at":"2016-09-16T15:26:09Z","body":"> The db is missing a very important feature that is the foreign key constraints and IMHO we should add them ASAP.\r\n\r\nAbsolutely 👍 \r\n\r\nWould you mind to send a PR? Would be very appreciated.\r\n\r\nThanks for reporting back!"}}
{"actor":{"display_login":"tvdeyen"}}