This is version . It is not the current version, and thus it cannot be edited.
[Back to current version]   [Restore this version]
TitleReading of Variable not working for older versions
Date17-Jun-2005 09:42:22 EEST
Bug criticalityMediumBug
Browser versionIE
Bug statusNewBug
PageProvider usedVersioningFileProvider
Servlet ContainerTomcat
Operating SystemWin2000
Java version

Retrieving a variable of an older version doesnt work anymore. This feature was still working in 2.1.103.

<wiki:HistoryIterator id="currentPage">

  <wiki:Variable var='versionLabel' default=" "/> 


See also VersionLabel --DF

Here's a workaround which seems to solve the problem. Apparently the wiki metadata of a page only gets initialised by a call to textToHTML. Obviously, this is not done as you iterate over different versions of a page. Below you find the additional java in the jsp which does the trick. -- DF

          <wiki:HistoryIterator id="currentPage">
                   //need to run textToHtml so that variables get initialised again !!
                   WikiContext cc = (WikiContext) c.clone();
                   String pagedata = cc.getEngine().getPureText( currentPage );
                   cc.getEngine().textToHTML( cc, pagedata );                   
                <wiki:Variable var='versionLabel' default=" "/> 

Add new attachment

Only authorized users are allowed to upload new attachments.
« This particular version was published on 19-Jun-2005 10:04 by DirkFrederickx.