{"id":484,"date":"2020-04-02T09:14:13","date_gmt":"2020-04-02T14:14:13","guid":{"rendered":"http:\/\/jtkdev.com\/wp\/?p=484"},"modified":"2020-04-02T12:28:45","modified_gmt":"2020-04-02T17:28:45","slug":"updates-to-wp-fixing-the-blank-editor","status":"publish","type":"post","link":"https:\/\/jtkdev.com\/wp\/2020\/04\/02\/updates-to-wp-fixing-the-blank-editor\/","title":{"rendered":"Updates to WP &#8211; fixing the blank editor"},"content":{"rendered":"\n<p>I did the automatic update to <a href=\"https:\/\/wordpress.org\/news\/2020\/03\/adderley\/\">WordPress 5.4<\/a> last night and things got weird. The editor was causing php errors. The browser page appeared blank but turning on developer tools showed there was a pile of stuff including a message to look at <a href=\"https:\/\/wordpress.org\/support\/article\/debugging-in-wordpress\/\">https:\/\/wordpress.org\/support\/article\/debugging-in-wordpress\/<\/a><\/p>\n\n\n\n<p>Time to turn on debugging by adding this bit to wp\/wp-config.php:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/ Enable WP_DEBUG mode\ndefine( 'WP_DEBUG', true );\n\n\/\/ Enable Debug logging to the \/wp-content\/debug.log file\ndefine( 'WP_DEBUG_LOG', true );\n\n\/\/ Enable display of errors and warnings\ndefine( 'WP_DEBUG_DISPLAY', true );\n@ini_set( 'display_errors', 0 );\n\n\/\/ Use dev versions of core JS and CSS files (only needed if you are modifying these core files)\ndefine( 'SCRIPT_DEBUG', true );<\/code><\/pre>\n\n\n\n<p>This revealed several errors and warnings. The primary one was solved by removing an ancient but in theory up to date plug-in for <a href=\"https:\/\/wordpress.org\/plugins\/movabletype-importer\/\">Movable Type and TypePad import<\/a>.<\/p>\n\n\n\n<p>The remaining errors were: <code>register_sidebar was called&nbsp;<strong>incorrectly<\/strong>. No&nbsp;id&nbsp;was set in the arguments array for the \"Sidebar 1\" sidebar. Defaulting to \"sidebar-1\". Manually set the&nbsp;id&nbsp;to \"sidebar-1\" to silence this notice and keep existing sidebar content.<\/code> causing several  <code>Cannot modify header information - headers already sent by (output started at \/home\/taing\/jtkdev.com\/wp\/wp-includes\/functions.php:5167) in \/home\/taing\/jtkdev.com\/wp\/wp-includes\/functions.php on line 6221<\/code><\/p>\n\n\n\n<p>In looking at <code>wp-content\/themes\/classic\/functions.php<\/code> there is very little there. By removing the block below the error messages are gone and the pages seem to display correctly:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>if ( function_exists('register_sidebar') )\n        register_sidebar(array(\n                'before_widget' => '&lt;li id=\"%1$s\" class=\"widget %2$s\">',\n                'after_widget' => '&lt;\/li>',\n                'before_title' => '',\n                'after_title' => '',\n        ));<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>I did the automatic update to WordPress 5.4 last night and things got weird. The editor was causing php errors. The browser page appeared blank but turning on developer tools showed there was a pile of stuff including a message to look at https:\/\/wordpress.org\/support\/article\/debugging-in-wordpress\/ Time to turn on debugging by adding this bit to wp\/wp-config.php: [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-484","post","type-post","status-publish","format-standard","hentry","category-general"],"_links":{"self":[{"href":"https:\/\/jtkdev.com\/wp\/wp-json\/wp\/v2\/posts\/484","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jtkdev.com\/wp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jtkdev.com\/wp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jtkdev.com\/wp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jtkdev.com\/wp\/wp-json\/wp\/v2\/comments?post=484"}],"version-history":[{"count":5,"href":"https:\/\/jtkdev.com\/wp\/wp-json\/wp\/v2\/posts\/484\/revisions"}],"predecessor-version":[{"id":489,"href":"https:\/\/jtkdev.com\/wp\/wp-json\/wp\/v2\/posts\/484\/revisions\/489"}],"wp:attachment":[{"href":"https:\/\/jtkdev.com\/wp\/wp-json\/wp\/v2\/media?parent=484"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jtkdev.com\/wp\/wp-json\/wp\/v2\/categories?post=484"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jtkdev.com\/wp\/wp-json\/wp\/v2\/tags?post=484"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}