we have a site that used to work and now gives us a blank screen when trying to edit any post. E.g., https://example.com/wp-admin/post.php?post=43&action=edit. On debugging we found that the post.php
response does not contain any directives to download scripts for the editor. E.g.: these directives which are there in another environment (QA) are not there in prod because of which we are just seeing a blank screen:
<script src='https://example.com/wp-admin/js/editor.js?ver=5.6' id='editor-js'></script>
<script src='https://example.com/wp-includes/js/dist/block-editor.js?ver=5f6a75cdc59f1a900e9d4bcfb43bddba' id='wp-block-editor-js'></script>
we verified that if we stick a error_log
in wp-includes/class.wp-dependencies.php 106/451
public function do_items( $handles = false, $group = false ) {
/*
* If nothing is passed, print the queue. If a string is passed,
* print that item. If an array is passed, print those items.
*/
$handles = false === $handles ? $this->queue : (array) $handles;
$this->all_deps( $handles );
error_log("DEBUG: " . json_encode($handles));
we see:
(16-Apr-2021 21:42:07 UTC) DEBUG: ("admin-bar","media-views","imgareaselect","buttons","editor-buttons","wp-edit-post","wp-format-library","twentytwenty-block-editor-styles","wp-block-directory","colors","wp-auth-check","wp-block-library","acf-global","acf-input","select2","acf-datepicker","acf-timepicker","wp-color-picker","acf-input-repeater")
(16-Apr-2021 21:42:07 UTC) DEBUG: ("common","admin-bar","heartbeat","wp-edit-post","wp-format-library","media-editor","media-audiovideo","mce-view","image-edit","editor","quicktags","wplink","jquery-ui-autocomplete","media-upload","twentytwenty-block-editor-script","wp-block-styles","wp-block-directory","utils","svg-painter","wp-auth-check","acf-input","select2","jquery-ui-datepicker","acf-timepicker","wp-color-picker","acf-input-repeater")
(16-Apr-2021 21:42:07 UTC) DEBUG: ("editor-buttons")
(16-Apr-2021 21:42:07 UTC) DEBUG: ("admin-bar","media-views","imgareaselect","buttons","editor-buttons","wp-edit-post","wp-format-library","twentytwenty-block-editor-styles","wp-block-directory","colors","wp-auth-check","wp-block-library","acf-global","acf-input","select2","acf-datepicker","acf-timepicker","wp-color-picker","acf-input-repeater","thickbox")
(16-Apr-2021 21:42:07 UTC) DEBUG: ("common","admin-bar","heartbeat","wp-edit-post","wp-format-library","media-editor","media-audiovideo","mce-view","image-edit","editor","quicktags","wplink","jquery-ui-autocomplete","media-upload","twentytwenty-block-editor-script","wp-block-styles","wp-block-directory","utils","svg-painter","wp-auth-check","acf-input","select2","jquery-ui-datepicker","acf-timepicker","wp-color-picker","acf-input-repeater","thickbox","wp-embed")
we are at our wits end why post.php
response does not include scripts for the editor. There is nothing we have done to the site. It just stopped working. We have tried restarting everything to flush out any caches and there is no error in the logs. Can anybody help?