gutenberg icon indicating copy to clipboard operation
gutenberg copied to clipboard

Classic block is broken when used in columns

Open AlexeySvidentsov opened this issue 7 years ago • 5 comments

Describe the bug Its impossible to color Heading through heading block. So i need to use Classic block. But when i use Classic in columns it added correctly but when i refresh dashboard - Editor become unable to edit.

i've got "This block contains unexpected or invalid content." error message

To Reproduce Steps to reproduce the behavior:

  1. Add columns block
  2. Inside column add Classic block and add some content to it
  3. Update post
  4. Refresh page (F5, CTRL + R)

Expected behavior I expected to see Editor that i can edit as usual, and to to convert to html and edit as plain text

Screenshots https://www.screencast.com/t/vcAL42Elccb

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser Chrome
  • Version 70.0.3538.110

Additional context Wordpress 5.0

AlexeySvidentsov avatar Dec 07 '18 10:12 AlexeySvidentsov

Thanks for reporting this issue! It's queued for testing, and in the mean time I thought you might want to check out this plugin which will let you add colors for headings: https://wordpress.org/plugins/advanced-rich-text-tools/

designsimply avatar Dec 07 '18 13:12 designsimply

Thanks for the plugin. For now it can help me!

AlexeySvidentsov avatar Dec 07 '18 13:12 AlexeySvidentsov

I tested adding a classic block inside of a column and was able to replicate the error described.

I followed the steps to reproduce listed by @AlexeySvidentsov

  1. Add columns block
  2. Inside column add Classic block and add some content to it
  3. Update post
  4. Refresh page (F5, CTRL + R)

After which I get the following error: screen shot 2018-12-09 at 12 53 40 pm

I also encountered some further errors in testing that I don't believe would be an issue if the original problem is resolved.

I noticed that the error box has an option to convert the block back to the classic editor when clicking the toggle as shown below: screen shot 2018-12-09 at 12 38 55 pm

This works but changes the column widths in the editor only: screen shot 2018-12-09 at 12 39 02 pm

If you continue to refresh and edit it in this way, the editor removes the second column as well as any content in the column which is visible on the front end. screen shot 2018-12-09 at 12 50 03 pm

Tested in Chrome 70.0.3538.110 macOS Mojave 10.14.1

starxedsteph-zz avatar Dec 09 '18 19:12 starxedsteph-zz

Still present with Gutenberg plugin v 5.0.0. Maybe the JS errors from the console help? The validation of the block fails because there is content in the column.

I set up a new WordPress, no plugins besides Gutenberg, no themes besides Twentynineteen. Same way of reproducing: Creating 2 columns, inserting a Classic Block, Saving, refresh/ switch to Code-Editor and back image

R2116 avatar Feb 09 '19 23:02 R2116

Noting these related issues: #14323, #14025, #13187. Closing this as a duplicate, but keeping #13187 open as it has the most discussion around how to solve the issue

talldan avatar Mar 13 '19 01:03 talldan