Last modified: 2013-02-10 13:28:05 UTC
A template at no.wikipedia uses REVISIONYEAR/-MONTH to generate a category name, and the whole thing is wrapped in <includeonly>. The construct sometimes fails and puts the article into an erroneous named category. The template with the erroneous behaviour seems to be http://no.wikipedia.org/w/index.php?title=Mal:Stubb&oldid=9289679 A later fix removes <includeonly> and uses {{#ifeq}} instead, and then only puts articles from the main namespace into the category http://no.wikipedia.org/w/index.php?title=Mal:Stubb&oldid=9945807 This is the difference between those two versions http://no.wikipedia.org/w/index.php?title=Mal%3AStubb&action=historysubmit&diff=9945807&oldid=9289679 The erroneous category is http://no.wikipedia.org/wiki/Kategori:Stubber_-00 Note that the name for this category is malformed as {{REVISIONYEAR}} and {{REVISIONMONTH}} has not returned valid values. A testcase to isolate some of the problems are on the pages http://no.wikipedia.org/wiki/Bruker:Jeblad/revisionyear http://no.wikipedia.org/wiki/Bruker:Jeblad/test-revisionyear http://no.wikipedia.org/wiki/Bruker:Jeblad/test-revisionyear2 http://no.wikipedia.org/wiki/Kategori:Test_2012 First the page Bruker:Jeblad/test-revisionyear is made, then the Bruker:Jeblad/revisionyear which acts as a template. At this point the page test-revisionyear seems to have a valid category but the test page is not added to the category. When the page Bruker:Jeblad/test-revisionyear2 is made it is added to the category Kategori:Test_2012 as it should. The later is created (edited) _after_ the template is made, while the former is created (edited) before. The former should be updated through a worker I guess. There are no testcase for the {{REVISIONYEAR}} and {{REVISIONMONTH}} I wonder if there are several bugs that pops up simultaneously 1) REVISIONYEAR/-MONTH seems not to be defined _sometimes_, perhaps within <includeonly> and/or the category construct 2) Changes in the template does not seem to initiate a full regeneration of the article, at least sometimes, and it looks like a partially purge of some kind 3) It seems like a manual purge updates the article page after changes to the template, and also the category link on the page, but in the category page the article remains for a long time and it does not seem to be removed at all 4) A nulledit to the article page also updates the category link, and then a reload of the category page will be without an entry for the said article That should be all I have about this case.
Seems like an url was eaten by a formatter http://no.wikipedia.org/wiki/Bruker:Jeblad/test-revisionyear-2 Hopefully it works this time.
> > I wonder if there are several bugs that pops up simultaneously > 1) REVISIONYEAR/-MONTH seems not to be defined _sometimes_, perhaps within > <includeonly> and/or the category construct. I think i know why this is happening. When {{REVISION...}} variables are used, the revision is marked "vary-revision". Which means first we parse the page to find out what categories, etc the page uses. Put that all in the databse, and then once its in the db, we parse the page again now that we know the revision number. This second parse is only for showing to the user, we don't update the links tables with it. Hence the categories reflect the parse before we know what all the {{REVISION..}} variables are. This will be effectively fixed by r100610. (OTOH I'm having trouble re-producing this locally, so I'm not 100% sure that will fix it) I don't think <includeonly> should really have any affect. Other possibility is this is an instance of bug 33409 (but it sounds a bit different from that bug so I don't think that is the cause) > 2) Changes in the template does not seem to initiate a full regeneration of the > article, at least sometimes, and it looks like a partially purge of some kind Changes to templates should definitly fully change the article. However some times it takes a little while for that change to go through. > 3) It seems like a manual purge updates the article page after changes to the > template, and also the category link on the page, but in the category page the > article remains for a long time and it does not seem to be removed at all That's normal behaviour (well that purge doesn't fix it, needing purge obviously shouldn't happen in the first place). ?action=purge means just update the article, it does not trigger a linksupdate (but a null edit does trigger a linksupdate) > 4) A nulledit to the article page also updates the category link, and then a > reload of the category page will be without an entry for the said article yep, that's also the way its supposed to work (as in nulledit should fix. You're obviously not supposed to require a null edit in the first place). > > That should be all I have about this case.
Not sure, but I don't think r100610 is a solution. The bug 33409 is more interesting as the template changes will initiate a lot of article changes and especially as (2) seems to indicate that the worker fails somehow. Note the test case which does not use {{REVISION...}} also have the same problems, but perhaps that is just a variation of the same problem? There was also an additional template involved, but that one is now updated to not use <includeonly> for the category. It will probably take a few hours or a few days to see if it starts to fill up with erroneous entries.
Your correct, my theory about links update working on the parse from before the revision was inserted was wrong, it actually works on the second parse, so that shouldn't be causing it (This is what i get for talking without reading the code ;) >Note the test case which does not use {{REVISION...}} also have the same >problems, but perhaps that is just a variation of the same problem? Which test case was that?
Hmm, I see what you mean. my testing on test.wikipedia.org seem to make it look like something generally wrong with job queue doing linkupdates.
From the first email, go to http://no.wikipedia.org/wiki/Bruker:Jeblad/test-revisionyear Follow the link to the category and the page is not added there http://no.wikipedia.org/wiki/Kategori:Test_2012 I wonder if it is really two bugs; one that creates problems with {{REVISION...}} and where and when they are defined, and one that creates problems with linksupdate. Not sure, but it seems like moving the code that generated the category link out of <includeonly> doesn't readd pages to the erroneous category when I cleaned it up http://no.wikipedia.org/wiki/Kategori:Stubber_-00
Seems like the erroneous category (now with a slightly changed name - its not important) is still accumulating entries. http://no.wikipedia.org/wiki/Kategori:Stubber_- The templates are changed so use of {{REVISION..}}} is not within <includeonly>.
Sounds like problems with refresh jobs, which was not using any revid when reparsing the pages, that results in using the preview mode for REVISION* and that is empty string. Looks fixed now.