{"action":"created","issue":{"url":"https://api.github.com/repos/ahmadawais/create-guten-block/issues/107","repository_url":"https://api.github.com/repos/ahmadawais/create-guten-block","labels_url":"https://api.github.com/repos/ahmadawais/create-guten-block/issues/107/labels{/name}","comments_url":"https://api.github.com/repos/ahmadawais/create-guten-block/issues/107/comments","events_url":"https://api.github.com/repos/ahmadawais/create-guten-block/issues/107/events","html_url":"https://github.com/ahmadawais/create-guten-block/issues/107","id":383619935,"node_id":"MDU6SXNzdWUzODM2MTk5MzU=","number":107,"title":"Styles not working on latest Wordpress version (beta 5)","user":{"login":"HelaGone","id":5982932,"node_id":"MDQ6VXNlcjU5ODI5MzI=","avatar_url":"https://avatars3.githubusercontent.com/u/5982932?v=4","gravatar_id":"","url":"https://api.github.com/users/HelaGone","html_url":"https://github.com/HelaGone","followers_url":"https://api.github.com/users/HelaGone/followers","following_url":"https://api.github.com/users/HelaGone/following{/other_user}","gists_url":"https://api.github.com/users/HelaGone/gists{/gist_id}","starred_url":"https://api.github.com/users/HelaGone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HelaGone/subscriptions","organizations_url":"https://api.github.com/users/HelaGone/orgs","repos_url":"https://api.github.com/users/HelaGone/repos","events_url":"https://api.github.com/users/HelaGone/events{/privacy}","received_events_url":"https://api.github.com/users/HelaGone/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-11-22T17:31:59Z","updated_at":"2018-11-23T09:51:32Z","closed_at":null,"author_association":"NONE","body":"## Bug Report\r\nI've been testing the latest version of Wordpress (beta 5) but when it comes to test the create-guten-block toolkit with this release, I notice that, in the front-end, the stylesheet isn't loaded and therefore that block styles are not rendered. \r\nI've followed the very same instructions to create a Gutenberg block and also I've tested the example block that comes with it and this behavior persist. \r\nI wonder if it has something to do with the enqueue function or maybe something else. \r\nI've been poking around in the init.php file in order to get this to work with no luck.\r\nHowever, the toolkit works fine with the Gutenberg plugin and it renders the styles for both, editor and front-end\r\n\r\n### Expected Behavior\r\nIt is expected that the toolkit render the styles for both editor and front-end. Just like it does when it is used with gutenberg's plugin. \r\n\r\n### Actual Behavior\r\nThe stylesheet is not loaded in the front-end. Seems like the enqueue function is not working properly.   \r\nThis is how it looks in the editor:\r\n<img width=\"868\" alt=\"screen shot 2018-11-22 at 11 23 17\" src=\"https://user-images.githubusercontent.com/5982932/48916765-3d1af400-ee49-11e8-9bcb-cbcc752f4735.png\">\r\n\r\nAnd this is how it looks in the front-end\r\n<img width=\"788\" alt=\"screen shot 2018-11-22 at 11 23 28\" src=\"https://user-images.githubusercontent.com/5982932/48916782-5328b480-ee49-11e8-92f5-6c34d80c01f7.png\">\r\n\r\nI've verified and double checked the class and the fact that the plugin stylesheet is not loaded in the front-end\r\n<img width=\"442\" alt=\"screen shot 2018-11-22 at 11 27 12\" src=\"https://user-images.githubusercontent.com/5982932/48916871-a995f300-ee49-11e8-9d35-f5d265e86ee6.png\">\r\n\r\n### Steps to Reproduce\r\n\r\nYou only need a fresh installation of the latest release of Wordpress 5.0 beta 5 which can be downloaded from this link: https://wordpress.org/news/2018/11/wordpress-5-0-beta-5/\r\nand create a new block with create-guten-block toolkit.\r\n(Write your steps here:)\r\n\r\n1. Create a block with `npx create-guten-block my-block`\r\n2. Activate the resulting plugin in the plugin's manager\r\n3. Create a new post and insert the new block\r\n4. Save / Publish the post and go to front-ed to see if your block is styled as expected\r\n\r\n1. `node -v`: 8.10.0\r\n2. `npm -v`: 6.4.1\r\n3. `yarn --version` (if you use Yarn):\r\n4. `npm ls cgb-scripts` (if you haven’t ejected): 1.11.1\r\n\r\nThen, specify:\r\n\r\n1. Operating system: Mac OSX High Sierra\r\n\r\n**Possible Solution**\r\n<!--- Only if you have suggestions on a fix for the bug -->\r\n\r\n### Reproducible Demo\r\n\r\nSince I'm working on a local environment, I can't share a Reproducible Demo. \r\n"},"comment":{"url":"https://api.github.com/repos/ahmadawais/create-guten-block/issues/comments/441196142","html_url":"https://github.com/ahmadawais/create-guten-block/issues/107#issuecomment-441196142","issue_url":"https://api.github.com/repos/ahmadawais/create-guten-block/issues/107","id":441196142,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MTE5NjE0Mg==","user":{"login":"mario-neuhold","id":29606929,"node_id":"MDQ6VXNlcjI5NjA2OTI5","avatar_url":"https://avatars3.githubusercontent.com/u/29606929?v=4","gravatar_id":"","url":"https://api.github.com/users/mario-neuhold","html_url":"https://github.com/mario-neuhold","followers_url":"https://api.github.com/users/mario-neuhold/followers","following_url":"https://api.github.com/users/mario-neuhold/following{/other_user}","gists_url":"https://api.github.com/users/mario-neuhold/gists{/gist_id}","starred_url":"https://api.github.com/users/mario-neuhold/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mario-neuhold/subscriptions","organizations_url":"https://api.github.com/users/mario-neuhold/orgs","repos_url":"https://api.github.com/users/mario-neuhold/repos","events_url":"https://api.github.com/users/mario-neuhold/events{/privacy}","received_events_url":"https://api.github.com/users/mario-neuhold/received_events","type":"User","site_admin":false},"created_at":"2018-11-23T09:51:32Z","updated_at":"2018-11-23T09:51:32Z","author_association":"NONE","body":"Changing the dependency from `wp-blocks` to `wp-editor` in the enqueue function should make the css load again:\r\n\r\n```\r\nwp_enqueue_style(\r\n\t'adw_blocks-cgb-style-css', // Handle.\r\n\tplugins_url( 'dist/blocks.style.build.css', dirname( __FILE__ ) ), // Block style CSS.\r\n\tarray( 'wp-editor' ) // Dependency to include the CSS after it.\r\n\t// filemtime( plugin_dir_path( __DIR__ ) . 'dist/blocks.style.build.css' ) // Version: filemtime — Gets file modification time.\r\n);\r\n```\r\nSeems like there were some changes in Gutenberg components that moved dependencies between wp.blocks and wp.editor."}}
{"actor":{"display_login":"mario-neuhold"}}