Page MenuHomePhabricator

mkwiki pages missing langlinks entries even though linked with a Wikidata item
Closed, ResolvedPublicBUG REPORT



  1. See mk:Категорија:Леднички земјишни облици and the correctly displayed language links there (and the corresponding Wikidata item).
  2. Compare with an API example reporting the page has no language links. (And the same shows in the langlinks database replica on Toolforge.)

I have received an error report about my Toolforge tool not working for some recently created categories on mkwiki.

The problem seems to be that some pages on mkwiki are missing entries in the langlinks table, even though the page is linked with a Wikidata item with many sitelinks, and the Wikipedia category page even displays those links correctly.

However, there are no langlink rows for the page in the Toolforge database replica, and the mkwiki API returns no langlinks for the page as well: See an API example contrasting the missing langlinks with another recently created category, which lists them correctly.

I guess this probably comes from some issue when syncing/updating changes in Wikidata to the local wiki database. It might be the same or similar issue as reported in T297238? (In that case, feel free to mark this a duplicate.) However, even though I understand distributed systems will necessarily experience similar issues, I am not sure if there is any remedy available: Would any edit to the respective Wikidata item help force the refresh? Or removing and re-adding the corresponding mkwiki sitelink from Wikidata? Purging some of the pages? Something else?

Event Timeline

@Manuel Do you know if this is the same issue as T233520 which is being worked on atm?

At the first glance, I did not think so, but reading the comments in T297238 it actually might be. @Michael could you please help us clarify?

Purging some of the pages?

Purging the pages in mkwiki should always fix these things.

There was a problem with sitelinks having been newly added to Wikidata, but this should have been fixed since about a week ago.

Is it known whether new instances of this issue occurred _this week_? Or is it just holdovers from before? In the latter case, purging those pages on mkwiki should be good enough to fix it.

Based on our tracking: Langlinks should appear properly for sitelinks added after Thursday last week:

Though it might take a while for them to actually appear on the mkwiki page. If I remember correctly, then the job that purges the page isn't high priority (as opposed to the job that injects the change into the recent changes and watchlists)

Purging some of the pages?

Purging the pages in mkwiki should always fix these things.

“These”? Meaning “interwiki links are correctly displayed in the sidebar, but are not present in the sitelinks table and the API does not return them”? OK, so I went ahead and purged the mkwiki category page. It dit not fix the problem.

Though it might take a while for them to actually appear on the mkwiki page.

Well, as the links have been visible on the mkwiki page from the very beginning, it’s probably not very surprising the interwiki links do still appear on the category page, but the API request still does not return them.

Ah, then I misunderstood the issue and confused it with a similar sounding one. I'm sorry, I will take another look at what is going on here.

So after looking into it some more and some pointers from a colleague:

Originally, this seems to indeed having been caused by sometimes not scheduling the correct job if a new sitelink was added. That was fixed, and that fix is deployed since about January 20th. So for sitelinks being added after that, this should not be happening anymore.

To fix pages from before that, a purge is indeed not enough. It needs a purge with forced links update. This can be done via the api. A null-edit probably also works.

While this should work automatically for future sitelinks being added to Wikidata, the job which triggers that refresh of links has currently a backlog of over 3 days.

Thank you for your thorough investigation, @Michael!

@Mormegil, does this help?

The links were correctly updated and seem to be correct now, thanks!