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

Navigation Block Error: 'This block has encountered an error and cannot be previewed.' #359

Closed
poonam279 opened this issue May 31, 2024 · 2 comments · Fixed by #361
Closed
Assignees
Labels
bug This label could be used to identify issues that are caused by a defect in the product. customer report Indicates the request came from a customer. Priority-Medium Expected resolution time - up to 1 month. small (1-3h) This label is used for issues that can be completed within 3 hours or less.

Comments

@poonam279
Copy link

Description

If the Templates Patterns Collection plugin is active and we add a navigation block, we encounter the following error message:

"This block has encountered an error and cannot be previewed."

Disabling the 'Templates Patterns Collection' plugin allows the navigation block to be added and function correctly.

Step-by-step reproduction instructions

  1. Install and activate the 'Templates Patterns Collection' plugin.
  2. Attempt to add a navigation block to a page or post.
  3. Observe the error message: "This block has encountered an error and cannot be previewed."Collection

Screenshots, screen recording, code snippet or Help Scout ticket

Screencast: https://vertis.d.pr/i/lNmsjb

HS: https://secure.helpscout.net/conversation/2612159636/420613/

Environment info

No response

Is the issue you are reporting a regression

No

@poonam279 poonam279 added the bug This label could be used to identify issues that are caused by a defect in the product. label May 31, 2024
@pirate-bot pirate-bot added the customer report Indicates the request came from a customer. label May 31, 2024
@vytisbulkevicius vytisbulkevicius added the Priority-Medium Expected resolution time - up to 1 month. label Jun 3, 2024
@Soare-Robert-Daniel
Copy link
Contributor

The crash is caused by this import:

import { PluginSidebar, PluginSidebarMoreMenuItem } from '@wordpress/edit-site';

The imported functions are deprecated, and we must switch to @wordpress/editor (Reference: https://github.com/WordPress/gutenberg/blob/06198d157f1c5341b4ce931948422b417564feba/packages/edit-post/src/deprecated.js#L83 )

@Soare-Robert-Daniel Soare-Robert-Daniel added the small (1-3h) This label is used for issues that can be completed within 3 hours or less. label Jun 6, 2024
@Soare-Robert-Daniel Soare-Robert-Daniel linked a pull request Jun 6, 2024 that will close this issue
6 tasks
@poonam279
Copy link
Author

I have tested the PR and it resolved the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This label could be used to identify issues that are caused by a defect in the product. customer report Indicates the request came from a customer. Priority-Medium Expected resolution time - up to 1 month. small (1-3h) This label is used for issues that can be completed within 3 hours or less.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants