Community Win: Fixing the TOC

There is a statistic out there that says for every x lines of code you'll find a bug.
This weeks community win discusses a joint effort to track down a bug and the ways to fix/circumvent it.

How did it get started?
Earlier this week   gave comment on the article How to Automatically Add a Table of Contents (TOC) to Your Wiki Article.

He had trouble on getting the TOC (Table of Contents) right in an article he contributed to (see here).
The first header in the article was not showing in the TOC.

You should know that the TOC is built by the Wiki engine using the headers in the article.
Read more in the article mentioned earlier. 

While checking the article, deep diving into the HTML code, there was no clear reason found for the TOC failure.

Until Richard repaired one of the headers in the article, the first one.

During the TOC troubleshooting, we gathered some information on the actions taken to fix the TOC.
Please find more detailed information here: Tips & Tricks to fix the Wiki article [TOC] (Table of Contents).

With the hints of Richard and some earlier reported issues with the TOC, there was a pattern appearing.
Headers with a trailing 0 were not shown properly.
Meanwhile it has been confirmed by the developers team as an issue in the platform.


How to fix it? Remove any 0 (zero) from the header, in the HTML code.

Besides the zero in the header, the most common reason for the TOC not working, is an HTML tag mismatch.
Check out the Tips & Tricks document for additional hints.

If you still face issues with a TOC in your article, or any other layout issue, let us know.
Post the link of your article in this Wiki page: WIKI MAINTENANCE: Get help to fix your article layout

Comments (3)

  1. Richard has also referred to your article in the Wiki forum. Thanks for writing this up!

  2. Thanks again Peter for your work in solving this. The Wiki article will help people avoid or fix problems.

  3. aw says:

    hai, I just want to tell you that I am just very new to blogs and seriously loved this website. More than likely I’m planning to bookmark your blog post .
    You amazingly come with really good posts. Thanks a lot for sharing your blog Microsoft.

Skip to main content