Bug: Version control of attachments always shows latest only
When you attach documents it seems like the revisions are kept but no matter which version you try to view it always shows the latest.
Test case
Open a topic. Attach a file. Attach a new file with the same filename. Now go to manage. You will see two versions. No matter which version you choose to view you get the latest.
Some notes. I have checked that the
RCS lock user is correct.
When you look at the ,v file it grows and grows for each revision. It seems that the revisions are stored but TWiki just does not display them. It always picks the latest version. Other on Freenode IRC have confirmed the bug. This is pretty important feature.
Environment
| TWiki version: |
TWikiRelease01Sep2004 |
| TWiki plugins: |
DefaultPlugin, SpreadSheetPlugin, ActionTrackerPlugin, ChartPlugin, CommentPlugin, DefaultPlugin, EditTablePlugin, EmptyPlugin, InterwikiPlugin, RenderListPlugin, RevisionLinkPlugin, SlideShowPlugin, SmiliesPlugin, SpreadSheetPlugin, TWikiDrawPlugin, TablePlugin |
| Server OS: |
Fedora Core2, kernel 2.6.7 stock |
| Web server: |
Apache 2.0.50 |
| Perl version: |
5.8.3 |
| Client OS: |
XP SP2 |
| Web Browser: |
IE6 |
--
KennethLavrsen - 15 Sep 2004
Follow up
Fix record
Agreed, it's broken. You will note however that it only affects version 1.1; when you try to view this version you get the latest version instead. This is due to some rather crusty code that I should have deleted but didn't.
To patch the problem in your installation, edit
(twiki-main-dir)/lib/TWiki/Attach.pm, and on line 182 change:
if ( $topRev || $rev eq "1.1" ) {
to
if ( $topRev ) {
--
CrawfordCurrie - 15 Sep 2004
I can confirm that now it works. Thanks for a very fast response.
By the way. I edited your answer above. (Store.pm should be Attach.pm)
--
KennethLavrsen - 15 Sep 2004
Thanks, fix is in
SVN now.
--
PeterThoeny - 16 Sep 2004
For people fixing it at home, I added, above, the path to the file. This will speed things up for people like me who find
(twiki-main-dir)/bin/attach first, and get a bit confused that it's less than 180 lines long.
--
RobertEchlin - 09 May 2005