Uploaded image for project: 'XWiki Rendering'
  1. XWiki Rendering
  2. XRENDERING-829

A putFootnotes macro in a list item breaks the footnotes of the page

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • 17.10.14, 18.8.0
    • Macro - Footnotes
    • None
    • Unknown

    Description

      When the putFootnotes macro is placed in a list item or a table cell, it fails with "The [putFootnotes] macro is a standalone macro and it cannot be used inline.", and the footnotes of the whole page break with it: since the page has a putFootnotes macro, the footnote macro does not add the list of footnotes at the end of the page, and the text of each footnote is rendered inside the sentence, with no number and no link.

      Steps to reproduce

      1. Edit a page in the wiki editor with this content:
        A{{footnote}}N1{{/footnote}}.
        
        * one
        * {{putFootnotes/}}
        
      2. View the page.
      • Expected: a footnote number after "A" and the list of footnotes, either where putFootnotes is or at the end of the page.
      • Actual: "AN1.", the footnote text glued to the sentence, then the standalone error in the list.

      The fix is in FootnoteMacro.java and PutFootnotesMacro.java: a putFootnotes macro that fails should not prevent the footnotes from being listed, for example by adding them at the end of the page as when there is no putFootnotes macro. XWIKI-23501 covers the standalone error itself.

      KOs covered

      Macro Criterion Problem
      putFootnotes E3 nesting In a list item or a table cell the macro fails with the standalone error, and the footnotes of the page break too: none is listed at the end and their text is glued to the sentence.

      Impact found on macro fluidity

      This KO comes from the WYSIWYG usability audit of the macros, under the criterion E3 nesting of its usability criteria. The page of the macro, linked in the table, has the full notes and the steps to reproduce.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              Lucas C Charpentier Lucas
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: