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

The asynchronous rendering configuration of a page is ignored when one of its translations is displayed

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • 11.8-rc-1
    • Rendering - Async
    • None
    • Unknown

    Description

      Steps to reproduce

      1. Enable the multilingual mode with the languages en and fr.
      2. Create a page and add an XWiki.DocumentAsyncClass object to it, with asynchronous rendering or caching enabled.
      3. Create a French translation of the page.
      4. View the page with ?language=fr.

      Expected result

      The French content is rendered asynchronously (or its rendering result is cached), as configured for the page.

      Actual result

      The French content is always rendered synchronously and never cached: the asynchronous rendering configuration of a page only applies when its default translation is displayed.

      Cause

      The page view displays the content of $tdoc, the translation matching the current locale. XWikiDocumentContentAsyncParser reads the XWiki.DocumentAsyncClass object from the displayed document, but objects belong to the default translation: a translation document has no objects of its own, so for a translation the parser always returns the default asynchronous properties (no asynchronous rendering, no cache). The configuration should be read from the default translation of the displayed document.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              MichaelHamann Michael Hamann
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: