I'm trying to set a featured image to some pages using block editor,
So when I press select featured images the upload UI of the media library is not loading its own stylesheet correctly ( but get images and search are working perfectly)
The problem occurs only on some pages ( with the same template!!! )
Ex: I have 2 pages with the same default template.
This is a screenshot of the problem
What I've tried:
define( 'CONCATENATE_SCRIPTS', false );
in wp-config.php
file ( no changes)WP Version: 5.9.1
Any ideas would be appreciated, Thanks.
After some search, the problem was in the pages which contains ACF blocks
ACF plugin is not compatible with the latest WP 5.9.1
temporary fixes until the update has been released :
1- In your functions.php file add these lines:
function acf_fix_preload_path( $preload_paths ) {
global $post;
$rest_path = rest_get_route_for_post( $post );
$remove_path = add_query_arg( 'context', 'edit', $rest_path );
return array_filter(
$preload_paths,
function( $url ) use ( $remove_path ) {
return $url !== $remove_path;
});}
add_filter( 'block_editor_rest_api_preload_paths', 'acf_fix_preload_path', 10, 1 );
Or rollback to the previous version of WordPress like 5.9