Hello,
I like the explorer theme, but find that though I have created categories and added them to the root category CategoryRoot that they remain categorized as CategoryOrphaned. Also I see that the Category CategoryOrphaned itself is categorized as CategoryOphaned even though it has a link to CategoryRoot. Any idea what I have done wrong? -- JamesCurry 2008-02-14 17:47:41
Hello James. Please tell me which Moin version do you use and which version of the Explorer theme. What are the contents of the CategoryRoot and CategoryOrphaned page? You may also attach a screenshot. This may help me figuring out your problem. -- WolfgangFischer 2008-02-19 13:05:17
I am using Moin 1.6.1, and version 2.0.4 of the Explorer theme. The contents of CategoryRoot are simply CategoryCategory, and the contents of CategoryOrphaned are CategoryRoot. Here's a screen shot. Thanks for your help. -- JamesCurry 2008-02-19 16:57:57
Please try the following: Browse to the Orphaned category and click on the refresh button on the toolbar. This recalculates the page's categorization (generally this should not be necessary as the wiki tree is kept permanently up to date). Does the Orphaned page is still a sub node of itself? If so please provide the relevant settings of your wikiconfig.py (those starting with wiki_tree and the page_category_regex). -- WolfgangFischer 2008-02-20 09:31:09
I tried the refresh, but no joy. The Orphaned page is still a sub node of itself. Below are my settings in my wikiconfig.py. -- JamesCurry 2008-02-20 16:13:13
page_category_regex = u'^Category([A-Z].*)' page_dict_regex = u'[a-z]Dict$' page_form_regex = u'[a-z]Form$' page_group_regex = u'[a-z]Group$' page_template_regex = u'[a-z]Template$' # Content options --------------------------------------------------- # Show users hostnames in RecentChanges show_hosts = 1 # Enable graphical charts, requires gdchart. #chart_options = {'width': 600, 'height': 300} # Explorer Theme Settings wiki_tree_root = u'CategoryRoot' wiki_tree_orphaned = u'CategoryOrphaned' wiki_tree_missing = u'CategoryMissing' wiki_tree_underlay = u'CategoryUnderlay' explorer_site_mode = False explorer_page_header = True explorer_attachments = False
- The settings are correct. I couldn't reproduce the bug. Please help me figuring out the problem by doing an additional test:
Go to the \wiki\data\pages\CategoryOrphaned\cache sub folder in your installation folder. Remove the file named categories (it is just a cache file, it will be rebuild in the next step).
Restart your wiki and browse to the Orphaned category.
Does it still contain itself as a sub node? If so, please attach the new built categories file to this page, so that I can analyze it.
-- WolfgangFischer 2008-02-22 11:35:42
I removed the cache file and the Orphaned category no longer contains itself as a sub node. I browsed to some of the other pages indicated as Orphaned. They have the CategoryRoot link at the bottom of the page but still are classified as Orphaned. I tried categorizing more of my pages, but they did not move from the Orphaned category to the category that I linked. I checked the categories file again. It is quite small and it appears that is not getting updated. I didn't mention before, but thought I should add to be complete, that this wiki is served by Apache on a Linux box. -- JamesCurry 2008-02-22 16:10:12
Sorry, James, when I asked you before to click on the refresh button in the toolbar I actually meant to click on the Delete Cache button in the Explorer theme's toolbar. It was called refresh button in earlier Explorer theme versions. Unfortunately I didn't explain exactly what I meant. So once more: Please browse to the Orphaned category and click on the Delete Cache button in the toolbar of the Explorer theme (the one that looks like a refresh button in many browsers ). Please tell me if the pages/categories still remain sub nodes of the Orphaned category. -- WolfgangFischer 2008-02-26 12:56:00
This is in fact what I did. I used the button indicated in the image below, but it didn't seem to make a difference. If I go to the directory and remove the categories file then the folder is categorized correctly. I tried this with other wiki pages this morning and found that it worked for them as well. This is pretty laborious. I thought this might only happen for the existing pages, but in fact new pages also are categorized as Orphaned until I delete the cache. -- JamesCurry 2008-02-26 17:52:57
Don't give up, James! Well, I'm not able to reproduce the bug. So I need your help. In a first step please use the attached explorer - categories update debug.py (rename it to explorer.py). The only difference to the released theme is, that it prints ### UPDATE Categories of page (needed): followed by the page name whenever it updates the categories cache of a page. This should happen whenever you hit the Delete Cache button or you modify a page. Please verify if this is the case. It will help me finding the error. -- WolfgangFischer 2008-03-02 07:51:48
Wolfgang, I didn't know where to look for the output of the print statements so I added the lines to open a file right after the two print statements you added to explorer.py. (I saw that you had some debug logging lines but wasn't sure how to use them) I also added the lines to write "Initialize" to the file at the top of the init function. What I found was that when I edit and save a file I get: ### UPDATE Categories of page (needed): , but when I hit the delete cache button all that is added to my debug log is Initialize. -- JamesCurry 2008-03-03 17:20:49
I attached a modified version of the explorer theme (explorer - categories update debug.py). The print output should be displayed at the console window that started moin.py. Please verify if now the Delete Cache action results in updating the categories file. -- WolfgangFischer 2008-03-04 13:01:48
I tried the new version but the delete cache button still does not trigger a cache update. Editing a file does trigger an update, but the links are not updated. I found that parseCategories returns here:
if request.parsePageLinks_running.get(pagename, False): #logging.debug("avoid recursion for page %r" % pagename) return [] # avoid recursion
By the way, I tried the explorer theme on my standalone moin running on my Windows machine and it works fine. This update problem seems only to occur on my moin served by apache using cgi. -- JamesCurry 2008-03-04 17:25:25
I modified the attached explorer theme plugin (explorer - categories update debug.py) to not check for recursion when parsing the pages. As the special CategoriesFormatter doesn't execute macros, recursions aren't possible anyway (the check was copied from the parsePageLinks function on which parseCategories is based). Please check once more if the pages are categorized well now. Then I will include this change in an upcoming release. -- WolfgangFischer 2008-03-10 14:05:01
Thanks Wolfgang! That did the trick. -- JamesCurry 2008-03-10 15:37:44
The bug is fixed in release 2.1. Thank you very much, James, for helping me figuring out the problem. Please continue posting feedback which helps a lot improving the theme. -- WolfgangFischer 2008-03-11 12:31:27