Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-1899

The #toc macro requires programming rights for numbering sections

    XMLWordPrintable

Details

    Description

      The bad lines are:

      #set ($context.context.tocNumbered = $numbered)
      #set ($context.context.tocData = $tocData)
      

      The first one is not needed at all, since the context is already updated in com.xpn.xwiki.api.Document.getTOC(). The second line is needed because the XWikiHeading filter that generates headings uses the already generated headings instead of recounting the headers. This can be fixed by using vcontext instead of xcontext as the place to store tocData.

      Attachments

        Activity

          People

            sdumitriu Sergiu Dumitriu
            sdumitriu Sergiu Dumitriu
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: