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

Can't get properties values from a document's api Object from another wiki

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.2.1, 1.3 M1
    • Fix Version/s: 1.3 M2
    • Component/s: {Unused} APIs
    • Labels:
      None
    • Similar issues:

      Description

      Create a class on the main wiki and a document containing an object of this class and trying to get any value of this object from any wiki except main wiki using :

      #set ($document = $xwiki.getDocument(xwiki:<Document full name>))
      #set ($object = $document.getObject(<ClassName>))
      $object.<field_name>
      

      This will print nothing.

      The problem is that BaseObject does not contains any information about the wiki it was retrieved from even document or class names that are full names and not prefixed full names. So when it trys to get the class to be able to correctly display the field value it can't find the class and display nothing.

        Attachments

          Activity

            People

            • Assignee:
              tmortagne Thomas Mortagne
              Reporter:
              tmortagne Thomas Mortagne
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: