Extension talk:TopTenTemplate

From mediawiki.org
Jump to navigation Jump to search

Hey everyone, I hope this extension helps you out as much as it has helped us!

Broken since MW1.22: wfSpecialList deprecated[edit]

TopTenTemplate used to work very nicely for me, but after I upgraded to MW1.23, it is broken.

Checking my Apache log, this is because:

[Tue Oct 07 14:40:39 2014] [error] [client <IP>] PHP Fatal error:  Call to undefined function wfSpecialList() in /var/www/mediawiki-1.23.5/extensions/TopTenTemplate/TopTenTemplate.php on line 119, referer: http://<wikiserver>/wiki/Special:UserLogin

Why is this function missing? The answer is that it was removed as part of MW1.22: https://gerrit.wikimedia.org/r/#/c/87270/

Here is a hint:

- * Make a list item, used by various special pages 
- * 
- * @param string $page Page link 
- * @param string $details Text between brackets 
- * @param $oppositedm Boolean Add the direction mark opposite to your 
- * language, to display text properly 
- * @return String 
- * @deprecated since 1.19; use Language::specialList() instead 
- */ 

I tried simply editing TopTenTemplate.php, replacing the call to wfSpecialList with Language::speciaList instead, but this resulted in worse problems: WSOD as the person below experienced. At this point, I have to re-assess my use of this extension.

As this extension is old and apparently unloved, I am giving up (for now) and investigating Semantic Extra Special Properties instead, as this adds a VIEWS (number of page views) special property which can be used with Semantic MediaWiki queries (hopefully!)

Update: yes, it's not too difficult to create a top ten most-viewed pages for a category using SESP as I suggest above using something like:

{{#ask: [[Category:Some Test Category]]
 | ?Number of page views=
 | format=ul
 | limit=10
 | searchlabel=
 | sort=Number of page views
 | order=desc

To save anyone who made the same mistake I did, your SESP installation won't do anything unless you add the required GLOBALS entry in LocalSettings.php (see the SESP config guide).

White screen of death[edit]

I get the white screen of death when trying to use this extension and the other one that you guys maintain.