Ran into a new interesting bug:
is very nice in that you can combine it with other plugins that generate tables to then edit the resultant table structure and have the edited result saved into the topic. In other words, the table to be edited may be the result of another TWiki tag, rather than have been loaded from the topic. Examples of this are when the table can be optionally retrieved from somewhere other than the saved topic (e.g., a web site, a data base), but we then want to be able to edit the table and save into the topic. This works very well, almost. However, there is one gotcha.
In order to explain this better, let me review the algorithm this plugin uses when saving:
- if it is determined that a save button was pressed, call processText again in saveMode
- now load the saved text for the topic
- merge the text from the query with the saved text in the topic for the edited table:
- for each row in the saved text, replace its fields with fields passed in from the query
- if there are added rows in the query, add these to the table
- save the topic
The problem occurs if the table in the query is different from the stored table, but there are fields that were formatted as labels. These fields will not be passed to the plugin for update, and consequentially will not be updated in the text. The stored values will be chosen instead.
- 10 Aug 2008