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

WikiCreatingEvent is not part of the observationContext during the wiki initialization of subwiki creation

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • 13.10.5
    • Old Core
    • None
    • Unknown

    Description

      The creation of a subwiki is framed by two events WikiCreatingEvent and WikiCreatedEvent: it's normally possible to detect that we are in the creation of a subwiki by checking if the ObservationContext is in WikiCreatingEvent.
      However, during the creation of a subwiki we're triggering its initialization, which is done in a WikiInitializationJob performed in its own thread, and apparently during that initialization the ObservationContext is empty: we cannot see that we're inside a WikiCreatingEvent.

      The consequence of that is that a listener triggered during the initialization of the wiki cannot skip the execution based on WikiCreatingEvent which can be a problem in some cases.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              surli Simon Urli
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: