You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'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.
Steps to Reproduce (for bugs)
Install and activate Gutenberg 2.1.0 on a new WordPress 4.9.4
Create a new page using Gutenberg editor and attempt to update/publish.
Expected Behavior
REST API should return a JSON object that allows the plugin to complete the save operation.
Current Behavior
A PHP notice from the members plugin is prepended to the json object, which causes the save to fail:
<br />
<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 />
{"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}]}}
Possible Solution
Have the developer fix the plugin, or have our developers fix how they are using the plugin.
Kind of hoping you guys can provide a fix because I manage many 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 given the nature of the API call and its expected JSON payload.
Screenshots / Video
Related Issues and/or PRs
Todos
Tests
Documentation
The text was updated successfully, but these errors were encountered:
Code in members that is breaking because at this point the check returns null.
// Set to `FALSE` to avoid hierarchical checking.
if ( apply_filters( 'members_check_parent_post_permission', $check_parent, $post_id, $user_id ) ) {
$parent_id = get_post( $post_id )->post_parent;
// If the post has a parent, check if the user has permission to view it.
if ( 0 < $parent_id )
$can_view = members_can_user_view_post( $user_id, $parent_id );
}
Issue Overview
I'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.
Steps to Reproduce (for bugs)
Expected Behavior
REST API should return a JSON object that allows the plugin to complete the save operation.
Current Behavior
A PHP notice from the members plugin is prepended to the json object, which causes the save to fail:
Possible Solution
Have the developer fix the plugin, or have our developers fix how they are using the plugin.
Kind of hoping you guys can provide a fix because I manage many 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 given the nature of the API call and its expected JSON payload.
Screenshots / Video
Related Issues and/or PRs
Todos
The text was updated successfully, but these errors were encountered: