UESPWiki talk:UespCustomCode
Category Problems - Bug?[edit]
Okay, I'm now fairly certain this isn't me so it's time to post about a strange bug. This is obviously for Nephele, so please excuse the 2nd-person usage!
You've probably noticed that I've been taking out references to the ModName template and going for the various NS_* words instead. Unfortunately this seems to create "ghost" categories. Take a look at Special:Wantedcategories at the moment. You'll see a lot of categories like "Daggerfall-Factions-Mainland Great House Telvanni" that shouldn't be created but are. A null edit on the pages apparently in that category takes them out of it straight away.
I know that null edits aren't the best way to go, but earlier I cleared out the Wantedcategories page to see what happened. Answer - a lot of new categories came back. I've previously waited for the job queue to hit 1 (it never seems to hit 0) and the same thing resulted. In other words, pages get put into the correct categories when SAVEd, but get put into incorrect ones by the job queue. At this point, I'm afraid it's over to you as I can only assume the problem lies in the code for the new magic words. –Rpeh•T•C•E• 17:20, 27 April 2009 (EDT)
- Oops, sorry, I hadn't noticed this until now ;)
- I think I've fixed the source of the problem, and I've included the changes in the set of code that's queued up for Daveh to install. I'm assuming it's happening because the articles are being processed by the job queue -- and they're incorrectly inheriting the namespace of the original document that was being processed, not the job queue article that got tacked on to the process. I should now have the code set up so that it recognizes when the article has changed, but yet doesn't have to re-process an article's namespace repeatedly.
- I haven't tried to truly test whether my new code makes the phantom categories go away, because it would be a lot of work to reproduce all the details on my test wiki. Nevertheless, I'm pretty confident this should take care of it. When Daveh does install the code, it's probably best to go through each of the templates that contain a NS_ parameter and make a new dummy edit to force all the articles to re-submitted to the job queue. (Just doing null edits on the articles in the phantom categories probably isn't sufficient -- there could be other errors that just don't create bogus categories, for example, Oblivion books getting added to Morrowind-Books). --NepheleTalk 17:37, 4 May 2009 (EDT)
Is this a bug or shouldn't I be using it?[edit]
I've been looking at using the new magic words to simplify doing the Quest Link template (this edit: and the same thing comes up in other places too). There seems to be a problem with passing a parameter to the namespace magic words. I don't even know if it's intended behavior, but let me try to explain anyway. When you pass a param to NS_FULL, it doesn't put the correct suffix on if the param is a sub-namespace.
{{NS_FULL:Oblivion}}
always produces "Oblivion:", no matter what namespace you call it from. Perfect.{{NS_FULL:Tes3Mod:Tamriel Rebuilt}}
produces "Tes3Mod:Tamriel Rebuilt:", which isn't right - I'd expect "Tes3Mod:Tamriel Rebuilt/" instead. The upshot is that although that proposed change to Quest Link works for all our current pages, it won't work if any other mod page needs to link to a quest in a different mod.
So is this something that needs a fix, or is it undocumented behavior in any case and I shouldn't be relying on it? It would be really useful if it did work, because otherwise we're still going to need a template to translate namespace params into something other templates can use - unless we force people to append a ":" or "/" to their game params.
I hope that's clear enough... I've rewritten this post several times but I seem to be incapable of explaining it any better than this. –Rpeh•T•C•E• 14:32, 15 May 2009 (EDT)
- Yep, you've found another bug ;) I've made the necessary fixes and added it into the (now somewhat long) list of changes that will become available once Daveh installs version 0.7 of the extension. --NepheleTalk 16:10, 15 May 2009 (EDT)
Documentation Updates[edit]
I did some updates to the documentation based on the PHP code I found for it. I don't know enough about PHP to do more than that and I'm busy with the templates. If a PHP programmer wants to look at it the code can be found here. I left notes on the page explaining the missing docs. ‒ Joram↝Talk 06:09, 1 February 2010 (UTC)