Last modified: 2010-05-15 15:59:41 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T14420, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 12420 - Unknown issue with category determination with conditional templates
Unknown issue with category determination with conditional templates
Status: RESOLVED INVALID
Product: MediaWiki
Classification: Unclassified
Categories (Other open bugs)
1.11.x
All All
: Normal major (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-12-26 07:51 UTC by Voyagerfan5761 / dgw
Modified: 2010-05-15 15:59 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Wikitext source of the template I'm having issues with (2.47 KB, text/plain)
2007-12-26 07:51 UTC, Voyagerfan5761 / dgw
Details

Description Voyagerfan5761 / dgw 2007-12-26 07:51:43 UTC
Created attachment 4471 [details]
Wikitext source of the template I'm having issues with

I have a reasonably complex conditional template that I'm trying to use for both visible tagging and auto-categorization of protected pages. So far, it works OK, but the categories are behaving strangely.

I've included the template source as an attachment.

I have enabled $wgUseCategoryBrowser, and also installed [[mw:Extension:RightFunctions]] for the very purpose of creating templates like this.

The issue is, the pages with the template on them, if they are protected (have a non-empty {{#getrestrictions:edit}}), sometimes display the protection category in the normal list, but the template removal queue cat in the browser list. They show up in the latter category, but not in the protection category, which goes beyond a display bug.

I'm not sure how to fix this, and have tried about 50 revisions of the template, tweaking things here and there to try and make it work, but I just can't. That's why I'm reporting this as a bug; I don't think it's anything I'm doing, given the dual display and wrong-category issues. Unless I'm being affected by a weird ParserFunctions problem...

So, a little background: The template {{!}} is the same as it is on en.Wikipedia; just a pipe ('|') character.

If this isn't a MediaWiki bug, I certainly hope I can at least get some help with the template; it's been driving me batty all day.
Comment 1 Voyagerfan5761 / dgw 2007-12-26 07:53:55 UTC
Dang it! I forgot to mention, the category links are all fine after I run maintenance/refreshLinks.php, but they break again the next time the problem template is edited. Perhaps this is an issue with the job-running code or something - I haven't studied enough about MediaWiki internals to be sure.
Comment 2 Brion Vibber 2007-12-28 01:20:39 UTC
Looks like your extension is using $wgTitle... that's bad mojo, as I believe $wgTitle may belong to someone else during background updates. You should instead pull the current title from the parser, eg $parser->getTitle().
Comment 3 Voyagerfan5761 / dgw 2007-12-28 01:47:36 UTC
I've mentioned this bug to the extension's (RightFunctions') developer (Skizzerz), so we'll see what he does with it. I'll keep track of this bug, and if I can fix it by tweaking an extension, I'll self-INVALID it. I still haven't managed to get it to work right... :P
Comment 4 Voyagerfan5761 / dgw 2007-12-28 15:11:40 UTC
Bug was caused by incorrect title-grabbing in an extension.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links