Extension talk:CategoryTree/Archive 03

=2009=

Error after Xampp-Upgrade
PHP 5.3 seems to be more strict with handing over of values/references. In this case the culprit probably is Language.php. see Try to change

-	function getMagic( &$mw ) {

+	function getMagic( $mw ) {

in Languages.php and your problem might be solved.

Mathias Scheer, hallowelt.biz

--80.153.10.122 12:59, 14 October 2009 (UTC)

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)

This doesn't show any effect in my Wiki. Why?

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)


 * Same problem in MediaWiki 1.15.1 on Php 5.3.0 in situations where the category tree cannot be found (typo in the category named inside of the tag). No problem, if category can be found.

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)


 * I'm using a very crude workaround. In wikia there is an js extension that is used to collapse / expand blocks, so what did I do? Nested the categorytree inside a Show/Hide container. http://dev.wikia.com/wiki/ShowHide


 * If you set depth to zero it will only show the root element. 75.119.248.55 13:53, 3 August 2010 (UTC)


 * yes but it show only the root element and when you click on the [+] it sais "loading" and don't show the subcategories...

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)
 * Second that. I tried to create a smaller font for my Portal, otherwise it would be long (because depth=2) Thanks. Bennylin 09:37, 9 April 2010 (UTC)
 * Strike that:


 * Hurrah. Bennylin 09:42, 9 April 2010 (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)
 * The depth is just 1 number. The description did read: "Default is 1, 0 means only the root node." I changed to remove the confusion - "Default is 1. 0 means only the root node." GarethLewis 05:11, 21 January 2010 (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)


 * A big thank you from my side as well ! 157.193.192.64 16:42, 2 August 2010 (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)


 * Same error when clicking on the expand "[+]" button - Object required - CategoryTree.js - Line 32 Char 7.
 * Line 32 is "     div.style.display= 'block';"
 * Error only occurs if the category list is in a sub-page. If in a normal page, it works OK.
 * MediaWiki 1.15.1
 * GarethLewis 05:17, 21 January 2010 (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)


 * none of these works for me. "0" shows all namespaces, "-" shows nothing? Mitjad 23:29, 13 December 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)


 * Hi Eckster - I have this as well (MW 1.15.4) - did you solve it? --Robinson Weijman 09:25, 27 July 2010 (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.

Intersection view?
Hi, is it possible to make CategoryTree show all pages in the intersection of two categories, i.e. only show pages that belong both to category A and category B?

Error : Magic word 'categorytree' not found
On installation the latest version, am getting the below error.

''Magic word 'categorytree' not found

Backtrace:


 * 1) 0 /home/ahmedaba/public_html/wiki/includes/MagicWord.php(244): Language->getMagic(Object(MagicWord))
 * 2) 1 /home/ahmedaba/public_html/wiki/includes/MagicWord.php(197): MagicWord->load('categorytree')
 * 3) 2 /home/ahmedaba/public_html/wiki/includes/parser/Parser.php(4034): MagicWord::get('categorytree')
 * 4) 3 /home/ahmedaba/public_html/wiki/extensions/CategoryTree/CategoryTree.php(207): Parser->setFunctionHook('categorytree', 'efCategoryTreeP...')
 * 5) 4 /home/ahmedaba/public_html/wiki/includes/Hooks.php(117): efCategoryTreeSetHooks(Object(Parser))
 * 6) 5 /home/ahmedaba/public_html/wiki/includes/parser/Parser.php(178): wfRunHooks
 * 7) 6 /home/ahmedaba/public_html/wiki/includes/parser/Parser.php(190): Parser->firstCallInit('efCategoryTreeS...', Array)
 * 8) 7 /home/ahmedaba/public_html/wiki/includes/parser/Parser.php(312): Parser->clearState('ParserFirstCall...', Array)
 * 9) 8 /home/ahmedaba/public_html/wiki/includes/StubObject.php(58): Parser->parse
 * 10) 9 /home/ahmedaba/public_html/wiki/includes/StubObject.php(76): StubObject->_call
 * 11) 10 [internal function]: StubObject->__call('A blend of Hind...', Object(Title), Object(ParserOptions), true, true, 25)
 * 12) 11 /home/ahmedaba/public_html/wiki/includes/Article.php(3557): StubObject->parse(Array, Array)
 * 13) 12 /home/ahmedaba/public_html/wiki/includes/Article.php(979): Article->outputWikiText('parse', Array)
 * 14) 13 /home/ahmedaba/public_html/wiki/includes/Wiki.php(450): Article->view('parse', Array)
 * 15) 14 /home/ahmedaba/public_html/wiki/includes/Wiki.php(63): MediaWiki->performAction('A blend of Hind...', Object(Title), Object(ParserOptions), true, true, 25)
 * 16) 15 /home/ahmedaba/public_html/wiki/index.php(116): MediaWiki->initialize('A blend of Hind...')
 * 17) 16 {main}''

