NOTE: If you are a developer, please use a private wiki based on foswiki/trunk on a daily base ...or use
trunk.foswiki.org to view this page for some minimal testing.
Use
Item9693 for docu changes for 1.2 and 2.0.
Item2299: edit-save-rename restores an old version
| Priority: |
CurrentState: |
AppliesTo: |
Component: |
WaitingFor: |
| Urgent |
Closed |
Engine |
|
|
- edit a topic
- save it
- rename the topic
- edits gone ... an old version is been restored
Can anybody confirm?
--
MichaelDaum - 27 Oct 2009
Confirmed on trunk
- Create a topic in sandbox & save (-> r1)
- Edit and save (force new version -> r2)
- Edit and save (force new version -> r3)
- Rename (-> r3)
- r3 now shows content from r1 instead of r2.
Unable to replicate on release branch. I have r5389 checked out.
--
PaulHarvey - 29 Oct 2009
Added unit test, also on release branch, even though the problem does not exist there.
Oh, and fixed the bug. Problem was that we:
- Load a dummy topicObject with no content for the new topic
- Move the old topic to the new topic
- Try to use the dumy topic object, thinking it will magically be updated
And just adding a
$to->reload is not enough as there is already a cached version of this dummy topic, therefore
$to->{_loadedRev} exists and is set to revision 1, therefore, it will always use revision 1. Fix by:
- Removing
$to->{_loadedRev}
- Calling
$to->reload
--
OlivierRaginel - 29 Oct 2009