XWiki Platform
  1. XWiki Platform
  2. XWIKI-8398

Content dirty flag isn't cleared when document is loaded

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.3-milestone-1
    • Fix Version/s: 4.3-rc-1
    • Component/s: Old Core
    • Labels:
      None
    • Difficulty:
      Unknown
    • Documentation:
      N/A
    • Documentation in Release Notes:
      N/A
    • Similar issues:
      XWIKI-778Important problem with the content and metadata dirty status and versioning
      XWIKI-5078Save dirty attachments contents when saving the document
      XWIKI-8464Content dirty flag is spuriously set to true
      XWIKI-9253BaseProperty#setOwnerDocument sets the content as dirty when updating a property
      XWIKI-2800The contentUpdateDate is updated even if there has been nothing changed on the document
      XWIKI-8152Documents Macro shouldn't accept any content
      XWIKI-6885XWikiDocument.clone(true) doesn't clone properly the attachments
      XWIKI-2927Too long loading locks document in non-edit mode in Firefox
      XWIKI-8941The WYSIWYG is not clear about empty macro content
      XWIKI-6694Improve translation document content parsing

      Description

      The flag isContentDirty in XWikiDocument is not cleared when a document is loaded from the database. But just setting is insufficient, because it isn't set when the attachments or the objects are updated (which causes regressions because it is assumed to have been set).

        Issue Links

          Activity

          Hide
          Andreas Jonsson added a comment -

          I had commited a seemingly simple fix, but it caused regressions so I will revert it and commit another larger patch.

          Show
          Andreas Jonsson added a comment - I had commited a seemingly simple fix, but it caused regressions so I will revert it and commit another larger patch.
          Hide
          Thomas Mortagne added a comment -

          There is a lot of commits associated to this issue, shouldn't it be closed ?

          Show
          Thomas Mortagne added a comment - There is a lot of commits associated to this issue, shouldn't it be closed ?
          Hide
          Andreas Jonsson added a comment -

          I have just found and fixed another issue where the dirty flag is spuriously set to true. Although such issues doesn't cause any regressions in the main branch (where the dirty flag used to always be true) they do in feature-authorization-context.

          Also I've noticed that BaseProperty implements Serializable, so I've made som changes to make sure serialization works as it should. The hibernate problem might be related to serialization so I migth be able to remove the hibernate kludge again.

          But I saw that Eduard didn't like to have commits on the same issue across releases, so I'll close this and open a new one.

          Show
          Andreas Jonsson added a comment - I have just found and fixed another issue where the dirty flag is spuriously set to true. Although such issues doesn't cause any regressions in the main branch (where the dirty flag used to always be true) they do in feature-authorization-context. Also I've noticed that BaseProperty implements Serializable, so I've made som changes to make sure serialization works as it should. The hibernate problem might be related to serialization so I migth be able to remove the hibernate kludge again. But I saw that Eduard didn't like to have commits on the same issue across releases, so I'll close this and open a new one.
          Hide
          Vincent Massol added a comment -

          IMO this issue shouldn't be closed as incomplete since it has commits in it...

          Show
          Vincent Massol added a comment - IMO this issue shouldn't be closed as incomplete since it has commits in it...

            People

            • Assignee:
              Andreas Jonsson
              Reporter:
              Andreas Jonsson
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Date of First Response: