Title: Nested ordered list gets corrupted
Last modified: February 1, 2021

---

# Nested ordered list gets corrupted

 *  [pawanahluwalia](https://wordpress.org/support/users/pawanahluwalia/)
 * (@pawanahluwalia)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/nested-ordered-list-gets-corrupted/)
 * Hi,
 * Can you please advise what is wrong with the code below:
 * `<ol>`
    `<li>` `<ol>` `<li>item 1a</li>` `<li>item 1b</li>` `<li>item 1c</li>``
   <li>item 1d</li>` `<li>item 1e</li>` `<li>item 1f</li>` `</ol>` `</li>` `<li>``
   <ol>` `<li>item 2a</li>` `<li>item 2b</li>` `<li>item 2c</li>` `<li>item 2d</
   li>` `</ol>` `</li>` `</ol>``
 * This should produce the following result:
 * 1.
    a. item 1a b. item 1b c. item 1c d. item 1d e. item 1e f. item 1f 2. a. item
   2a b. item 2b c. item 2c d. item 2d
 * And it does. However, when I place this on my page and edit the items – like 
   deleting the word “item” from one of the lines, the outer numbering disappears.
   The code gets changed to this:
 * `<ol>`
    `<li style="list-style-type: none;">` `<ol>` `<li>item 1a</li>` `<li>
   item 1b</li>` `<li>1c</li>` `<li>item 1d</li>` `<li>item 1e</li>` `<li>item 1f
   </li>` `</ol>` `<ol>` `<li>item 2a</li>` `<li>item 2b</li>` `<li>item 2c</li>``
   <li>item 2d</li>` `</ol>` `</li>` `</ol>`
 * `<li style="list-style-type: none;">` gets added, producing:
 *  a. item 1a
    b. item 1b c. 1c d. item 1d e. item 1e f. item 1f a. item 2a b. 
   item 2b c. item 2c d. item 2d
 * This happens consistently and can be reproduced even with Advanced Editor Tools(
   previously TinyMCE Advanced) and Classic Editor deactivated, meaning it is not
   an issue related to these plugins.
 * Is this a core WordPress issue? Is there a way to prevent his happening as it
   is quite frustrating.
 * I hope this is the right forum.
 * Thanks for any help
    -  This topic was modified 5 years, 4 months ago by [pawanahluwalia](https://wordpress.org/support/users/pawanahluwalia/).

Viewing 10 replies - 1 through 10 (of 10 total)

 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/nested-ordered-list-gets-corrupted/#post-13993911)
 * You’re using the default block editor and its list block? I’m unable to reproduce
   the issue on my site. Try switching to a default twenty* theme and deactivating
   all plugins. I expect the behavior to go away. Restore your theme and plugins,
   one at a time, until the problem recurs to zero in on the responsible culprit.
 * In fact, it’s pretty weird that any style attribute gets added. That’s normally
   relegated to external or inline CSS. Style attributes are sort of evil because
   it’s impossible to override with other CSS.
 *  Thread Starter [pawanahluwalia](https://wordpress.org/support/users/pawanahluwalia/)
 * (@pawanahluwalia)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/nested-ordered-list-gets-corrupted/#post-13994453)
 * Thank you for your advice. I was not aware that themes and plugins affect the
   back-end page editor. I thought they only affected the front end. Can you please
   confirm this. Thanks!
 *  Thread Starter [pawanahluwalia](https://wordpress.org/support/users/pawanahluwalia/)
 * (@pawanahluwalia)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/nested-ordered-list-gets-corrupted/#post-13998134)
 * I have now tried as you suggested. I have disabled all of my plugins and switched
   the theme to Twenty Twenty-One. The same problem is still happening.
 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/nested-ordered-list-gets-corrupted/#post-13999144)
 * Are you using the Gutenberg plugin or the default editor with no Gutenberg plugin?(
   the plugin is a development version of the default editor)
    WP version 5.6?
 * What I did to try and replicate the behavior: I started a new list block and 
   chose the ordered list option. In code view I replaced the default content with
   your initial HTML example. Back in visual view, I deleted “item ” from 1c. Saved
   the post. There was no added style attribute, I still see a numbered list.
 * Can I do something differently to replicate the issue?
 *  Thread Starter [pawanahluwalia](https://wordpress.org/support/users/pawanahluwalia/)
 * (@pawanahluwalia)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/nested-ordered-list-gets-corrupted/#post-13999399)
 * I deactivated ALL plugins. I do not have the Gutenberg plugin installed. So I
   used whatever editor comes up with this configuration – It says “Classic”.
 * I have created a small video showing the problem. Please see the link below:
 * [https://1drv.ms/v/s!Aisv2-jkZTyIjstF4EcWIEeAZS2glw?e=C2debi](https://1drv.ms/v/s!Aisv2-jkZTyIjstF4EcWIEeAZS2glw?e=C2debi)
 * Sorry for the poor sound quality.
 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/nested-ordered-list-gets-corrupted/#post-14004207)
 * Ah ha! The classic block within the block editor. There I can replicate your 
   experience. It’s a bug. Is there a reason you use the classic block instead of
   the preferred list block? The list block does not exhibit that behavior. Anyway,
   you can raise an issue about the classic block at the [Gutenberg project’s github site](https://github.com/WordPress/gutenberg/issues).(
   free registration required).
 *  Thread Starter [pawanahluwalia](https://wordpress.org/support/users/pawanahluwalia/)
 * (@pawanahluwalia)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/nested-ordered-list-gets-corrupted/#post-14004242)
 * Normally I use “Classic Editor” together with “Advanced Editor Tools (previously
   TinyMCE Advanced)”. But I am guessing the underlying core issue persists even
   with these two plugins installed.
 *  Thread Starter [pawanahluwalia](https://wordpress.org/support/users/pawanahluwalia/)
 * (@pawanahluwalia)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/nested-ordered-list-gets-corrupted/#post-14004267)
 * Could you please explain “classic block” vs “list block”. Is there any settings
   I can change so that this bug doesn’t feed through when using the two plugins
   mentioned above?
 * Thanks!
 *  Thread Starter [pawanahluwalia](https://wordpress.org/support/users/pawanahluwalia/)
 * (@pawanahluwalia)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/nested-ordered-list-gets-corrupted/#post-14004340)
 * After a bit of googling I now understand the differences between “classic block”
   vs “list block”.
 * Nevertheless, is there a setting to remove this issue with my setup or should
   I go ahead and report it as a bug?
 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/nested-ordered-list-gets-corrupted/#post-14008935)
 * There is no setting to suppress the behavior. It’s a flaw in the editor code.
   I suggest reporting the bug as a github issue at the Gutenberg project’s site
   because the problem is in a Gutenberg block. However the flaw is likely within
   the TinyMCE editor itself and I don’t know how much influence the Gutenberg devs
   have over that. But at least the issue would be documented somewhere so it can
   be tracked.

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘Nested ordered list gets corrupted’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 10 replies
 * 2 participants
 * Last reply from: [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * Last activity: [5 years, 4 months ago](https://wordpress.org/support/topic/nested-ordered-list-gets-corrupted/#post-14008935)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
