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

Can't get document from database at plugin init time

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 1.2 M2
    • 1.2 M1, 1.1.2
    • Storage, {Unused} Core
    • None

    Description

      At plugin init time XWiki.database is not initialised so all context.getWiki().getDatabase() will return null in place of the main wiki name as it sould. So actually it's impossible to retrieve a document from database at plugin init time because rights check (that use it to get the name of the main wiki) crash.

      Anyway, to get the main wiki name context.getMainXWiki() should be preferred.

      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: