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

The title is sometimes displayed when using xpage=plain even if it wasn't requested

    XMLWordPrintable

Details

    • High
    • Trivial
    • N/A
    • N/A

    Description

      XWIKI-12718 introduced a parameter to output the page title along with its content. The problem is that sometimes the title is displayed even if we don't ask for it.

      The root problem is that the rendercontent.vm defines a "local" $displayTitle variable to "cache" the value of the $request.outputTitle parameter. This variable can be overwritten by mistake when the page content is rendered.

      This can easily be reproduce with the Blog Application. Put this in a page:

      {{blogPostLayoutImage reference="Blog.BlogIntroduction" /}}
      

      and then open that page in view mode with ?xpage=plain. The output should include only the blog post but it actually also includes the page title because the blogPostLayoutImage macro overwrites the $displayTitle variable.

      Attachments

        Issue Links

          Activity

            People

              mflorea Marius Dumitru Florea
              mflorea Marius Dumitru Florea
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: