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

A listener can break use cases based on metadata dirty flag forced to false

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 15.4-rc-1, 14.10.11
    • 14.10.10
    • Old Core
    • None
    • Unit
    • Unknown
    • N/A
    • N/A

    Description

      There are various use cases which rely on forcing the document metadata dirty flag to false to make sure the store is going to save the document exactly as provided (import, replication, etc.).

      The problem is that any Document*ingEvent listener can break those use cases when modifying the document about to be saved.

      XWiki#saveDocument should make sure to remember the status of the dirty flags before calling the listeners so that it can restore them before calling the actual store.

      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: