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

$doc is wrong when a sheet is applied to a document translation

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.3-milestone-1
    • Fix Version/s: 5.3-milestone-2
    • Component/s: Old Core
    • Labels:
      None
    • Tests:
      Unit
    • Difficulty:
      Medium
    • Documentation:
      N/A
    • Documentation in Release Notes:
      N/A
    • Similar issues:

      Description

      We can apply a sheet to a document translation thanks to XWIKI-8605 but the $doc Velocity variable points to the translated document instead of the default translation and so the objects are not found and the sheet doesn't display the expected information. The workaround is to use:

      #set ($doc = $xwiki.getDocument($doc.documentReference))
      

      in order to get the default translation in the sheet and access the objects (which are shared among document translations but are accessible only from the default translation).

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: