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

Radeox rendering does not take place with respect to correct document in Blog.Macros

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Minor
    • 1.0 B3
    • None
    • {Unused} Core
    • None

    Description

      Attached images do not show up in Blog.WebHome because the ArticleClass instance fields are not rendered in the appropriate context. A quick hack for users with programming rights consists in modifying Blog.Macros to set the right document before rendering like this where $bentryobj is an ArticleClass instance:

      #set($content=$bentrydoc.display("content", "view", $bentryobj))
      #set($olddoc = $context.context.doc)
      $!context.context.setDoc($bentrydoc.document)$bentrydoc.document.getRenderedContent($content, $context.context)$!context.context.setDoc($olddoc)

      I have to explicitly set $bentrydoc as the document in the context, but this does not seem like good practice. It looks like there is an issue with included and including documents in the rendering api, particularly in radeox rendering, although I have not looked at the other renderers. It seems to me that XWiki object instances should be rendered in the context of their document instance no matter what the XWikiContext happens to be, but I'm not aware of the full implications of changing the code to enforce this, particularly with respect to form handling.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: