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

For xObject and xClass, resolution from Name to DocumentReference may happen in a wrong context

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 2.4 M2, 2.3.2
    • 2.2.6, 2.3.1, 2.4 M1
    • {Unused} Core
    • None
    • Unknown

    Description

      Here is a sample use case that goes wrong:

      XWikiDocument xwikiDoc = xwiki.getXWiki().getDocument(new DocumentReference("xwiki", "XWiki", 'LDAPProfileClass'), xcontext.getContext());
      BaseClass bc = xwikiDoc.getXClass();
      

      After the above, the following is not true if the current wiki is not the Main wiki:

      xwikiDoc.getDocumentReference() == bc.getDocumentReference()
      

      Attachments

        Activity

          People

            softec Denis Gervalle
            softec Denis Gervalle
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: