Gutenberg: JS Console error when adding new block

Created on 2 Feb 2018  路  4Comments  路  Source: WordPress/gutenberg

Issue Overview


A console error is thrown when trying to add a new block to the editor or when opening an existing post with certain blocks such as gallery and cover image

Steps to Reproduce (for bugs)


Situation 1

  1. To a clean WordPress install (version 4.9.2) add the Gutenberg plugin (version 2.1.0)
  2. Add a new post
  3. Click on 'Add Block'
  4. The error appears in console

Situation 2

  1. To a clean WordPress install (version 4.9.2) add the Gutenberg plugin (version 2.1.0)
  2. Open the Gutenberg demo post.
  3. The error appears in console.


OS: MacOS High Sierra 10.13.3
Browser: Chrome Versie 63.0.3239.132
WordPress: 4.2.9
Theme: Twentyseventeen 1.4
Gutenberg plugin: 2.1.0

Expected Behavior


Current Behavior


Possible Solution


Screenshots / Video


Screenshot for situation 1
new_post___add_new_post_ _wordpress_test_ _wordpress

Screenshot for situation 2
welcome_to_the_gutenberg_editor___ _wordpress_test_ _wordpress

Related Issues and/or PRs

Todos

  • [ ] Tests
  • [ ] Documentation
[Feature] Block API [Type] Bug

Most helpful comment

@youknowriad this seems to be related to the deprecation API for blocks. We need to make sure that we display errors using console.error only when it was not possible to properly parse the block. Otherwise, we should rather use console.info to inform that we updated HTML code to the latest version.

All 4 comments

I'm seeing this too on my latest pull from master. Started a new post and I get this error every time I click on the inserter:

screen shot 2018-02-02 at 10 41 10

It's weird because it seems to be referencing the button from the demo post...

@youknowriad this seems to be related to the deprecation API for blocks. We need to make sure that we display errors using console.error only when it was not possible to properly parse the block. Otherwise, we should rather use console.info to inform that we updated HTML code to the latest version.

It's weird because it seems to be referencing the button from the demo post...

I think it's referencing to saved reusable blocks.

At least for me it threw gallery error and my only saved block was a gallery. When I deleted it the error stopped appearing.

Closing because I tested with WordPress 4.9.6 and Gutenberg 3.1.1 using Chrome 67.0.3396.87 on macOS 10.13.5 and was unable to see the "Block validation" console error after clicking 'Add block' on a new post or opening the Gutenberg demo post. Please re-open if this problem is still happening for you!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

spocke picture spocke  路  3Comments

jasmussen picture jasmussen  路  3Comments

ellatrix picture ellatrix  路  3Comments

maddisondesigns picture maddisondesigns  路  3Comments

moorscode picture moorscode  路  3Comments