Extension talk:CategoryTree/LQT Archive 1

=2009=

Error after Xampp-Upgrade
Good news! I upgraded to MediaWiki 1.15.1 and the concurrent version of the extension and that solved my problem.

--Katwol 10:11, 18 August 2009 (UTC)

After Upgrading from Xampp 1.7.1 to 1.7.2 I get the following error messages when the CategoryTree-extension is activated in LocalSettings.php:

PHP Warning: Parameter 1 to Language::getMagic expected to be a reference, value given in /opt/lampp/htdocs/_fhbwiki/includes/StubObject.php on line 58, referer: [...]/index.php/Hauptseite PHP Warning: Parameter 2 to efCategoryTreeParserOutput expected to be a reference, value given in /opt/lampp/htdocs/_fhbwiki/includes/Hooks.php on line 117, referer: [...]/index.php/Hauptseite PHP Warning: Parameter 1 to Language::getMagic expected to be a reference, value given in /opt/lampp/htdocs/_fhbwiki/includes/StubObject.php on line 58, referer: [...]/index.php/Hauptseite PHP Warning: Parameter 1 to Language::getMagic expected to be a reference, value given in /opt/lampp/htdocs/_fhbwiki/includes/StubObject.php on line 58, referer: [...]/index.php/Hauptseite PHP Warning: Parameter 1 to Language::getMagic expected to be a reference, value given in /opt/lampp/htdocs/_fhbwiki/includes/StubObject.php on line 58, referer: [...]/index.php/Hauptseite PHP Warning: Parameter 1 to Language::getMagic expected to be a reference, value given in /opt/lampp/htdocs/_fhbwiki/includes/StubObject.php on line 58, referer: [...]/index.php/Hauptseite PHP Warning: Parameter 1 to Language::getMagic expected to be a reference, value given in /opt/lampp/htdocs/_fhbwiki/includes/StubObject.php on line 58, referer: [...]/index.php/Hauptseite PHP Warning: Parameter 1 to Language::getMagic expected to be a reference, value given in /opt/lampp/htdocs/_fhbwiki/includes/StubObject.php on line 58, referer: [...]/index.php/Hauptseite

Detected bug in an extension! Hook efCategoryTreeParserOutput failed to return a value; should return true to continue hook processing or false to abort. Backtrace:
 * 1) 0 /opt/lampp/htdocs/_fhbwiki/includes/OutputPage.php(554): wfRunHooks('OutputPageParse...', Array)
 * 2) 1 /opt/lampp/htdocs/_fhbwiki/includes/OutputPage.php(562): OutputPage->addParserOutputNoText(Object(ParserOutput))
 * 3) 2 /opt/lampp/htdocs/_fhbwiki/includes/Article.php(3506): OutputPage->addParserOutput(Object(ParserOutput))
 * 4) 3 /opt/lampp/htdocs/_fhbwiki/includes/Article.php(900): Article->outputWikiText(Dies ist das...')
 * 5) 4 /opt/lampp/htdocs/_fhbwiki/includes/Wiki.php(447): Article->view
 * 6) 5 /opt/lampp/htdocs/_fhbwiki/includes/Wiki.php(63): MediaWiki->performAction(Object(OutputPage), Object(Article), Object(Title), Object(User), Object(WebRequest))
 * 7) 6 /opt/lampp/htdocs/_fhbwiki/index.php(114): MediaWiki->initialize(Object(Title), Object(Article), Object(OutputPage), Object(User), Object(WebRequest))
 * 8) 7 {main}

Everything works ok with: MediaWiki 	1.14.0 PHP 	5.2.9 (apache2handler) MySQL 	5.1.33

But the error occurs with: MediaWiki 	1.14.0 PHP 	5.3.0 (apache2handler) MySQL 	5.1.37

I need help with fixing this.

--Katwol 12:17, 17 August 2009 (UTC)

A little mistake at saving in RichEditor
When saving a page in RichEditor (MW 1.15, IE8), there is a small change that causes Categroytree not working.

From this:

It makes this:

Currently this generates a list that are subcategories to the category "features". But the output of it is in a single column, which can get very long if there is a lot of subcategories underneath "features". Is it possible to format the output so the list is in multiple columns? Also, can it be done so it's arranged alphabetically (like the subcategories list generated automatically by the wiki itself -> this is actually the desired output i am trying to get) Thanks in advance!! 128.189.248.8

Different spot in sidebar
Is there any way of making this be above some of the other items in the sidebar? - My Wiki

--38.98.7.10 02:45, 7 March 2009 (UTC)

Go into:

MediaWiki:Sidebar

Put * categorytree-portlet into the list anywhere you want.

72.166.192.10 17:26, 27 April 2009 (UTC)

UNIQ385ee6e553c2262-h-0--QINU
An error occured in German Wikipedia. The heading of section appear e.g. as UNIQ385ee6e553c2262-h-0--QINU (cf. QINU fix). This happens if the tag missing category appears on the page (example). --WIKImaniac 19:59, 6 January 2009 (UTC)
 * This also happens in hebrew mediawiki with this extension. --85.250.59.208 09:42, 24 February 2009 (UTC)


 * Same problem in my wiki in French www.wikitau.org see http://www.wikitau.org/index.php5/Portail:Histoire but strangely not in http://www.wikitau.org/index.php5/Portail:Personnages see Extensions_FAQ FrViPofm 10:31, 3 March 2009 (UTC)


 * Same problem in my german wiki. It's very strange. In some case it work without QINU errors, but in other case it dosn't work. That's approximately 50% of cases. What is the Problem? I have test it with version r46794 (Current) and r45462 (version for mediawiki 1.14.0). P. Vizeli 11:09, 4 March 2009 (UTC)

A request
Is there any way a switch can be added that will allow the function to be set to default to the collapsed state? I am referring to the function. --Jerem43 06:13, 22 January 2009 (UTC)

A different display
Please take a look at en:Category:Application software. The category outline there was designed as a concise display of the category tree, intended for use by people categorizing articles and not knowledgeable of the existing categories. While that outline is hand-coded (and took advantage of some unique characteristics of that category), the rules for generating it were:
 * 1st level categories start a new line and are visually distinct (bold/higlighted/...)
 * 2nd and lower level categories follow on the same line without any indication of level
 * a category only appears once, whether the prior appearance was as a 1st or other level makes no difference
 * in general (it was hand-coded) the maximum depth was 4.

The resulting "outline" makes locating categories quick, usually at a glance. For many uses, it's not the tree structure that is important, but category existence, and the "outline" makes tree walking, expanding branches, unnecessary. Please consider such a display for future revisions. tooold00:36, 29 January 2009 (UTC)


 * Surely then if that were the case - you wouldn't be using Category Tree - which people are choosing to use because thats what they really want. Its a nice layout indeed, but we use Category Tree in the sidebar where such a layout would not function at all.

Nibb 16:17, 25 March 2009 (UTC)

Special:Categories
Is it possible to change the defaults on the Special:Categories page - i.e. instead of seeing a list of categories, seeing them with the + next to the to see sub-categories / pages? How? --Robinson Weijman 08:50, 29 January 2009 (UTC)

CategoryTree Does not show any Categories
Hi,

My wiki does not show Category Tree, eventhough it has categories. The categories pagge displays

Pages in category "Agile" There are 3 pages in this category.

A Agile Challenges Agile Resources Agile Testing

But when i click on Show Tree it shows:"Category Agile not found "

Am using IE7 browser, and have JavaScript enabled.

Installed software

MediaWiki 1.12.0 PHP 5.2.5 (apache2handler) MySQL 5.0.51a

Installed extensions CategoryTree (Version 2008-02-04)

Can anyone help me out. pls.

Just saw something similar. Make sure the categories have category pages created, then Category Tree can see them. Using Media Wiki 1.14.0 and trunk version Category Tree.

FIXED: [+] in Category Tree stopped working with installation of V1.13.4
I use the Category Tree in the sidebar, and with an upgrade to the latest version, now, the [+] buttons no longer work. Also on category pages this feature has stopped working. Any ideas? Applicationswhisperer 23:21, 7 February 2009 (UTC)
 * I found that I had set the permissions to the /extensions folder to 744 instead of 755. Now it's set properly and all is well.

Applicationswhisperer 18:14, 9 February 2009 (UTC)

