{"action":"created","issue":{"url":"https://api.github.com/repos/dotCMS/core/issues/8775","repository_url":"https://api.github.com/repos/dotCMS/core","labels_url":"https://api.github.com/repos/dotCMS/core/issues/8775/labels{/name}","comments_url":"https://api.github.com/repos/dotCMS/core/issues/8775/comments","events_url":"https://api.github.com/repos/dotCMS/core/issues/8775/events","html_url":"https://github.com/dotCMS/core/issues/8775","id":142644960,"number":8775,"title":"REST api - Unable to create new version of existing content in different language","user":{"login":"wezell","id":934364,"avatar_url":"https://avatars.githubusercontent.com/u/934364?v=3","gravatar_id":"","url":"https://api.github.com/users/wezell","html_url":"https://github.com/wezell","followers_url":"https://api.github.com/users/wezell/followers","following_url":"https://api.github.com/users/wezell/following{/other_user}","gists_url":"https://api.github.com/users/wezell/gists{/gist_id}","starred_url":"https://api.github.com/users/wezell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wezell/subscriptions","organizations_url":"https://api.github.com/users/wezell/orgs","repos_url":"https://api.github.com/users/wezell/repos","events_url":"https://api.github.com/users/wezell/events{/privacy}","received_events_url":"https://api.github.com/users/wezell/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dotCMS/core/labels/WF%20:%20Merged","name":"WF : Merged","color":"d4c5f9"},{"url":"https://api.github.com/repos/dotCMS/core/labels/WF%20:%20Passed%20QA","name":"WF : Passed QA","color":"98D998"},{"url":"https://api.github.com/repos/dotCMS/core/labels/z-Iter-2","name":"z-Iter-2","color":"bfd4f2"}],"state":"open","locked":false,"assignee":{"login":"shaydotcms","id":8741846,"avatar_url":"https://avatars.githubusercontent.com/u/8741846?v=3","gravatar_id":"","url":"https://api.github.com/users/shaydotcms","html_url":"https://github.com/shaydotcms","followers_url":"https://api.github.com/users/shaydotcms/followers","following_url":"https://api.github.com/users/shaydotcms/following{/other_user}","gists_url":"https://api.github.com/users/shaydotcms/gists{/gist_id}","starred_url":"https://api.github.com/users/shaydotcms/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shaydotcms/subscriptions","organizations_url":"https://api.github.com/users/shaydotcms/orgs","repos_url":"https://api.github.com/users/shaydotcms/repos","events_url":"https://api.github.com/users/shaydotcms/events{/privacy}","received_events_url":"https://api.github.com/users/shaydotcms/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/dotCMS/core/milestones/35","html_url":"https://github.com/dotCMS/core/milestones/3.6","labels_url":"https://api.github.com/repos/dotCMS/core/milestones/35/labels","id":1688186,"number":35,"title":"3.6","description":null,"creator":{"login":"wezell","id":934364,"avatar_url":"https://avatars.githubusercontent.com/u/934364?v=3","gravatar_id":"","url":"https://api.github.com/users/wezell","html_url":"https://github.com/wezell","followers_url":"https://api.github.com/users/wezell/followers","following_url":"https://api.github.com/users/wezell/following{/other_user}","gists_url":"https://api.github.com/users/wezell/gists{/gist_id}","starred_url":"https://api.github.com/users/wezell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wezell/subscriptions","organizations_url":"https://api.github.com/users/wezell/orgs","repos_url":"https://api.github.com/users/wezell/repos","events_url":"https://api.github.com/users/wezell/events{/privacy}","received_events_url":"https://api.github.com/users/wezell/received_events","type":"User","site_admin":false},"open_issues":42,"closed_issues":15,"state":"open","created_at":"2016-04-06T20:32:54Z","updated_at":"2016-06-01T21:40:40Z","due_on":null,"closed_at":null},"comments":3,"created_at":"2016-03-22T13:08:58Z","updated_at":"2016-06-02T13:35:25Z","closed_at":null,"body":"dotCMS throws an error when adding a new language version to an existing piece of content (where that content does not have a version in the new language yet).\r\n\r\nOn starter, using the \"About Quest\" content (which has identifier: 767509b1-2392-4661-a16b-e0e31ce27719)\r\n1) add a new version of About Quest using rest:\r\n```\r\ncurl -v -u admin@dotcms.com:admin -XPUT http://localhost:8080/api/content/publish/1 -H \"Content-Type:application/json\" -d '{\r\n\tidentifier: \"767509b1-2392-4661-a16b-e0e31ce27719\",\r\n\tstInode:\"2a3e91e4-fbbf-4876-8c5b-2233c1739b05\",\r\n\tlanguageId:1,\r\n\ttitle:\"ABOUT QUEST - Ver. 2\",\r\n\tcontentHost:\"demo.dotcms.com\",\r\n\tbody:\"hellow\"\r\n}'\r\n```\r\n\r\n2) Adding a Spanish version of the same content fails:\r\n```\r\ncurl -v -u admin@dotcms.com:admin -XPUT http://localhost:8080/api/content/publish/1 -H \"Content-Type:application/json\" -d '{\r\n\tidentifier: \"767509b1-2392-4661-a16b-e0e31ce27719\",\r\n\tstInode:\"2a3e91e4-fbbf-4876-8c5b-2233c1739b05\",\r\n\tlanguageId:2,\r\n\ttitle:\"ABOUT QUEST en espanol\",\r\n\tcontentHost:\"demo.dotcms.com\",\r\n\tbody:\"Hola, esto es mi cuerpo\"\r\n}'\r\n```\r\n\r\nHere is the log for the error:\r\n```\r\nWARN  2016-03-22 08:35:26,044 com.dotcms.enterprise.rules.RulesAPIImpl:warn(195): Actionlet with name 'VisitorTagsActionlet' already registered.\r\nWARN  2016-03-22 08:35:26,044 com.dotcms.enterprise.rules.RulesAPIImpl:warn(195): Actionlet with name 'SendRedirectActionlet' already registered.\r\nINFO  2016-03-22 08:35:26,062 com.dotmarketing.business.cache.provider.guava.GuavaCache:info(62): ***\t Building Cache : rulescache, size:1000,Concurrency:32\r\nWARN  2016-03-22 08:43:46,546 com.dotcms.rest.ContentResource:warn(195): COOKIES are not in the REQUEST\r\nERROR 2016-03-22 08:43:46,553 com.dotcms.rest.ContentResource:error(134): Error processing Stream\r\njava.lang.RuntimeException: can't get existing content for ident 767509b1-2392-4661-a16b-e0e31ce27719 lang 2\r\n\tat com.dotcms.rest.ContentResource.processMap(ContentResource.java:1097) ~[ContentResource.class:?]\r\n\tat com.dotcms.rest.ContentResource.processJSON(ContentResource.java:1213) ~[ContentResource.class:?]\r\n\tat com.dotcms.rest.ContentResource.singlePUTandPOST(ContentResource.java:789) [ContentResource.class:?]\r\n\tat com.dotcms.rest.ContentResource.singlePUT(ContentResource.java:770) [ContentResource.class:?]\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_51]\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_51]\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_51]\r\n\tat java.lang.reflect.Method.invoke(Method.java:497) ~[?:1.8.0_51]\r\n\tat com.dotcms.repackage.org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [dot.jersey-server-2.22.1_1.jar:?]\r\n\tat com.dotcms.repackage.org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [dot.jersey-server-2.22.1_1.jar:?]\r\n\tat com.dotcms.repackage.org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [dot.jersey-server-2.22.1_1.jar:?]\r\n\tat com.dotcms.repackage.org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [dot.jersey-server-2.22.1_1.jar:?]\r\n\tat com.dotcms.repackage.org.glassfish.jersey.server.model.in\r\n```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/dotCMS/core/issues/comments/223293071","html_url":"https://github.com/dotCMS/core/issues/8775#issuecomment-223293071","issue_url":"https://api.github.com/repos/dotCMS/core/issues/8775","id":223293071,"user":{"login":"shaydotcms","id":8741846,"avatar_url":"https://avatars.githubusercontent.com/u/8741846?v=3","gravatar_id":"","url":"https://api.github.com/users/shaydotcms","html_url":"https://github.com/shaydotcms","followers_url":"https://api.github.com/users/shaydotcms/followers","following_url":"https://api.github.com/users/shaydotcms/following{/other_user}","gists_url":"https://api.github.com/users/shaydotcms/gists{/gist_id}","starred_url":"https://api.github.com/users/shaydotcms/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shaydotcms/subscriptions","organizations_url":"https://api.github.com/users/shaydotcms/orgs","repos_url":"https://api.github.com/users/shaydotcms/repos","events_url":"https://api.github.com/users/shaydotcms/events{/privacy}","received_events_url":"https://api.github.com/users/shaydotcms/received_events","type":"User","site_admin":false},"created_at":"2016-06-02T13:35:25Z","updated_at":"2016-06-02T13:35:25Z","body":"Passed QA. Fix is working in spanish. Added a third language (french) and is working as well\r\nTested locally in: master-3.6 // Mac OS 10.10 // MySQL 5.6.23 // Firefox"}}
{"actor":{"display_login":"shaydotcms"}}