{"action":"created","issue":{"url":"https://api.github.com/repos/SitecorePowerShell/Console/issues/1100","repository_url":"https://api.github.com/repos/SitecorePowerShell/Console","labels_url":"https://api.github.com/repos/SitecorePowerShell/Console/issues/1100/labels{/name}","comments_url":"https://api.github.com/repos/SitecorePowerShell/Console/issues/1100/comments","events_url":"https://api.github.com/repos/SitecorePowerShell/Console/issues/1100/events","html_url":"https://github.com/SitecorePowerShell/Console/issues/1100","id":418485711,"node_id":"MDU6SXNzdWU0MTg0ODU3MTE=","number":1100,"title":"Content Editor Ribbon integration for custom tabs","user":{"login":"ozkansayin","id":6330858,"node_id":"MDQ6VXNlcjYzMzA4NTg=","avatar_url":"https://avatars3.githubusercontent.com/u/6330858?v=4","gravatar_id":"","url":"https://api.github.com/users/ozkansayin","html_url":"https://github.com/ozkansayin","followers_url":"https://api.github.com/users/ozkansayin/followers","following_url":"https://api.github.com/users/ozkansayin/following{/other_user}","gists_url":"https://api.github.com/users/ozkansayin/gists{/gist_id}","starred_url":"https://api.github.com/users/ozkansayin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ozkansayin/subscriptions","organizations_url":"https://api.github.com/users/ozkansayin/orgs","repos_url":"https://api.github.com/users/ozkansayin/repos","events_url":"https://api.github.com/users/ozkansayin/events{/privacy}","received_events_url":"https://api.github.com/users/ozkansayin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2019-03-07T19:54:46Z","updated_at":"2019-03-07T20:08:47Z","closed_at":null,"author_association":"NONE","body":"### Expected Behavior\r\n\r\nWhen you have a script under \"$$AnyPowershellModule$$/Content Editor/Ribbon/$$CustomTabLibrary$$/$$CustomChunkLibrary$$\", and click the button \"Sync Library with Content Editor Ribbon\" on ISE under _Settings_ tab - _Integration_ chunk, either the custom tab & chunk should be created properly so that it's visible, or no items in core database should be created.\r\n\r\n### Actual Behavior\r\nLet \r\n\r\n- $stripRoot be \"/sitecore/content/Applications/Content Editor/Ribbons/Strips\"\r\n- $ribbonRoot be \"/sitecore/content/Applications/Content Editor/Ribbons/Ribbons/Default\"\r\n\r\nThe sync script creates the strip, chunk and the buttons under $stripRoot, but does not create a reference under $ribbonRoot, which results in the new tab not being visible. If you have a custom ribbon manually created, with a reference to an existing strip, the reference to that strip gets broken as the script deletes the existing strip, and creates a new one.\r\n\r\n### Steps to Reproduce the Problem\r\n\r\nCreate a script under \"$$AnyPowershellModule$$/Content Editor/Ribbon/$$CustomTabLibrary$$/$$CustomChunkLibrary$$\", and click the button \"Sync Library with Content Editor Ribbon\" on ISE under _Settings_ tab - _Integration_ chunk. The custom tab $$CustomTabLibrary$$ will not be visible, but there will be items created on core database.\r\n\r\n - [x] Tested issue with clean install of Sitecore and the latest available version of SPE.\r\n \r\n - [ ] Asked questions on the Sitecore Slack Chat channel.\r\n \r\n - [ ] Reviewed questions and answers on the Sitecore Stack Exchange."},"comment":{"url":"https://api.github.com/repos/SitecorePowerShell/Console/issues/comments/470675006","html_url":"https://github.com/SitecorePowerShell/Console/issues/1100#issuecomment-470675006","issue_url":"https://api.github.com/repos/SitecorePowerShell/Console/issues/1100","id":470675006,"node_id":"MDEyOklzc3VlQ29tbWVudDQ3MDY3NTAwNg==","user":{"login":"ozkansayin","id":6330858,"node_id":"MDQ6VXNlcjYzMzA4NTg=","avatar_url":"https://avatars3.githubusercontent.com/u/6330858?v=4","gravatar_id":"","url":"https://api.github.com/users/ozkansayin","html_url":"https://github.com/ozkansayin","followers_url":"https://api.github.com/users/ozkansayin/followers","following_url":"https://api.github.com/users/ozkansayin/following{/other_user}","gists_url":"https://api.github.com/users/ozkansayin/gists{/gist_id}","starred_url":"https://api.github.com/users/ozkansayin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ozkansayin/subscriptions","organizations_url":"https://api.github.com/users/ozkansayin/orgs","repos_url":"https://api.github.com/users/ozkansayin/repos","events_url":"https://api.github.com/users/ozkansayin/events{/privacy}","received_events_url":"https://api.github.com/users/ozkansayin/received_events","type":"User","site_admin":false},"created_at":"2019-03-07T20:08:47Z","updated_at":"2019-03-07T20:08:47Z","author_association":"NONE","body":"We have noticed this during the Sitecore Hackathon. As a workaround we have created the ribbon reference & the strip item manually, but since the script removes the strip if there are no chunks under it, the reference got broken.\r\n\r\nI have seen in the [documentation](https://doc.sitecorepowershell.com/modules/integration-points/content-editor) that it reads \"_Choose a name such as Home or Developer (this should match an existing tab name)_\". However, that made us think that creating the strip ourselves would avoid this issue.\r\nOn one of our projects, I have updated the script \"/sitecore/system/Modules/PowerShell/Script Library/SPE/Core/Platform/Internal/Integrations/Content Editor Ribbon\" so that it creates the strip reference as well, and removes the reference if the strip being referenced is removed. However, I'm not sure if this is the desired behavior on your end. Feel free to let me know if this makes sense, and I can create a pull request.\r\n\r\nIf the integration script is not supposed to handle the custom strips, then I would suggest checking if there is a reference to that strip, and not creating strips - chunks - buttons if there is no reference, and preferably log this into console as a warning, something like \"Skipping custom strip $$StripName$$\"."}}
{"actor":{"display_login":"ozkansayin"}}