No Responses
Take a look at the subjects added so far this year. Many subjects but no responses. Does anyone monitor this page to help people using this extension? Please respond. (My question is above.) --Robinson Weijman 12:41, 10 February 2009 (UTC)

Examples of class, style, id, etc
Examples of class, style, id would be grand. 69.138.163.138 17:10, 16 February 2009 (UTC)

parameter DEPTH
Depth requires only 1 number, but the default is shown as "1,0". A description would be nice, rather than our having to experiment. 69.106.246.15 19:30, 20 February 2009 (UTC)

Category Page Trees only show subcategories, not pages
It took me a while to find $wgCategoryTreeCategoryPageOptions because it's not so obvious that this is the needed option. I searched google and found an old talk page for this extension which showed a few hacks to fix it. Anyways I finally did:

$wgCategoryTreeCategoryPageOptions['mode'] = 'all';

--85.250.59.208 09:41, 24 February 2009 (UTC)

I also added the following which worked - sort of:

$wgCategoryTreeDefaultOptions['mode'] = 'all';

For some reason, though, this has no effect on the category tree that displays in the Sidebar.

What are MediaWiki.org's Settings? How to setup Category count and Page count in Tree View ie: (2 C, 10 P)?
What is the default setup in the MediaWiki.org LocalSettings.php for CategoryTree? I've tried about 12 different settings in my wiki and nothing behaves the same as this site, like on this MediaWiki.org page: Category:Top_level

I can't figure out how to configure two things:
 * 1) How to make category page display the statistics like: (2 C, 10 P) for 2 categories and 10 pages.
 * 2) My wiki also only shows [+] next to top level sub-categories, but not in secondary sub-categories.

Where is the documentation to show how to make these functions work with examples?

173.54.95.59 17:39, 10 March 2009 (UTC)


 * About 1. thing: You need to edit follwing article in your wiki: "MediaWiki:categorytree-member-num". You can do this if you put this article name into your search field and push "Go". If do the same on this wiki, or any other Wiki you can copy the setting from there into your own wiki. When including the category tree into a page you need to add the "showcount" option. Hope it helps. Elch71 07:23, 15 April 2009 (UTC)

Missing [+] signs
Got an odd error here, have recently upgraded to MW 1.14.0, I copied our existing virtual domain to a new one, did the upgrade - just being cautious now, and all works just fine. Rename the domain to the one we normally use - and whilst the Category tree loads just fine - I get no [+] signs at all - either in the sidebar or by calling the category tree for example in the Main_page. The list of categories is there, no errors are to be found the Apache log for missing images and so on. Anyone any ideas?

thanks Nibb 16:13, 25 March 2009 (UTC)

Just fixed this for our installation. Looks like maintainers try to enable display of the [+] via javascript only and changed the default to display: none. I went into CategoryTreeFunctions.php and reset the linkattr to display: inline and after clearing browser cache, voila it now works as expected.

665c665 <                      $linkattr['style'] = 'display: inline;'; // Unhidden by JS --- >                      $linkattr['style'] = 'display: none;'; // Unhidden by JS

72.166.192.10 17:31, 27 April 2009 (UTC)


 * Dude, thats excellent and it worked perfectly, thanks for sharing!!Nibb 14:59, 8 June 2009 (UTC)
 * Great, 10x! Khitrenovich 20:06, 20 June 2009 (UTC)

Keep nodes expanded
How can I keep the nodes on a category page expanded by default? Can I control the depth, too?

Object expected
Hi, I've installed CategoryTree and it works till I wanna click the "expand node"=> an error occurs at the following line with errot exception: "object expected in line(following) character 48(position of keyword "style"):

[+] TestA

in addition theres an error at the same page in line 7

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">













why is the href-link named with "CategoryTree.css?4 ?

can anybody help me please? Thanks in advance

Freezone 10:15, 06 April 2009 (UTC)

FIXED: mediawiki 1.14.0 upgrade and can't get past first level of the hierarchy
It used to be when there was an inline


 * I'm pretty sure I have to play with parameters but which one it's not so clear.--Fpiraneo 09:45, 24 June 2009 (UTC)
 * How soon do you need this? i might be able to do some serious work on it, when the summer semester is done. Bud0011 23:06, 24 June 2009 (UTC)
 * Hi Bud, thank you for your answer; I'm just looking for the same behaviour of the demo on the documentation page of this extension (the tree on the right of the page), nothing more, nothing less; I think that all the job is already done and the problem is just my configuration; the point is that with the published documentation I cannot realise what is wrong. Answering your question, the answer is: "Very often!" :-) --Fpiraneo 07:24, 25 June 2009 (UTC)
 * Fpiraneo, I found the fix to this issue: Source code for fixed CategoryTree.js (rev 51817). Was bugging me for a couple weeks.  Sigh. -- Anonymous July 8/09

[+] functions on every Category page, why?
well I was wondering (after installing the extension) why this extension is visible on every category page? For example: Wiki Link

Is there a way to disable the function only on category pages?

namespaces="0" didn't work for me
namespaces="0" didn't work for me (but namespaces="-" did ). -Jlerner 14:57, 27 June 2009 (UTC)

efCategoryTreeAjaxWrapper returned no data
Extension worked fine for more than a year, but without any change of installation (MediaWiki or extension) the Special page (Special:CategoryTree) returns at one (and only one) node when trying to extend with the + link:
 * 500 Internal Error:
 * Internal Error
 * efCategoryTreeAjaxWrapper returned no data

The configuration is: Thanks in advance for any help. --ThT 12:15, 2 July 2009 (UTC)
 * MediaWiki: 1.10.1
 * PHP: 5.1.2 (apache2handler)
 * MySQL: 5.0.26
 * Revision 52685

tree of category on another MW instance?
Is it possible to display a tree on Wikipedia of a category on wikimedia commons? Specifically, I want to display the tree of Commons:Category:Structural_Classification_of_Proteins_(SCOP) on Wikipedia:Portal:Gene Wiki. Thoughts? Cheers, AndrewGNF 16:30, 16 July 2009 (UTC)

Hide paths for subpages
Two simple changes will enable you to hide the Subpage paths ('root/Pagename' displays 'Pagename')

if ($this->getOption('hidepath')) $label = basename($label);
 * Line 622 in CategoryTreeFunctions.php

$wgCategoryTreeDefaultOptions['hidepath'] = false; # false means "don't hidepath"
 * Line 79 in CategoryTree.php

--Frantik 13:59, 17 July 2009 (UTC)

"What links here", "orphaned pages" not working
"What links here" doesn't show pages that link using categorytree tag. That means "special/orphaned pages" doesn't work too. Exe 21:15, 17 July 2009 (UTC)

Links not functioning
I'm flummoxed. I have two instances, a lab and a production, of MW 1.14.0. The production instance was configured by copying the lab over. All works well except the CategoryTree extension. In Production, the [+] link doesn't show up at all. When I try the fix from 72.166.192.10 17:31, 27 April 2009 (UTC) in, I get the plus signs but they don't do anything (and they show up on every category, with or without sub-categories).

The source for example pages shows the same html on each with the exception of style="display: inline;" on Production with the fix in place. Clicking on the plus does nothing.

I have compared LocalSettings.php and checked my .css and .js for all MediaWiki NS and there are no relevant differences. The only difference I see at all is the PHP and MySQL versions are slightly (5.2.0-8+etch13 lab PHP versus 5.2.0 Production and 5.0.32-Debian_7etch8-log lab MySQL versus 5.0.33-log Production) but the pages are rendering the same.

I'm guessing I'm missing a style or Ajax module somewhere but haven't found it.

TIA for any help. - Eckster 13:41, 20 July 2009 (UTC)

Categorytree-parents
This message needs an argument. CategoryTreePage.php needs to be reworked to pass the number of parents found as that argument. This would allow the message to use PLURAL: to adjust itself accordingly. Urhixidur 13:43, 23 July 2009 (UTC)

Categorytree-member-num et al.
The following messages appear in CategoryTreeFunctions.php but are omitted from the $messages array in CategoryTree.i18n.php. They need to be added so they will show up on translatewiki.net: Urhixidur 14:05, 23 July 2009 (UTC)
 * categorytree-collapse-bullet
 * categorytree-empty-bullet
 * categorytree-expand-bullet
 * categorytree-member-num
 * categorytree-page-bullet

No Screenshot for this extension?
Might be nice to have one, even if it's quite obvious how it'll look.