none
How to fix the TOC issue RRS feed

Answers

  • Yes, the TOC problem is a bug in the Wiki platform. When you use the [toc] tag, the Wiki automatically creates the Table of Contents from the headings you defined. It creates anchor tag names from the text of the heading, replacing spaces (and periods) with underscores. For example, a heading in the HTML could become:

    <h2><a name="Delete_the_Database"></a>Delete the Database</h2>

    The anchor tag name in this example, name="Delete_the_Database", is how the TOC can jump to the heading when the entry is selected. The bug happens with the text contains the "0" character. You can replace this with just about anything else. I often replace "0" with "Oh" in the anchor tag name. Also, the anchor tag gets repeated each time the article is saved, so I remove the extra anchor tags. Also, if I see any blank headings, I remove those, as they result in extra lines in the TOC. Finally, another potential problem is duplicate anchor tag names. If the TOC has several entries for "Examples", then there will be several anchor tags with the name "Examples". Each of the corresponding entries in the TOC will jump to the first such anchor tag. The fix is to make the anchor tag names unique, which I do by adding a digit. For example:

    <h2><a name="Examples3"></a>Examples</h2>

    The digit "3" in this case will not appear in the text of the heading, or the Table of Contents, but it makes the anchor tag name unique so the TOC works.

    I was working on your second article, but when I clicked "Save" I got a message that you had made changes since I started so I stopped. Working in the HTML is a bit of a challenge. I will check the second article later to see if there are any other HTML problems.


    Richard Mueller - MVP Enterprise Mobility (Identity and Access)

    Thursday, June 2, 2016 2:13 PM
    Moderator

All replies

  • Thank you  Richard Mueller fixing the TOC and thanks for leaving a comment in which i learn that there is bug in TOC, iin anchor tag is last character is 0 then it will not be picked toc. with that i fix my 2nd article.

    once again, thanks alot.


    Please remember to mark your question as answered &Vote helpful,if this solves/helps your problem. ****************************************************************************************** Thanks -WS MCITP(SharePoint 2010, 2013) Blog: http://krossfarm.com

    Thursday, June 2, 2016 1:54 PM
  • Yes, the TOC problem is a bug in the Wiki platform. When you use the [toc] tag, the Wiki automatically creates the Table of Contents from the headings you defined. It creates anchor tag names from the text of the heading, replacing spaces (and periods) with underscores. For example, a heading in the HTML could become:

    <h2><a name="Delete_the_Database"></a>Delete the Database</h2>

    The anchor tag name in this example, name="Delete_the_Database", is how the TOC can jump to the heading when the entry is selected. The bug happens with the text contains the "0" character. You can replace this with just about anything else. I often replace "0" with "Oh" in the anchor tag name. Also, the anchor tag gets repeated each time the article is saved, so I remove the extra anchor tags. Also, if I see any blank headings, I remove those, as they result in extra lines in the TOC. Finally, another potential problem is duplicate anchor tag names. If the TOC has several entries for "Examples", then there will be several anchor tags with the name "Examples". Each of the corresponding entries in the TOC will jump to the first such anchor tag. The fix is to make the anchor tag names unique, which I do by adding a digit. For example:

    <h2><a name="Examples3"></a>Examples</h2>

    The digit "3" in this case will not appear in the text of the heading, or the Table of Contents, but it makes the anchor tag name unique so the TOC works.

    I was working on your second article, but when I clicked "Save" I got a message that you had made changes since I started so I stopped. Working in the HTML is a bit of a challenge. I will check the second article later to see if there are any other HTML problems.


    Richard Mueller - MVP Enterprise Mobility (Identity and Access)

    Thursday, June 2, 2016 2:13 PM
    Moderator
  • Thank you for your help and detail explanation. Yes i was working on that to make sure i understand correctly.

    Thanks Sir!


    Please remember to mark your question as answered &Vote helpful,if this solves/helps your problem. ****************************************************************************************** Thanks -WS MCITP(SharePoint 2010, 2013) Blog: http://krossfarm.com

    Thursday, June 2, 2016 2:21 PM