Page MenuHomePhabricator

Cross namespace page moves are filtered under the wrong namespace on Special:WhatLinksHere (LinksUpdate not updating il_from_namespace)
Closed, ResolvedPublicBUG REPORT

Description

List of steps to reproduce (step by step, including full links if applicable):

What happens?:

What should have happened instead?:

While looking at the issue from T299244 I have also seen that the column il_from_namespace is not updated for cross namespace moves

You can find affected files on replica by:

select distinct il_to, page_namespace as correct, il_from_namespace as wrong
  from page inner join imagelinks
    on page_id = il_from
   and page_namespace <> il_from_namespace;

185 rows in set (30.40 sec) for dewiki

But it seems there are also pages not broken by the current issue, there are looking older (no current move in history/log)

Software version (if not a Wikimedia wiki), browser information, screenshots, other information, etc.:

Event Timeline

Change 754064 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/core@master] Adjust il_from_namespace on cross namespace moves

https://gerrit.wikimedia.org/r/754064

Train blocker this week -> UBN!

RhinosF1 triaged this task as Unbreak Now! priority.Jan 17 2022, 3:22 PM

Hi @tstarling @daniel, pinging you since this (too) appears to be caused by the LinksUpdate refactor

Does this affect only the imagelinks table? Or does it also affect other tables that have a from_namespace field, like pagelinks and templatelinks?

Change 754547 had a related patch set uploaded (by Daniel Kinzler; author: Daniel Kinzler):

[mediawiki/core@master] MovePage: test links table updates

https://gerrit.wikimedia.org/r/754547

I think the patch by @Umherirrender fixes the issue. I added another regression test.

This ticket can probably be closed once the first patch is merged.

Change 754064 merged by jenkins-bot:

[mediawiki/core@master] Adjust il_from_namespace on cross namespace moves

https://gerrit.wikimedia.org/r/754064

Umherirrender claimed this task.

Does this affect only the imagelinks table? Or does it also affect other tables that have a from_namespace field, like pagelinks and templatelinks?

Yes, the other tables works.

But there also older "broken" namespaces in all tables, but that is T217647

Change 754547 merged by jenkins-bot:

[mediawiki/core@master] MovePage: test links table updates

https://gerrit.wikimedia.org/r/754547