Skip to content

WordPress 7.0's _crdt_document post meta key visually breaks the Meta Box UI #29

@hrkhal

Description

@hrkhal

Issue:

WordPress 6.9/7.0 introduces the _crdt_document post_meta key to store the state of collaborative editing.

https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/post.php#L8679

This is a massive string that visually breaks the UI of the Post Meta Inspector. It appears no values have rendered to the end user but in reality there is now a large horizontal scroll to accomadate the value or _crdt_document. See screenshots below and attached .txt document for the value. Unrelated, but it also creates noticeable lag when streaming the value through vip-cli.

Image Image

_crdt_document.txt

Given that this value is for underlying core functionality and offers little to no use to administrator or engineers, I propose we hide it entirely. It's also adding ~50kb extra to editor pages in my case.

To Replicate:

Replicating is as easy as enabling Collaborative Editing, creating a post, add a title and content, publish/save and then reloading the page and observing that the Post Meta Inspector UI is now broken.

Deleting the post meta via cli, and then reloading the page will restore the UI of the Post Meta Inspector or alternatively keeping the meta but using the below filter also solves:

add_filter( 'pmi_ignore_post_meta_key', fn ( $ignore, $meta_key ) => $meta_key === '_crdt_document' ? true : $ignore, 10, 2 );

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions