-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Phantom Tags #62
Comments
After a long time of investigation i found the problem. (in my case) it's related to a page with two topic-tags {{topic>abc +def}} when reolading (or purging) the page the meta-datas of the listed pages are rebuild. Unfortunately the file /syntax/tag.php has a problem. It mixes all tags of all loaded pages. A workaround is to separate the tagging for each ID. For example you can do this : file wiki/lib/plugins/tag/syntax/tag.phpclass syntax_plugin_tag_tag extends DokuWiki_Syntax_Plugin { //add these lines The hack clears the tag-array whenever another page is loaded. I hope this works for you So9 |
My current workaround is actually to use YoBoy's fork |
I wish I had looked here before figuring out a similar hack So9! The issue is that DW assumes the "render" function of a syntax plugin is stateless in some sense, and because the tag plugin keeps track of old tags in the "$this->tags" variable this isn't true. The proper way to code such a thing (I think) is to simply use the array in the metadata renderer ("$renderer->meta['subject']") instead of a member variable. Probably this code was written while DW's metadata renderer was still evolving (IMO it is still very underdocumented esp. wrt. best practices) and it definitely used to work before, so I don't really blame the developers. However it is an easy fix and certainly less wasteful to just use the existing array instead of making a duplicate. |
Having the same issue here. Which one would be Yoboy's fork? Is it one for DW itself or jsut the tag plugin? |
Could you please try using the metaindex version? It uses DokuWiki's metadata index instead of the tag plugin's own index, you will need to re-index all pages which will happen automatically when you visit them, you can also rebuild the search index manually either using bin/indexer.php or using the searchindex plugin. You can find the metaindex version in the metaindex branch in this repository. |
Sorry for the delay, this was on a production system so I couldn't make the change until recently. I've switched to the meta index version and so far it seems to be working fine. Should I respond here or open a new issue if I come across anything? |
As the metaindex version is now the main/master version, I'm closing this as I assume this is fixed. For other problems please open new issues. |
I am unsure of what exactly is causing this behavior, but pages are being listed as having tags they do not have in the index file. This is causing issues when listing pages by tag using the pagelist plugin.
For example, I can have a page with
{{tag>tag1 tag3}}
and another page with
{{tag>tag2}}
and sometimes
{{topic>tag2}}
will cause both pages to be listed. The index says that both pages have tag2, but the pages do not. Rebuilding the index does not resolve the issue, temporarily or permanently.The text was updated successfully, but these errors were encountered: