Last modified: 2012-01-03 09:18:32 UTC
If categories are included through templates, moving a page doesn't update its category links. A null edit resolves the problem. [[w:hu:Sablon:Népesség/Ciobanu]], [[w:hu:Kategória:Hibásan használt sablonok]].
Is this reproducible always, or did this just happen once?
Reproducible, any time.
Can you describe exact steps to reproduce? This is what I did to try to reproduce: *Created page http://hu.wikipedia.org/wiki/Szerkeszt%C5%91:Bawolff/testbug32946 with a template ( http://hu.wikipedia.org/wiki/Szerkeszt%C5%91:Bawolff/testbug32946-template ) The template contained a category [[hu:Kategória:User:Bawolff/testbug32946]]. * Moved [[hu:Szerkesztő:Bawolff/testbug32946]] to [[hu:Szerkesztő:Bawolff/testbug32946-moved]] * Both [[hu:Kategória:User:Bawolff/testbug32946]] and http://hu.wikipedia.org/w/api.php?action=query&list=categorymembers&cmtitle=category:User:Bawolff/testbug32946&cmprop=sortkey|sortkeyprefix|ids|title seemed to be updated to reflect the move, without requiring any null edits.
Oh, I just took a closer look at the template you linked. You mean that if the sortkey (prefix) for a category contains page-relative variables ({{PAGENAME}}, {{SUBPAGENAME}}, etc) they aren't updated on page move. I vaguely remember this being discussed when the new category stuff was being implemented. I don't really know what a good way of detecting that the sortkeyprefix depends on page name would be.
I set up the pages to reproduce the error. After a null edit you can repeat the procedure. Not the sort key is the problem, but the category listing itself. Even now there's a false listing in the [[[w:hu:Kategória:Hibásan használt sablonok]].
Mark, any reason why this was marked highest priority? Is there a workaround for this issue?
(In reply to comment #6) > [...] Is there a workaround > for this issue? Yes, just do a null edit. The number of people this would affect is somewhat limited. Only pages where categories are included based on a #if conditional that varies with something like {{PAGENAME}}, or people who stick things like {{PAGENAME}} in the sortkey, which I don't think is all that common (but that's just a guess. I don't know how common those two situations are in reality). re comment 4: >I don't really know what a good way of detecting that the >sortkeyprefix depends on page name would be. Actually, I suppose that doesn't overly matter, we could just add a RefreshLinksJob regardless of if its needed or not.
Created attachment 9745 [details] Patch to add a refreshLinksJob when moving a page. So one possible way of addressing this, is to on every page move add a RefreshLinksJob so that the page gets its links updated (at some point anyway). I'm not really sure if how i did that in this patch is right though, perhaps it should be just directly doing a LinksUpdate there (but then that could take a while if you have subpage option enabled, and also move 100 subpages at same time)
This has always been the case, hasn't it? What is the application for including {{PAGENAME}} in the category sort key? If it hasn't come up before then I assume it's fairly rare that it's required.
Not the sort key, but the category itself! Example: {{#ifeq: {{{2}}} | {{SUBPAGENAME}} | [[Category:Some tracking category]] }} On the moved page looks good, but on the category page doesn't. See also Bug 28876 [[28876]].
(In reply to comment #10) > Not the sort key, but the category itself! Example: > {{#ifeq: {{{2}}} | {{SUBPAGENAME}} | [[Category:Some tracking category]] }} > On the moved page looks good, but on the category page doesn't. > See also Bug 28876 [[28876]]. I assume neither will update. That doesn't answer my question though. I need to know why you want this, for the purposes of prioritisation.
(In reply to comment #11) Certain tracking categories like [[hu:Kategória:Hibásan használt sablonok]] lose their functionality. Templates like [[Template:Country data Washington]] have parameter values that have to match part of the page title.
*** Bug 30819 has been marked as a duplicate of this bug. ***
(In reply to comment #8) > Created attachment 9745 [details] > Patch to add a refreshLinksJob when moving a page. What about the rest of the page though ? Or is that already re-parsed when moving the page ? Because info/notice/message templates often change depending on in which namespace they are used.
(In reply to comment #14) > (In reply to comment #8) > > Created attachment 9745 [details] > > Patch to add a refreshLinksJob when moving a page. > > What about the rest of the page though ? Or is that already re-parsed when > moving the page ? Because info/notice/message templates often change depending > on in which namespace they are used. Yes, that's already done - the page_touched timestamp gets updated. However, it appears iAlex has (possibly accidentally) fixed this bug in r107636. Hence marking fixed