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

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 1.3 M2
    • 1.2.1, 1.3 M1
    • {Unused} APIs
    • None

    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

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

            Dates

              Created:
              Updated:
              Resolved: