{"action":"closed","issue":{"url":"https://api.github.com/repos/plone/plone.app.mosaic/issues/232","repository_url":"https://api.github.com/repos/plone/plone.app.mosaic","labels_url":"https://api.github.com/repos/plone/plone.app.mosaic/issues/232/labels{/name}","comments_url":"https://api.github.com/repos/plone/plone.app.mosaic/issues/232/comments","events_url":"https://api.github.com/repos/plone/plone.app.mosaic/issues/232/events","html_url":"https://github.com/plone/plone.app.mosaic/issues/232","id":170823454,"number":232,"title":"Problem to create a new tile based on 'rawhtml'","user":{"login":"rristow","id":1841627,"avatar_url":"https://avatars.githubusercontent.com/u/1841627?v=3","gravatar_id":"","url":"https://api.github.com/users/rristow","html_url":"https://github.com/rristow","followers_url":"https://api.github.com/users/rristow/followers","following_url":"https://api.github.com/users/rristow/following{/other_user}","gists_url":"https://api.github.com/users/rristow/gists{/gist_id}","starred_url":"https://api.github.com/users/rristow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rristow/subscriptions","organizations_url":"https://api.github.com/users/rristow/orgs","repos_url":"https://api.github.com/users/rristow/repos","events_url":"https://api.github.com/users/rristow/events{/privacy}","received_events_url":"https://api.github.com/users/rristow/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/plone/plone.app.mosaic/milestones/11","html_url":"https://github.com/plone/plone.app.mosaic/milestones/Mephisto%20Sprint%202016","labels_url":"https://api.github.com/repos/plone/plone.app.mosaic/milestones/11/labels","id":1815873,"number":11,"title":"Mephisto Sprint 2016","description":"Tasks for the Mephisto Sprint from 05.09 - 09.09.2016 in Leipzig / Germany:\r\nsee http://www.coactivate.org/projects/plone-mephisto-sprint-2016/project-home","creator":{"login":"MrTango","id":1113628,"avatar_url":"https://avatars.githubusercontent.com/u/1113628?v=3","gravatar_id":"","url":"https://api.github.com/users/MrTango","html_url":"https://github.com/MrTango","followers_url":"https://api.github.com/users/MrTango/followers","following_url":"https://api.github.com/users/MrTango/following{/other_user}","gists_url":"https://api.github.com/users/MrTango/gists{/gist_id}","starred_url":"https://api.github.com/users/MrTango/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MrTango/subscriptions","organizations_url":"https://api.github.com/users/MrTango/orgs","repos_url":"https://api.github.com/users/MrTango/repos","events_url":"https://api.github.com/users/MrTango/events{/privacy}","received_events_url":"https://api.github.com/users/MrTango/received_events","type":"User","site_admin":false},"open_issues":18,"closed_issues":14,"state":"open","created_at":"2016-06-08T15:04:10Z","updated_at":"2016-09-08T11:45:46Z","due_on":"2016-09-10T22:00:00Z","closed_at":null},"comments":4,"created_at":"2016-08-12T08:33:47Z","updated_at":"2016-09-08T11:45:46Z","closed_at":"2016-09-08T11:45:46Z","body":"I'm tryinng to create a new tile. The tile is inherited from rawhtml (plone.app.standardtiles.rawhtml). Everything worked perfect, I can add my tile and the text editor works.\r\nIf try to edit an existing document however, the editor doesn’t shows up.\r\nThe reason for this behavior is a “hardcoded” check for the tile name in the js:\r\n\r\n```\r\n/home/vagrant/www.fhnw.ch/parts/packages/plone/app/mosaic/browser/static/js/mosaic.tile.js[80]\r\n>>      if(tiletype === 'plone.app.standardtiles.rawhtml'){\r\n\r\n```\r\nThe js must to verify not the name, but the type of the tile registered in the registry.xml\r\n```\r\n    <value key=\"tile_type\">textapp</value>\r\nor\r\n    <value key=\"tile_type\">text</value>\r\n\r\n```\r\n===\r\nAs a ‘workaround’ it was possible to ‘overwrite’ the original code from ‘rawhtml’ with my-code. This is probably also not ok, because I was expecting ‘conflict’ in the configure.zcml (two tiles registered with the same name)\r\n\r\n===\r\n\r\nCODE:\r\n\r\n```\r\n###  Configure.zcml\r\n  <plone:tile\r\n        name=\"fhnw.tiles.wi_020_accordeon\"\r\n<!-- workaournd        name=\"plone.app.standardtiles.rawhtml\" -->\r\n        title=\"WI_020_Accordeon\"\r\n        description=\"\"\r\n        add_permission=\"cmf.ModifyPortalContent\"\r\n        class=\".tiles.AccordeonTile\"\r\n        for=\"*\"\r\n        permission=\"zope2.View\"\r\n        schema=\".tiles.IAccordeonTile\"\r\n        />\r\n\r\n### Tiles.py\r\nclass IAccordeonTile(IRawHTMLTile):\r\n    pass\r\nclass AccordeonTile(RawHTMLTile, HandlebarsMixin):\r\n    pass\r\n\r\n### registry.xml\r\n  <records prefix=\"plone.app.mosaic.app_tiles.wi_020_accordeon\"\r\n           interface=\"plone.app.mosaic.interfaces.ITile\">\r\n<!-- workaround:    <value key=\"name\">plone.app.standardtiles.rawhtml</value> -->\r\n    <value key=\"name\">fhnw.tiles.wi_020_accordeon</value>\r\n    <value key=\"tile_type\">textapp</value>\r\n    <value key=\"read_only\">False</value>\r\n    <value key=\"settings\">False</value>\r\n    <value key=\"favorite\">False</value>\r\n    <value key=\"rich_text\">true</value>\r\n  </records>\r\n\r\n```\r\n"}}
{"actor":{"display_login":"vangheem"}}