Page MenuHomePhabricator

CategoryTree does not work properly when used in [[MediaWiki:Sitenotice]]
Open, LowestPublic

Description

  • MediaWiki v1.8.2
  • CategoryTree SVN version from 2006-10-15

When using this extension in MediaWiki:Sitenotice the box does show up, but is not usable. Clicking on [+] does
nothing.

When including the <category> tag additionally into another page it works - also in the box shown from
MediaWiki:Sitenotice.

Steps to reproduce:

  1. Put <category>/some category/</category> into [[MediaWiki:Sitenotice]].
  2. Box should be shown on all pages, but is infunctional.
  3. Put the <category>/some category/</category> on any other page or visit [[MediaWiki:Sitenotice]] - two boxes

should be shown.

  1. Both boxes will work.
  2. Go to another page with box only included from [[MediaWiki:Sitenotice]] - box doesn't work.

Version: unspecified
Severity: enhancement
OS: Linux
Platform: PC

Details

Reference
bz7590

Event Timeline

bzimport raised the priority of this task from to Lowest.Nov 21 2014, 9:27 PM
bzimport set Reference to bz7590.
bzimport added a subscriber: Unknown Object (MLST).
80686 created this task.Oct 15 2006, 7:50 PM

Please look for any JavaScript errors you are getting and report them here (some
browsers do not report them per default, you have to look for them in some log
and/or enable reporting).

I expect that the probelm is that the tag does not cause the required JavaScript
code to be included, when it is in a system message. System messages are
special, using extensions in system messages is generally problematic.

I can't think of a good reason to use CategoryTree in the site notice... please
describe why you want that, perhaps I can find a better way to accomplish that goal.

javier.valcarce wrote:

Hi. I have the same problem. I solved it putting by hand the javascript code
into my skin. Ugly, but is the only way I think.

<script type="text/javascript"
src="/w/extensions/CategoryTree/CategoryTree.js"></script>
<script type="text/javascript">

var categoryTreeCollapseMsg = "collapse"; 
var categoryTreeExpandMsg = "expand"; 
var categoryTreeLoadMsg = "load"; 
var categoryTreeLoadingMsg = "loading"; 
var categoryTreeNothingFoundMsg = "Lo sentimos, no se ha encontrado nada"; 
var categoryTreeNoSubcategoriesMsg = "sin subcategorías."; 
var categoryTreeNoPagesMsg = "sin artículos ni subcategorías.";

</script>

javier.valcarce wrote:

I can't think of a good reason to use CategoryTree in the site notice... please
describe why you want that, perhaps I can find a better way to accomplish that

goal.

I want a CategoryTree menu into a div container in my own skin so I used
$this->html('sitenotice') variable to achieve this goal. Does you know better
way to accomplish that goal? Thanks.

You can get this to work using a relatively simple hack: [[Extension:CategoryTree#Using_CategoryTree_in_the_Sidebar]]

This should probably be come a propert configuration option in the future, so closing this as "LATER".

[Removing RESOLVED LATER as discussed in http://lists.wikimedia.org/pipermail/wikitech-l/2012-November/064240.html . Reopening and setting priority to "Lowest". For future reference, please use either RESOLVED WONTFIX (for issues that will not be fixed), or simply set lowest priority. Thanks a lot!]

Since 69fa92ee a categorytree in the sitenotice is always nonfunctional even when there is a categorytree somewhere else in the content and the module ext.categoryTree is loaded.