• Hi everybody.

    Since the last update of WordPress (5.9.1) I started having some problems with the media-modal in gutenberg blocks pages editor.

    As you can see in the image-screen linked, the media-modal lost all her css and displays wrong. It is un-usable; does anyone has encountered this before? What should it be linked to?

    thank you very much

    • This topic was modified 2 years, 7 months ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Developing with WordPress topic

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Thread Starter leonardodt

    (@leonardodt)

    edit: update acf plugin fixed it.

    If you can’t update here is a code to fix it:

    function acf_filter_rest_api_preload_paths( $preload_paths ) {
        global $post;
        $rest_path    = rest_get_route_for_post( $post );
        $remove_paths = array(
            add_query_arg( 'context', 'edit', $rest_path ),
            sprintf( '%s/autosaves?context=edit', $rest_path ),
        );
    
        return array_filter(
            $preload_paths,
            function( $url ) use ( $remove_paths ) {
                return ! in_array( $url, $remove_paths, true );
            }
        );
    }
    add_filter( 'block_editor_rest_api_preload_paths', 'acf_filter_rest_api_preload_paths', 10, 1 );

    in functions.php

Viewing 1 replies (of 1 total)
  • The topic ‘ACF Gutenberg Blocks: ‘Media upload modal’ goes wrong’ is closed to new replies.