{"action":"created","issue":{"url":"https://api.github.com/repos/geosolutions-it/MapStore/issues/740","labels_url":"https://api.github.com/repos/geosolutions-it/MapStore/issues/740/labels{/name}","comments_url":"https://api.github.com/repos/geosolutions-it/MapStore/issues/740/comments","events_url":"https://api.github.com/repos/geosolutions-it/MapStore/issues/740/events","html_url":"https://github.com/geosolutions-it/MapStore/issues/740","id":109744762,"number":740,"title":"Print plugin issue with layouts with a name longer than 2 chars","user":{"login":"offtherailz","id":1279510,"avatar_url":"https://avatars.githubusercontent.com/u/1279510?v=3","gravatar_id":"","url":"https://api.github.com/users/offtherailz","html_url":"https://github.com/offtherailz","followers_url":"https://api.github.com/users/offtherailz/followers","following_url":"https://api.github.com/users/offtherailz/following{/other_user}","gists_url":"https://api.github.com/users/offtherailz/gists{/gist_id}","starred_url":"https://api.github.com/users/offtherailz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/offtherailz/subscriptions","organizations_url":"https://api.github.com/users/offtherailz/orgs","repos_url":"https://api.github.com/users/offtherailz/repos","events_url":"https://api.github.com/users/offtherailz/events{/privacy}","received_events_url":"https://api.github.com/users/offtherailz/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/geosolutions-it/MapStore/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":{"login":"mricca","id":1880571,"avatar_url":"https://avatars.githubusercontent.com/u/1880571?v=3","gravatar_id":"","url":"https://api.github.com/users/mricca","html_url":"https://github.com/mricca","followers_url":"https://api.github.com/users/mricca/followers","following_url":"https://api.github.com/users/mricca/following{/other_user}","gists_url":"https://api.github.com/users/mricca/gists{/gist_id}","starred_url":"https://api.github.com/users/mricca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mricca/subscriptions","organizations_url":"https://api.github.com/users/mricca/orgs","repos_url":"https://api.github.com/users/mricca/repos","events_url":"https://api.github.com/users/mricca/events{/privacy}","received_events_url":"https://api.github.com/users/mricca/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2015-10-05T07:43:11Z","updated_at":"2015-10-09T09:33:14Z","closed_at":null,"body":"The layout selector, on change event, split the old layout removing the first 2 chars from the old layout id to create the new id. It works with layouts like A3, A4 and so on, but fails for layouts like LETTER, 11x17 .... \r\n\r\ne.g. \r\n``A4_2_pages_with_legend`` --> ``LETTER_2_pages_with_legend works\r\n``LETTER_2_pages_with_legend --> ``A4TTER_2_pages_with_legend fails. \r\n\r\n\r\nreferences: \r\nhttps://github.com/geosolutions-it/MapStore/blob/master/mapcomposer/app/static/externals/GeoExt/lib/GeoExt/plugins/PrintProviderField.js#L122\r\n\r\nhttps://github.com/geosolutions-it/MapStore/blob/master/mapcomposer/app/static/externals/PrintPreview/lib/GeoExt.ux/PrintPreview.js#L537\r\n\r\nThese should be replaced with something like : \r\n\r\n```javascript\r\n         if(currentLayout.indexOf('_2_pages_compact_legend') > 0){\r\n            var index = currentLayout.indexOf('_2_pages_compact_legend');\r\n            currentLayout = currentLayout.substr(0,index);\r\n        } else if(currentLayout.indexOf('_compact_legend') > 0){\r\n            var index = currentLayout.indexOf('_compact_legend');\r\n            currentLayout = currentLayout.substr(0,index);\r\n        } else if(currentLayout.indexOf('_2_pages_legend') > 0){\r\n            var index = currentLayout.indexOf('_2_pages_legend');\r\n            currentLayout = currentLayout.substr(0,index);\r\n        }\r\n\r\n```"},"comment":{"url":"https://api.github.com/repos/geosolutions-it/MapStore/issues/comments/146812384","html_url":"https://github.com/geosolutions-it/MapStore/issues/740#issuecomment-146812384","issue_url":"https://api.github.com/repos/geosolutions-it/MapStore/issues/740","id":146812384,"user":{"login":"Gnafu","id":3932165,"avatar_url":"https://avatars.githubusercontent.com/u/3932165?v=3","gravatar_id":"","url":"https://api.github.com/users/Gnafu","html_url":"https://github.com/Gnafu","followers_url":"https://api.github.com/users/Gnafu/followers","following_url":"https://api.github.com/users/Gnafu/following{/other_user}","gists_url":"https://api.github.com/users/Gnafu/gists{/gist_id}","starred_url":"https://api.github.com/users/Gnafu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gnafu/subscriptions","organizations_url":"https://api.github.com/users/Gnafu/orgs","repos_url":"https://api.github.com/users/Gnafu/repos","events_url":"https://api.github.com/users/Gnafu/events{/privacy}","received_events_url":"https://api.github.com/users/Gnafu/received_events","type":"User","site_admin":false},"created_at":"2015-10-09T09:33:14Z","updated_at":"2015-10-09T09:33:14Z","body":"This issues is still open because the fix ( https://github.com/geosolutions-it/MapStore/commit/6e0f967bbd5669b13be221cfe546608155c292b8 ) must be ported on the master branch"}}