Skip to content

Navigate to entity record crash editor #64814

@Tropicalista

Description

@Tropicalista

Description

I have a custom post type which I wanna use as a pattern.

If I try something like this, the editor crashes.

	const handleEditForm = () => {
		onNavigateToEntityRecord( {
			postId: ref,
			postType: 'formello',
		} );
	};

The error is:

Uncaught TypeError: Cannot read properties of null (reading 'ownerDocument')
    at apply (rich-text.js?ver=9988fecf32c29c7254e1:2492:18)
    at applyRecord (rich-text.js?ver=9988fecf32c29c7254e1:3709:5)
    at applyFromProps (rich-text.js?ver=9988fecf32c29c7254e1:3806:5)
    at rich-text.js?ver=9988fecf32c29c7254e1:3813:7
    at commitHookEffectListMount (react-dom.development.js:23184:26)
    at commitLayoutEffectOnFiber (react-dom.development.js:23302:17)
    at commitLayoutMountEffects_complete (react-dom.development.js:24722:9)
    at commitLayoutEffects_begin (react-dom.development.js:24708:7)
    at commitLayoutEffects (react-dom.development.js:24646:3)
    at commitRootImpl (react-dom.development.js:26857:5)

Step-by-step reproduction instructions

  1. Create a custom post type (ex. Doc)
  2. Create a new post of custom post type (New doc)
  3. Create a simple block that mimic what patterns do and add function mentioned above
  4. Editor crashes

Screenshots, screen recording, code snippet

No response

Environment info

  • WP 6.6

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

Metadata

Metadata

Labels

[Status] In ProgressTracking issues with work in progress[Type] BugAn existing feature does not function as intended

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions