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

Open Beginner friendly
#29 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
70/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
wordpress
Domain
frontend

Research direction

Start at the Post Meta Inspector handling of the pmi_ignore_post_meta_key filter and reproduce the issue by enabling Collaborative Editing, creating a post, and reloading it. Treat the _crdt_document key as the case to verify: the Post Meta Inspector should remain usable without the large value or horizontal overflow, while other post meta continues to display.

Written by the indexing model from the issue text.

Description

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 );

Dominant language
Shell
Stars
48
Forks
18
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Automattic/Post-Meta-Inspector

All issues in Automattic/Post-Meta-Inspector

Similar issues

More Shell/Bash issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.