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

InnerBlocks edit as HTML option creates invalid content #11438

Closed
virgiliud opened this issue Nov 2, 2018 · 6 comments
Closed

InnerBlocks edit as HTML option creates invalid content #11438

virgiliud opened this issue Nov 2, 2018 · 6 comments
Labels
[Block] Columns Affects the Columns Block [Feature] Nested / Inner Blocks Anything related to the experience of nested/inner blocks inside a larger container, like Group or P [Type] Bug An existing feature does not function as intended

Comments

@virgiliud
Copy link

virgiliud commented Nov 2, 2018

When selecting an innerBlock container, like a single column from the column block, we have the option to "edit as HTML". If you click out of the inner block while editing as HTML it will produce an "unexpected or invalid content" error.

Is the edit as HTML option useful for inner block containers? It seems like it breaks the code.

I'm using Gutenberg version 4.1.1. and Chrome 70.0.3.

Screenshots testing on Columns block:

screen shot 2018-11-02 at 10 28 09 pm
screen shot 2018-11-02 at 10 27 39 pm

@designsimply designsimply added the Needs Testing Needs further testing to be confirmed. label Nov 2, 2018
@designsimply
Copy link
Member

Tested and confirmed that clicking on the white space of the editor page while in "Edit as HTML" mode for a Columns block results in the block becoming invalid with this error: "This block contains unexpected or invalid content." (42s)

Tested using WordPress 4.9.8 and Gutenberg 4.2.0-rc.1 with Firefox 63.0 on macOS 10.13.6.

@designsimply designsimply added [Type] Bug An existing feature does not function as intended [Feature] Nested / Inner Blocks Anything related to the experience of nested/inner blocks inside a larger container, like Group or P [Block] Columns Affects the Columns Block and removed Needs Testing Needs further testing to be confirmed. labels Nov 2, 2018
@iismaellh
Copy link

iismaellh commented Nov 8, 2018

I can reproduce the issue on any blocks with the InnerBlocks component. It will work properly again when you click the undo button after getting the error.

Had to disable the textarea to at least mitigate the issue. I don't really want to edit the html anyway.

scss:

div[data-type="block-namespace/block-name"] {
    textarea.editor-block-list__block-html-textarea {
	pointer-events: none;
    }
}

@websupporter
Copy link

I can confirm this issue. Happens also with the general columns block (the wrapper for the single columns)

@ZebulanStanphill
Copy link
Member

This should be moved out of the "WordPress 5.0.x Follow Ups" milestone since it was resolved before 5.0 thanks to #11785.

@glorya
Copy link

glorya commented Nov 14, 2018

I have the same problem ancd i have this error in Javascript Console:

Block validation: Block validation failed for `core/paragraph` (Object).
Expected:
<p style="text-align:left"></p>
Actual:
<p style="text-align:left"><p style="text-align:justify">

I've edit the text-align for the paragraph and it seems to add anothe parapraph around it

@joxerg
Copy link

joxerg commented Nov 23, 2019

Same problem here, really frustrating, seriously we can't Justify a text??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Columns Affects the Columns Block [Feature] Nested / Inner Blocks Anything related to the experience of nested/inner blocks inside a larger container, like Group or P [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

7 participants