Extension talk:CategoryTree

Jump to: navigation, search

About this board


1 (2006/2007) - 2 (2008) - 3 (2009) - 4 (2010) - 5 (2011)

By clicking "Add topic", you agree to our Terms of Use and agree to irrevocably release your text under the CC BY-SA 3.0 License and GFDL

force categorytree to update when add new page.

Siggiae (talkcontribs)

I am invoking categorytree with the syntax {{#categorytree:Embryo|mode=pages|showcount|depth=2 etc. When I create a new page and add it to the category Embryo, categorytree will not list the new page. I can close/open the page that invoked categorytree, login again with no effect. If I look directly at the page Category:Embryo the new member page is listed immediately. The only way I can get the {{#categorytree:Embryo etc to update is to resave the page where it occurs. Same behavior if I use the tag syntax.

There must be a better way, I thought this function was dynamic. No obvious warnings of this behavior on the relevant help page or in discussions. Suggestions? (talkcontribs)

I'm also seeing this. shouldn't it populate the tree automaticly? (talkcontribs)

yes it should make the tree grow even tho right not my tree isnt growing

SmartK (talkcontribs)

We would also like to know if there is a "fix" for this. I have noticed that updates of pages and categories are shown in categorytree with a long time difference. Maybe we have to run some kind of job to update the database in the background? I can reproduce this with mediawiki 1.27.0. (talkcontribs)

I confirm the issue too. MW 1.27.1

Dturtill (talkcontribs)

i also have this@Sarise

Reply to "force categorytree to update when add new page."

Expand category tree sidebar to show current page/category

2 (talkcontribs)

Is it possible to automatically expand the sidebar to show the current page the user has navigated to?


Tacsipacsi (talkcontribs)

I think no and won't be. The categories are not in a tree so one can get to the main category from a given subcategory in several, sometimes hundreds of ways. Usually the farer a category from the main category is, the less members it has, so the sidebar could be several times longer than the content itself. Also, what about non-category pages? There may also be pages from which one can't get to the main category choosing strictly one of the parent categories, or don't have categories at all.

Reply to "Expand category tree sidebar to show current page/category" (talkcontribs)

I'd like to make a category tree for a sub-category, but only if the elements are also in another category. Is this possible? Thanks in advance.

Tacsipacsi (talkcontribs)

No, there is currently no option for this.

Reply to "Conditional Trees?"
Christopher.ursich (talkcontribs)

My wiki requires users to log in before seeing any content. CategoryTree in the sidebar, however, does leak category names even to unauthenticated users. Is there a way to prevent that?

Reply to "Hide from sidebar until after login?"

Categorytree showing ghosted page in menu

Mikelagase (talkcontribs)

I am currently running in to an issue where CategoryTree is showing a deleted page. I have tried numerous things like undeleting the page, removing the category, deleting the page again. Even tried adding the undeleted page back to the previous category only to show 2 ghosted items in the menu. When I remove the category for that page, the second one is removed but the first one remains.

It seems to be some type of a bug that I cannot figure out. I tried setting $wgCategoryTreeDisableCache = true but that didn't make any difference. Is there a way through a configuration parameter that I can clear out the entire DB cache and have it regenerated?

Any assistance would be great here

Mikelagase (talkcontribs)

Is there any way to reset the category tree database? I'd like to remove this ghosted item in the menu but need some assistance on how one could go about accomplishing this.

Reply to "Categorytree showing ghosted page in menu"
Paul Hema (talkcontribs)

Moin moin.

The CategoryTree didn't find any subcategories. I hope the following image will show the problem:

While clicking "Erosion durch Wasser" (see the image) the correct pages an the subcategory appears.


Tacsipacsi (talkcontribs)

On which wiki did this occur? Is it persistent (have you tried it again as it told)?

Paul Hema (talkcontribs)


There are no changes when reloaded

Tacsipacsi (talkcontribs)

I meant can you give a URL for debugging?

Paul Hema (talkcontribs)

no sorry. It's under construction yet.

The CategoryTree version is

Paul Hema (talkcontribs)

I have updated the wiki from version 1.24. Maybe there is an old stuff of the previous version?

Tacsipacsi (talkcontribs)

Then please check your browser console. It can usually be accessed with the F12 key and/or Ctrl+Shift+I (if you can't find it, write me what browser you use and I try to find it out).

Tacsipacsi (talkcontribs)

If it's under construction, can't you delete the whole wiki and install the most recent versions with a clean installation?

Paul Hema (talkcontribs)
{"error":{"code":"readapidenied","info":"You need read permission to use this module","docref":"See https://fbs01/MethodenWiki/api.php for API usage"}}

The given link throws a 500 error.

Paul Hema (talkcontribs)

Oops. Here is the cmd answer:

What's wrong?

Tacsipacsi (talkcontribs)

The web error message says that you don't have read permission through the API (while you obviously have through the normal HTML interface). This can be somehow CategoryTree's code error if your wiki's private (i.e. anonymous users can't read pages). It was designed for Wikipedia, where read access is not a problem. The command line error is OK, api.php isn't designed for command line access (it wants to access $_SERVER which I think is an empty array or something like that). For development, you can set $wgShowExceptionDetails = true; in LocalSettings.php (it's not recommended for production use!), although it won't produce any error message in this case, since it's not an error in PHP level.

Paul Hema (talkcontribs)

Ok, it is a private wiki. So it can be a code error in CategoryTree. I think i have to live with this problem.


Tacsipacsi (talkcontribs)

No, the developers should fix it. I reported here.

Reply to "problem while loading data"
Paul Hema (talkcontribs)

Moin moin, wouldn't it be better to write out the abbreviations in the i18n files? It coult used the plural forms. For example the param "categorytree-num-pages" coult be something like {{PLURAL:$1|1 page|$1 pages}}. Or {{PLURAL:$1|1 file|$1 files}} for "categorytree-num-files".

If so, someone coult arrange it?


This comment was hidden by Paul Hema (history)
Reply to "PLURAL in i18n"
JimmyRoxburgh (talkcontribs)

Hi All

I use CategoryTree on every one of my Category pages.

I no longer need the built in MediaWiki Pages and Subcategory lists.

How can I disable these?

JimmyRoxburgh (talkcontribs)

I was able to acheive this using Extension:CSS

{{#css: #mw-subcategories {display: none}  #mw-pages {display: none} }}
Reply to "Category pages - Remove MediaWiki lists"

Customized collapse/expand/empty images broken after update

Rbirmann (talkcontribs)


I am having an issue with this extension after upgrading MW from 1.22 to 1.26. I have also updated my CategoryTree extension from whatever version I had installed a couple of years ago to the latest available version, so I am not sure to which of these upgrades my issue is related.

In our wiki, back in MW 1.22 and the old CT version, we had changed the color of the category tree bullets by changing MediaWiki:categorytree-collapse-bullet, MediaWiki:categorytree-expand-bullet and MediaWiki:categorytree-empty-bullet to something like this:

<span style="color:#ffd15a;">▼</span>

This was working fine, but now, in MW 1.26 with the latest CT version, if I click on a ► bullet to expand the category tree, the clicked bullet is replaced by:

<span style="color:#ffd15a;">▼</span>

... as if the contents of MediaWiki:categorytree-collapse-bullet were enclosed in <nowiki> tags.

Is this intentional behaviour? Or is it a bug?

Either way, how can I change the color (or content) of the bullets in the latest CategoryTree version?

Maybe (just thinking out loud here), editing MediaWiki:Common.css and adding a CategoryTreeToggle style definition there? Haven't tried this...

Thanks in advance (talkcontribs)

just started working on a mediawiki site and had issues with the CategoryTree 1.26 extension. I ended up using an older version (I used 1.23). My issue with the 1.26 CategoryTree extension was it hid all of the WYSIWG buttons for the wiki editor.

I did change the color of my triangles. The CSS looks different than yours in my version of CategoryTree. The triangle element had a class surrounded it, so it was easy to target. Hope that helps

This comment was hidden by Rbirmann (history)
Varlin (talkcontribs)

@Rbirmann I've got the same "span" problem since my upgrade to MW1.26... Did you find something to fix it?

EDIT : ok sorry I just totally forgot that I changed MediaWiki:categorytree-collapse-bullet page long time ago! It's better to remove it and use CSS...

Reply to "Customized collapse/expand/empty images broken after update"

$wgMaxArticleSize conflicts with <CategoryTree> tag

1 (talkcontribs)

A wrong value in this setting may cause that .js construction for categorytree tag exceeds this limit value. If you insert this tag and you see the plain text of the tag displayed instead of the tree with arrows to navigate, just try increasing the value of de config variable $wgMaxArticleSize. It worked on 1.27 version.

Reply to "$wgMaxArticleSize conflicts with <CategoryTree> tag"