WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.5k stars 4.2k forks source link

Error with recent update to Gutenberg - this block has encountered an error and cannot be previewed #49003

Open lmpierce2216 opened 1 year ago

lmpierce2216 commented 1 year ago

Description

I cannot edit any site pages. Each time I try to add or edit a block, I receive the error message "this block has encountered an error and cannot be previewed" and can't do anything with the block. I have used troubleshoot mode with my plugins - starting with only Gutenberg active - the problem still existed until I disabled the Gutenberg plugin then I am able to edit pages, add and edit blocks. Everything worked fine yesterday (03-09-2023).

Step-by-step reproduction instructions

  1. Add new page or Select edit page
  2. Click to add a block or Select a block to edit
  3. Error message comes up instead of the block troubleshooting blocks

Screenshots, screen recording, code snippet

No response

Environment info

Gutenberg version is 15.3.1 WordPress version is 6.1.1. Installed theme is Twenty-Sixteen, which I realize is an older one, but it has always worked without issue with the block editing features.

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

Tropicalista commented 1 year ago

Can you report back the message in console?

lmpierce2216 commented 1 year ago

This is my first time reporting any errors. I don't know what you mean "report back the message in console". I ended up here after following the instructions on the Gutenberg plugin page via WordPress.

On Fri, Mar 10, 2023, 6:32 PM Francesco Pepe @.***> wrote:

Can you report back the message in console?

— Reply to this email directly, view it on GitHub https://github.com/WordPress/gutenberg/issues/49003#issuecomment-1464641187, or unsubscribe https://github.com/notifications/unsubscribe-auth/A6NHJOI7YJL54CU5UJ7V7H3W3O22RANCNFSM6AAAAAAVXADJYA . You are receiving this because you authored the thread.Message ID: @.***>

Tropicalista commented 1 year ago

Press f12 and check on Console tab

lmpierce2216 commented 1 year ago

Here is a copy and paste from the console tab when I'm on edit a page and receive the error (while Gutenberg plugin is active):

JQMIGRATE: Migrate is installed, version 3.3.2 index.js:77 Declaring non-string block descriptions is deprecated since version 6.2. i @ index.js:77 index.js:77 wp.data.select( 'core/editor' ).getBlocks is deprecated since version 5.3 and will be removed in version 6.2. Please use wp.data.select( 'core/block-editor' ).getBlocks instead. i @ index.js:77 index.js:77 wp.nux is deprecated since version 5.4 and will be removed in version 6.2. Note: wp.components.Guide can be used to show a user guide. i @ index.js:77 admin-bar-v2.js?ver=12.0-a.1-202310:3 Missing data from PHP (wpNotesArgs). (anonymous) @ admin-bar-v2.js?ver=12.0-a.1-202310:3 /wp-json/wpcom/v2/site-intent?_locale=user:1 Failed to load resource: the server responded with a status of 404 () /wp-json/wpcom/v2/site-intent?_locale=user:1 Failed to load resource: the server responded with a status of 404 () 8react-dom.min.js?ver=18:1 TypeError: Mo(...).getSupportedStyles is not a function at hooks.js:226:7 at f (index.js:84:29) at a (registry.js:123:20) at Object.__unstableMarkListeningStores (registry.js:204:30) at index.js:127:14 at p (index.js:94:22) at index.js:126:4 at $e (index.js:154:34) at Xe (index.js:243:5) at Zr (hooks.js:221:40) ar @ react-dom.min.js?ver=18:1 3DevTools failed to load source map: Could not load content for chrome-extension://fheoggkfdfchfphceeifdbepaooicaho/sourceMap/scripts/iframe_form_check.js.map: System error: net::ERR_BLOCKED_BY_CLIENT DevTools failed to load source map: Could not load content for chrome-extension://fheoggkfdfchfphceeifdbepaooicaho/sourceMap/scripts/iframe_form_detection.js.map: System error: net::ERR_BLOCKED_BY_CLIENT DevTools failed to load source map: Could not load content for https://widgets.wp.com/wpcom-block-editor/wpcom.editor.min.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE DevTools failed to load source map: Could not load content for https://widgets.wp.com/wpcom-block-editor/default.editor.min.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE DevTools failed to load source map: Could not load content for https://kranderson.family/wp-content/plugins/full-site-editing/paragraph-block/dist/paragraph-block.min.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE DevTools failed to load source map: Could not load content for https://kranderson.family/wp-content/plugins/full-site-editing/newspack-blocks/dist/carousel-block-editor.min.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE DevTools failed to load source map: Could not load content for https://kranderson.family/wp-content/plugins/full-site-editing/wpcom-block-editor-nux/dist/wpcom-block-editor-nux.min.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE DevTools failed to load source map: Could not load content for https://kranderson.family/wp-content/plugins/full-site-editing/wpcom-documentation-links/dist/wpcom-documentation-links.min.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE DevTools failed to load source map: Could not load content for https://kranderson.family/wp-content/plugins/full-site-editing/event-countdown-block/dist/event-countdown-block.min.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE DevTools failed to load source map: Could not load content for https://kranderson.family/wp-content/plugins/full-site-editing/block-inserter-modifications/dist/contextual-tips.min.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE DevTools failed to load source map: Could not load content for https://kranderson.family/wp-content/plugins/full-site-editing/help-center/dist/help-center.min.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE DevTools failed to load source map: Could not load content for https://kranderson.family/wp-content/plugins/full-site-editing/jetpack-timeline/dist/jetpack-timeline.min.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE DevTools failed to load source map: Could not load content for https://kranderson.family/wp-content/plugins/full-site-editing/common/dist/disable-heic-images.min.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE DevTools failed to load source map: Could not load content for https://kranderson.family/wp-content/plugins/full-site-editing/wpcom-block-description-links/dist/wpcom-block-description-links.min.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE DevTools failed to load source map: Could not load content for https://kranderson.family/wp-content/plugins/full-site-editing/newspack-blocks/dist/blog-posts-block-editor.min.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE DevTools failed to load source map: Could not load content for https://kranderson.family/wp-content/plugins/full-site-editing/whats-new/dist/whats-new.min.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE DevTools failed to load source map: Could not load content for https://kranderson.family/wp-content/plugins/full-site-editing/common/dist/common.min.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE DevTools failed to load source map: Could not load content for https://kranderson.family/wp-content/plugins/full-site-editing/tags-education/dist/tags-education.min.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE DevTools failed to load source map: Could not load content for https://kranderson.family/wp-content/plugins/full-site-editing/wpcom-block-editor-nav-sidebar/dist/wpcom-block-editor-nav-sidebar.min.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE DevTools failed to load source map: Could not load content for https://kranderson.family/wp-content/plugins/full-site-editing/common/dist/data-stores.min.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE DevTools failed to load source map: Could not load content for https://kranderson.family/wp-content/plugins/full-site-editing/starter-page-templates/dist/starter-page-templates.min.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE

talldan commented 1 year ago

@lmpierce2216 Could you use the Copy All Blocks option and paste the content in a comment here? Screen Shot 2023-03-14 at 2 11 23 pm

That should help us know which blocks are having issues.

lmpierce2216 commented 1 year ago

Here's the requested copy all blocks:

<!-- wp:paragraph -->
<p></p>
<!-- /wp:paragraph -->

<!-- wp:jetpack/tiled-gallery /-->

<!-- wp:columns -->
<div class="wp-block-columns"></div>
<!-- /wp:columns -->

<!-- wp:image -->
<figure class="wp-block-image"><img alt=""/></figure>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p></p>
<!-- /wp:paragraph -->

<!-- wp:audio /-->

<!-- wp:spacer -->
<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>
<!-- /wp:spacer -->

The issue exists with any block I select. But the issue goes away if I disable the Gutenberg plugin and simply use WordPress. Also I noted today when I activated the Gutenberg plugin to get this copy - when I open the see all blocks side panel only a few of the blocks appear - only the Text and Media blocks. I will paste a screenshot of that here for you as well.

add a block side panel 1 add a block side panel 2

lmpierce2216 commented 1 year ago

Looks like the first paste of copy all blocks didn't work. I'll try again.

<!-- wp:paragraph -->
<p></p>
<!-- /wp:paragraph -->

<!-- wp:jetpack/tiled-gallery /-->

<!-- wp:columns -->
<div class="wp-block-columns"></div>
<!-- /wp:columns -->

<!-- wp:image -->
<figure class="wp-block-image"><img alt=""/></figure>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p></p>
<!-- /wp:paragraph -->

<!-- wp:audio /-->

<!-- wp:spacer -->
<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>
<!-- /wp:spacer -->

And here's a text file in case the paste doesn't work again: copy all blocks.docx

talldan commented 1 year ago

@lmpierce2216 All good, you just have to use code blocks for the post content, otherwise github tries to display it as HTML.

I've edited your first comment to fix it.

yankazimirchick commented 1 year ago

There was such a problem when switching to wp 6.2 version. The problem was with the theme.json file. Deleting the file or fixing it helped.