No pages or categories load

—The preceding unsigned comment was added by 59.95.220.35 (talk • contribs) 12:49, 23 August 2009. Please sign your posts with ~ !


 * I'm having the same error on my wiki. If anyone knows any solutions I'd be grateful. -- DavidSev 00:25, 4 September 2009 (UTC)
 * For anyone else looking for the solution, svn HEAD doesn't work with older mediawiki's, r53180 works great. — DavidSev (talk) 20:17, 7 September 2009 (UTC)
 * There is a report of this bug on bugzilla and the suggested fix, "Use a categorytree version suitable for your MediaWiki version" works for me — I'm using the REL1_15 branch with the latest stable release — ChrisC 12:27, 14 September 2009 (UTC)
 * The REL1_15 branch works for me in my 1.15 mediawiki, thank you very much!! --Laquestianne 11:21, 5 March 2010 (UTC)

Open up Sub-Subcategories on a Category Page
Hello,

I'm using Mediawiki 1.15.0 with the latest stable version of CategoryTree.

I've searched for a solution on google and in the history

of this talk but couldn't find an answer.

The problem is, that we want the ability to open also the subcategories of the subcategories shown on the category page. I managed to show the the pages in the subcategorie part. But I don't get the plus for opening the sub subcategories like on http://www.mediawiki.org/wiki/Category:Extensions and then on the Extension by integration target

I would be very pleased if someone could help me.

Greets,

Tom

--Hi Tom, I think this is the same problem as 1.10 "Can't get past first level of hierarchy" listed above. Source code for fixed CategoryTree.js (rev 51817)

Expand tree to current page
Would it be possible to modify the extension to show all levels up to the current page (if it is contained in the tree). We have an encyclopedia of a technical system divided into systems, subsystems, subsubsystems, etc. and we display the CategoryTree on each of the pages to allow users easy navigation and orientation. It would be great to have the tree expanded to the current page so that the users can get a quick impression about the location of the current article in the overall context. Maybe the current page could also be printed in bold.

- Stefan

Missing [+] signs again
In the last few days the category extension has been missing [+] links in en.wikipedia.org and commons.wikimeda.org. The symptoms are as described in "Missing [+] signs" above. There are no recent bugs listed in bugzilla for this problem, does anyone know the status? -84user 02:03, 25 November 2009 (UTC)
 * False alarm, I had Javascript disabled. -84user 02:53, 25 November 2009 (UTC)

Pages in categories
I have installed and setup CategoryTree. MediaWiki 1.15. Trouble: CategoryTree shows pages only from 1 level of tree. Pages from the 2 and more level are not visible!! (mode=pages)!! I want to see all categories and all pages of the site! Help! --Андрей Краснобаев 20:11, 28 November 2009 (UTC)

---I'm facing the same problem, my tree just show the pages of the first cat. level. I've tryied all LocalSettings parameters, but no one give me a positive result, I do need a help over here. --DiRaOL 18:06, 06 December 2009 (UTC-3)

---Same problem here... Any idea in how to add more levels than 3 in the tree?

--- I found the fix here... Thanks whom did that: http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/CategoryTree/CategoryTree.js?view=markup&pathrev=51817

--- Hey thanks - It worked for me. Simply replace the CategoryTree.js file with this new one. --Givirus 16:18, 29 September 2010 (UTC)