Open LukasDrude opened 12 years ago
Please change the line 257 in syntax.php to
$html = $plug->td (cleanID($id)) ;
Michitux discovered that the dir plugin passes the page $id's in an uncleaned version (preceded with a colon) to the tag helper functions.
http://dump.lupo49.de/tmp/dokuwiki/dir_plugin_function_call.png
Thank you for your fast response. Indeed your correction improves the situation. Double entries because of pages added twice (once with colon and once without) do not occur anymore.
Anyhow the file topic.idx is still modified when calling the dir-plugin with the tags-flag. Each call modifies the file a bit (introducing some mistakes) and after several calls (reloading the page), it does not change anymore.
In the short future I will provide an example installation (like a minimal example), which hopefully presents this error.
Thats because of how the tag plugin handles the call of td($id). It requests the tag-related metadata of the passed $id which leads in the end to a refresh of your file.
But you are right, pulling the metadata shouldn't modify your file in a strange way. (Of course, the file would be modified in a proper way, when no tag-related metadata exists or it needs a refresh: http://xref.dokuwiki.org/reference/dokuwiki/nav.html?_functions/p_get_metadata.html)
I was trying to reconstruct the error with a minimal example, but I did not succeed. I will resume, when I managed to reconstruct it.
In the current version of the tag plugin the tag plugin no longer uses a custom tag index but the DokuWiki metadata index and the code has been changed such that pages don't influence each other anymore when they are listed on the same page. Could you please test if this has also fixed your problems?
Versions:
I use the Plugin-dir the following way, if I do not use the "tags"-keyword, the error does not occur:
~~DIR?cols=page;tags;mdate~~
Each refresh of the page containing the above statement modifies the file data/index/topic.idx so that it becomes incorrect. For example pages seem to have tags, which they in fact do not have. Some pages are listed twice within one tag.
To visualize this for a human reader, I modified the "topic.idx" with "sed": cat topic.idx | sed 's/}/\n}\n\n/g' | sed 's/i:/\n i:/g' > topic_nice.idx
I was now able to compare the version after a rebuild with "Tagindex Manager" (here are just parts):
As you can see, the pages "freemind" and "zettelkasten" are now added twice (once with colon and once without). Also all other added entries are not related to the tag "java" in any way.
(If you need further information, please let me know. This is my first issue submission and I was not able to understand the source-code without additional comments.)