Bug: Data is passed inconsistently between the rendering functions
TWiki::getRenderedVersion is always called with 2 arguments, text and web. However, it is defined with three arguments, text, web, and meta data.
TWiki::getRenderedVersion in turn calls
TWiki::Plugins::startRenderingHandler passing it the always undefined meta data, instead of the real meta data. Thus plugins never get the correct meta data. (Note that in the Athens version, the documentation in
lib/TWiki/Plugins.pm stated that this function would get the meta data, but this is not any more stated in the Beijing version.)
Either
TWiki::getRenderedVersion should remove the passing of meta data, which actually does not happen, or it should be passed the meta data.
I would prefer the latter, in order to allow plugins access to meta data.
Test case
Environment
| TWiki version: |
Athens, Beijing |
| TWiki plugins: |
|
| Server OS: |
|
| Web server: |
|
| Perl version: |
|
| Client OS: |
|
| Web Browser: |
|
--
ThomasWeigert - 20 Apr 2003
Follow up
The Metadata object is not exposed to the Plugin callback functions, it is meant for internal use only (which can change in the future). Do not use the undocumented meta data in
TWiki::getRenderedVersion.
A future TWiki::Func API will have functions to manipulate meta data. For now, the text in
beforeSaveHandler contains the meta data in the serialized format, e.g. the same format as the raw topic text.
Fix record