Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remote Data Blocks do not work in site editor #113

Open
chriszarate opened this issue Sep 26, 2024 · 0 comments
Open

Remote Data Blocks do not work in site editor #113

chriszarate opened this issue Sep 26, 2024 · 0 comments

Comments

@chriszarate
Copy link
Member

Most flows involve editing a post or page directly (edit.php). But it is also possible to edit a page via the Site Editor (site-editor.php).

To replicate, navigate to Appearance > Editor > Pages > Edit, then add a remote data block that requires choosing from a list (e.g., "Conference Event"). You will see a perpetual loading state, because there are no patterns available to render the data.

In the site editor context, loading patterns by block type (wp.data.select('core/block-editor').getPatternsByBlockTypes( /* block type */ )) always returns an empty set. We are therefore unable to load the block's "default" pattern. We rely on the default pattern to display the remote data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant