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

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.6, 2.3.1, 2.4 M1
    • Fix Version/s: 2.4 M2, 2.3.2
    • Component/s: {Unused} Core
    • Labels:
      None
    • Difficulty:
      Unknown
    • Similar issues:

      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

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

              Dates

              Created:
              Updated:
              Resolved: