Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-5617

Original page in PageUpdateEvent/PageRemoveEvent lacks of Space definition

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Obsolete
    • Icon: Medium Medium
    • None
    • None
    • None
    • Mac OS X + Jetty

      NOTE: This bug report is for Confluence Server. Using Confluence Cloud? See the corresponding bug report.

      While writing my plugin, I noticed that a bug got introduced between 2.1 and 2.1.4: Example code:

      public void handleEvent(ConfluenceEvent event) {
      if (event instanceof PageUpdateEvent)

      { Page page = ((PageEvent) event).getPage(); AbstractPage orig = ((PageUpdateEvent) event).getOriginalPage(); this.logger.debug("Page \"" + page.getTitle() + "\" in space \"" + page.getSpaceKey() + "\" updated"); this.logger.debug("Original \"" + orig.getTitle() + "\" in space \"" + orig.getSpaceKey() + "\" updated"); }

      }

      Both the orig.getSpaceKey() and the orig.getSpace() return null, which is kind of useful when listening on page events such as update or remove are intercepted (how do I know if a page was moved from one space to another?).

              Unassigned Unassigned
              32cfef80-620c-49ab-add2-c11df1ea10d4 Deleted Account (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: