{"action":"created","issue":{"url":"https://api.github.com/repos/WordPress/gutenberg/issues/4935","repository_url":"https://api.github.com/repos/WordPress/gutenberg","labels_url":"https://api.github.com/repos/WordPress/gutenberg/issues/4935/labels{/name}","comments_url":"https://api.github.com/repos/WordPress/gutenberg/issues/4935/comments","events_url":"https://api.github.com/repos/WordPress/gutenberg/issues/4935/events","html_url":"https://github.com/WordPress/gutenberg/issues/4935","id":295219877,"number":4935,"title":"Publish and Update Fail on invalid JSON due to other plugin PHP notice","user":{"login":"gd-jroberts","id":18486187,"avatar_url":"https://avatars2.githubusercontent.com/u/18486187?v=4","gravatar_id":"","url":"https://api.github.com/users/gd-jroberts","html_url":"https://github.com/gd-jroberts","followers_url":"https://api.github.com/users/gd-jroberts/followers","following_url":"https://api.github.com/users/gd-jroberts/following{/other_user}","gists_url":"https://api.github.com/users/gd-jroberts/gists{/gist_id}","starred_url":"https://api.github.com/users/gd-jroberts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gd-jroberts/subscriptions","organizations_url":"https://api.github.com/users/gd-jroberts/orgs","repos_url":"https://api.github.com/users/gd-jroberts/repos","events_url":"https://api.github.com/users/gd-jroberts/events{/privacy}","received_events_url":"https://api.github.com/users/gd-jroberts/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-02-07T17:12:10Z","updated_at":"2018-02-07T22:00:11Z","closed_at":null,"author_association":"NONE","body":"<!--\r\nBEFORE POSTING YOUR ISSUE:\r\n- These comments won't show up when you submit the issue.\r\n- Try to add as much detail as possible. Be specific!\r\n- Please add the version of Gutenberg you are using in the description.\r\n- If you're requesting a new feature, explain why you'd like it to be added.\r\n- Search this repository for issues and pull requests and whether it has been fixed or reported already.\r\n- Ensure you are using the latest code before logging bugs.\r\n- Disable all plugins to ensure it's not a plugin conflict issue.\r\n- To report a security issue, please visit the WordPress HackerOne program: https://hackerone.com/wordpress.\r\n-->\r\n\r\n## Issue Overview\r\nI've installed Gutenberg 2.1.0 on WordPress 4.9.4 (PHP 5.6) and cannot publish or update a page because another plugin is writing output that is prepended to the json object.\r\n\r\n## Steps to Reproduce (for bugs)\r\n<!-- Provide a link to a live example, or an unambiguous set of steps to -->\r\n<!-- reproduce this bug. Include code to reproduce, if relevant -->\r\n1. Install and activate Gutenberg 2.1.0 on a new WordPress 4.9.4\r\n2. Install and activate https://wordpress.org/plugins/members/ latest version.\r\n3. Create a new page using Gutenberg editor and attempt to update/publish.\r\n4. Turn debug on.\r\n<!-- Provide what browser you are using and any other specifics to your setup -->\r\n\r\n## Expected Behavior\r\n<!-- If you're describing a bug, tell us what should happen -->\r\n<!-- If you're suggesting a change/improvement, tell us how it should work -->\r\nREST API should return a JSON object that allows the plugin to complete the save operation.\r\n\r\n## Current Behavior\r\n<!-- If describing a bug, tell us what happens instead of the expected behavior -->\r\n<!-- If suggesting a change/improvement, explain the difference from current behavior -->\r\nA PHP notice from the members plugin is prepended to the json object, which causes the save to fail:\r\n\r\n```\r\n<br />\r\n<b>Notice</b>:  Trying to get property of non-object in <b>xxxxxxxxxxxxxxxx/plugins/members/inc/template.php</b> on line <b>95</b><br />\r\n{\"id\":191,\"date\":\"2018-02-07T10:46:29\",\"date_gmt\":\"2018-02-07T16:46:29\",\"guid\":{\"rendered\":\"http:\\/\\/xxxxxxxxx.xxxxxx.xxx\\/?page_id=191\",\"raw\":\"http:\\/\\/xxxxxxxxx.xxxxxx.xxx\\/?page_id=191\"},\"modified\":\"2018-02-07T11:01:42\",\"modified_gmt\":\"2018-02-07T17:01:42\",\"password\":\"\",\"slug\":\"test\",\"status\":\"publish\",\"type\":\"page\",\"link\":\"http:\\/\\/xxxxxxxxx.xxxxxx.xxx\\/test\\/\",\"title\":{\"raw\":\"Test\",\"rendered\":\"Test\"},\"content\":{\"raw\":\"\",\"rendered\":\"\",\"protected\":false},\"excerpt\":{\"raw\":\"\",\"rendered\":\"\",\"protected\":false},\"author\":10,\"featured_media\":0,\"parent\":0,\"menu_order\":0,\"comment_status\":\"closed\",\"ping_status\":\"closed\",\"template\":\"\",\"meta\":[],\"revisions\":{\"count\":1,\"last_id\":192},\"_links\":{\"self\":[{\"href\":\"http:\\/\\/xxxxxxxxx.xxxxxx.xxx\\/wp-json\\/wp\\/v2\\/pages\\/191\"}],\"collection\":[{\"href\":\"http:\\/\\/xxxxxxxxx.xxxxxx.xxx\\/wp-json\\/wp\\/v2\\/pages\"}],\"about\":[{\"href\":\"http:\\/\\/xxxxxxxxx.xxxxxx.xxx\\/wp-json\\/wp\\/v2\\/types\\/page\"}],\"author\":[{\"embeddable\":true,\"href\":\"http:\\/\\/xxxxxxxxx.xxxxxx.xxx\\/wp-json\\/wp\\/v2\\/users\\/10\"}],\"replies\":[{\"embeddable\":true,\"href\":\"http:\\/\\/xxxxxxxxx.xxxxxx.xxx\\/wp-json\\/wp\\/v2\\/comments?post=191\"}],\"version-history\":[{\"href\":\"http:\\/\\/xxxxxxxxx.xxxxxx.xxx\\/wp-json\\/wp\\/v2\\/pages\\/191\\/revisions\"}],\"wp:attachment\":[{\"href\":\"http:\\/\\/xxxxxxxxx.xxxxxx.xxx\\/wp-json\\/wp\\/v2\\/media?parent=191\"}],\"curies\":[{\"name\":\"wp\",\"href\":\"https:\\/\\/api.w.org\\/{rel}\",\"templated\":true}]}}\r\n```\r\n\r\n## Possible Solution\r\n<!-- Not obligatory, but suggest a fix/reason for the bug, -->\r\n<!-- or ideas how to implement the addition or change -->\r\nHave the developer fix the plugin, or have our developers fix how they are using the plugin.\r\n\r\nKind of hoping you guys can provide a fix because I manage man legacy sites that spew all sorts of PHP notices and warnings all over the cli when debug is turned on. Some come from poorly coded custom themes, others from plugins. I'd expect Gutenberg to be able to overcome this, but it may be unrealistic give the nature of the API call and its expected JSON payload.\r\n\r\n## Screenshots / Video\r\n<!-- Visual records are oxygen for others to understand what you are sharing -->\r\n\r\n## Related Issues and/or PRs\r\n<!-- List related issues or PRs against other branches -->\r\n\r\n## Todos\r\n- [ ] Tests\r\n- [ ] Documentation\r\n"},"comment":{"url":"https://api.github.com/repos/WordPress/gutenberg/issues/comments/363925279","html_url":"https://github.com/WordPress/gutenberg/issues/4935#issuecomment-363925279","issue_url":"https://api.github.com/repos/WordPress/gutenberg/issues/4935","id":363925279,"user":{"login":"bobbingwide","id":2474435,"avatar_url":"https://avatars2.githubusercontent.com/u/2474435?v=4","gravatar_id":"","url":"https://api.github.com/users/bobbingwide","html_url":"https://github.com/bobbingwide","followers_url":"https://api.github.com/users/bobbingwide/followers","following_url":"https://api.github.com/users/bobbingwide/following{/other_user}","gists_url":"https://api.github.com/users/bobbingwide/gists{/gist_id}","starred_url":"https://api.github.com/users/bobbingwide/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bobbingwide/subscriptions","organizations_url":"https://api.github.com/users/bobbingwide/orgs","repos_url":"https://api.github.com/users/bobbingwide/repos","events_url":"https://api.github.com/users/bobbingwide/events{/privacy}","received_events_url":"https://api.github.com/users/bobbingwide/received_events","type":"User","site_admin":false},"created_at":"2018-02-07T22:00:11Z","updated_at":"2018-02-07T22:00:11Z","author_association":"CONTRIBUTOR","body":"This was discussed today in core-editor but you got there first it seems. See #4936."}}
{"actor":{"display_login":"bobbingwide"}}