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

Gutenberg list block says there is an HTML error when <ol start="number"> is used. #17414

Closed
garikaib opened this issue Sep 12, 2019 · 9 comments · Fixed by #17144
Closed

Gutenberg list block says there is an HTML error when <ol start="number"> is used. #17414

garikaib opened this issue Sep 12, 2019 · 9 comments · Fixed by #17144
Labels
[Block] List Affects the List Block [Feature] Block Validation/Deprecation Handling block validation to determine accuracy and deprecation

Comments

@garikaib
Copy link

Describe the bug
Gutenberg list block says there is an HTML error when

    is used.
    To reproduce
    Steps to reproduce the behavior:

    1. Go to 'Gutenberge editor and add a numbered list'
    2. Click on 'Edit HTML' and add the start at number attribute to the list
    3. Now click on block three dots and try to go back to editing visually
    4. Gutenberg throws an error saying HTML is not valid and attempts to convert it unsuccessfully

    Expected behavior
    A list which starts form the desired number appears in visual editor. Generally numbered lists display differently than they would in the front-end anyway. Changing list type doesn't update in editor you keep seeing lists styled as 1,2,3 instead of a,b,c,d although the front end shows the correct format.

    Desktop (please complete the following information):

    • OS: Deepin 15.11
    • Browser Chrome
    • Version 76.0.3809.132

    Additional context
    -Gutenberg Version 6.4.0

@swissspidy swissspidy added [Block] List Affects the List Block [Status] Needs More Info Follow-up required in order to be actionable. labels Sep 12, 2019
@swissspidy
Copy link
Member

Why did you go through editing the HTML? That brings the stored block information out of sync with the actual HTML markup, causing this block invalidation.

Since #15113 / Gutenberg 64. you can edit this right from the block sidebar.

YXv6W6sBZb

Changing list type doesn't update in editor you keep seeing lists styled as 1,2,3 instead of a,b,c,d although the front end shows the correct format.

That sounds like your theme is erroneously overriding some styles.

@swissspidy swissspidy added the [Feature] Block Validation/Deprecation Handling block validation to determine accuracy and deprecation label Sep 12, 2019
@swissspidy
Copy link
Member

Oh, and the currently unsuccessful block conversion should be fixed by #17144

@garikaib
Copy link
Author

Thank you @swissspidy I can see where I can change the start value but there is no drop down to select the ordered list type just the reverse numbering option immediately after that. See attached. I have also contacted Avada the theme devs and hopefully, they can chime in on the ordered list type issue not showing in back end.
DeepinScreenshot_select-area_20190913065205

@ellatrix
Copy link
Member

I think #17144 fixes this issue? It adds the attributes to the block.

@garikaib
Copy link
Author

I can confirm that there is no way to select ordered list type after testing multiple times with the latest version of Gutenberg (version 6.40 found in the Wordpress.org repos). While there is now an option to choose where to start the numbering from there is no option to select list type. I have tested on my sites and even cranked up a local environment in docker using the 10up image and still don't see it.
DeepinScreenshot_select-area_20190916135824
DeepinScreenshot_select-area_20190916135444

@swissspidy
Copy link
Member

@garikaib Turns out that support for the list type was reverted again so yeah, there is currently no option for it.

See #15113 (comment) and #15113 (comment)

@garikaib
Copy link
Author

Yeah, that sucks. So how do I go about adding the HTML attribute without getting the HTML is invalid error? I have an Academic Notes blog and use both ordered and unordered lists a lot.

@swissspidy
Copy link
Member

You can use the existing block filters to extend the list block with such an attribute until support for that is added in Gutenberg.

@youknowriad youknowriad removed the [Status] Needs More Info Follow-up required in order to be actionable. label Oct 1, 2019
@youknowriad
Copy link
Contributor

I'm going to close this as a duplicate of #13888 where adding the type support is tracked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] List Affects the List Block [Feature] Block Validation/Deprecation Handling block validation to determine accuracy and deprecation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants