Details
-
Bug
-
Resolution: Cannot Reproduce
-
Major
-
None
-
1.5.2, 1.6.1, 1.7 M1
Description
The contentUpdateDate / contentDirty implementation is completely wrong.
For example, try the following in a document :
#set($sdoc=$xwiki.getDocument("Sandbox.WebHome")) Content already dirty ? $sdoc.getDocument().isContentDirty() $sdoc.save() $xwiki.getDocument("Sandbox.WebHome").date $xwiki.getDocument("Sandbox.WebHome").contentUpdateDate
As we can see, the content is already considered dirty as soon as we retrieved it. Then we save without any change on the document, and the content update is the same as the last modification date.
One of the main reason for this to happen, is that the method XWiki#setFullName does set the contentDirty flag to true. This method (setFullName) is called when retrieving a document.
I don't have a fix for now, since I don't fully understand the implications of changing this, but the current behavior is wrong.
Attachments
Issue Links
- duplicates
-
XWIKI-8398 Content dirty flag isn't cleared when document is loaded
- Closed
- is related to
-
XWIKI-8464 Content dirty flag is spuriously set to true
- Closed