Skip to content

getPersistedCRDTDoc fails when record meta is not defined #76600

@albanyacademy

Description

@albanyacademy

Description

Had an old menu saved and was beta testing 7.0, noticed this error crop up when loading a page in the editor:

Uncaught (in promise) TypeError: can't access property "_crdt_document", s.meta is undefined

The problem is that the requested menu entity record does not have a "meta" key.

Line in question is here:

record?.meta?.[ POST_META_KEY_FOR_CRDT_DOC_PERSISTENCE ] ||

I'm out of the loop on the CRDT stuff in general so I can't recommend anything.

Step-by-step reproduction instructions

  1. create and save a menu on wordpress version 6.8 or thereabouts (what i'm upgrading from)
  2. upgrade to wp 7.0
  3. load page with menu in it
  4. observe inspector console throw an error matching the above

Screenshots, screen recording, code snippet

Image

Environment info

upgrading from wp 6.8 to 7.0
tested with gutenberg plugin and without

Please confirm that you have searched existing issues in the repo.

  • Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

  • Yes

Please confirm which theme type you used for testing.

  • Block
  • Classic
  • Hybrid (e.g. classic with theme.json)
  • Not sure

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Type] BugAn existing feature does not function as intended

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions