ContentTranslation is not adding pages sitelinks to wikidata
Closed, ResolvedPublicBUG REPORT

Description

For few last days is ContentTranslation not adding translated pages sitelinks to their properties on wikidata.
For example: page translated today and mannualy added sitelink on wikidata.

Event Timeline

Pginer-WMF added subscribers: Jpita, Pginer-WMF.

Thanks for reporting, @Janbery.
In the past we have experienced both (a) this workflow to be broken because some changes on how Wikidata works, and (b) the workflow seems broken but it was just an effect of the cache (T228893 can alleviate the issue in some cases in the future).

This may be an issue that is hard to reproduce to investigate further, so any additional detail will be appreciated (e.g., errors on Javascript console). Please, let us know if the problem repeats and the link is not added even after a while when adding "?action=purge" to the url.

@Jpita can you test the Wikidata publishing part to check it works?
Thanks!

Pginer-WMF moved this task from Needs Triage to Bugs on the ContentTranslation board.

Hey @Pginer-WMF, thank you. It was sometimes working and sometimes not, in period of few days. I will looks trough my history and try to put more examples there. Sadly, I don't have reports from console, I was not thinking about that.
Maybe it was just issue after that incident. I will try to get more "evidence".

I found this one was added manually too (3 days ago).
I was writing articles in "challenge", so every day new article. Every other day between 6. 4. and 17. 4. was okay.

@Pginer-WMF I tried to create a new article using the content translation tool.
Once the translation is done and published, the wikidata link is not added (as expected, it's not done immediately).
But once I purge the cache the link shows up.
I don't know if we should be doing the purge after publishing or if there's another process that should be doing it.

I was writing articles in "challenge", so every day new article. Every other day between 6. 4. and 17. 4. was okay.

On other articles it was added immediately, sitelinks was visible on page, after page incomes from ContentTranslate tool.

@Pginer-WMF I tried to create a new article using the content translation tool.
Once the translation is done and published, the wikidata link is not added (as expected, it's not done immediately).
But once I purge the cache the link shows up.
I don't know if we should be doing the purge after publishing or if there's another process that should be doing it.

The purge is expected to happen automatically after publishing on the newly created page. There is a proposal for doing it also for the source page (T228893), but the purging of the target page should happen automatically already. If that's not the case, that would be a regression. Can you confirm that the purge is not happening at all after publishing, or whether there is any error message indicating why the purging process may fail?

I just translated this article and it was immediately added to wikidata.
I tried the same with this article and was not immediately added, it took a couple of minutes.

The only difference I see is that the linked one has categories and the other doesn't.

In the end both ended up linked without purging.

Pginer-WMF claimed this task.
Pginer-WMF added a subscriber: Nikerabbit.

In the end both ended up linked without purging.

Thanks for the investigation. I'll mark the issue as resolved. We can reopen if a reproducible issue persists in the future.
At some point we can also consider T228893: Purge source article after publishing a translation to ensure the update of interlanguage links

The only difference I see is that the linked one has categories and the other doesn't.

@Nikerabbit was recently involved in fixing an issue with categories and publishing, maybe he knows if there is anything special when publishing with categories that may result in the automatic purging to be delayed or work differently for some reaoson?

No relation to categories as far as I can think.

No relation to categories as far as I can think.

ok. Thanks, for taking a look!

Change 620532 had a related patch set uploaded (by Santhosh; owner: Santhosh):
[mediawiki/extensions/ContentTranslation@master] Publish: Fix broken wikidata linking

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

Change 620532 merged by jenkins-bot:
[mediawiki/extensions/ContentTranslation@master] Publish: Fix broken wikidata linking

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

Change 621497 had a related patch set uploaded (by KartikMistry; owner: Santhosh):
[mediawiki/extensions/ContentTranslation@wmf/1.36.0-wmf.5] Publish: Fix broken wikidata linking

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

Change 621498 had a related patch set uploaded (by Eranroz; owner: Eranroz):
[mediawiki/extensions/Wikibase@master] Revert "Migrate wikibase.api module to repo and use it directly in client"

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

need to wait for next week for the deployment, can't be tested in cx2

Change 621498 abandoned by Eranroz:
[mediawiki/extensions/Wikibase@master] Revert "Migrate wikibase.api module to repo and use it directly in client"

Reason:

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

Change 621497 merged by jenkins-bot:
[mediawiki/extensions/ContentTranslation@wmf/1.36.0-wmf.5] Publish: Fix broken wikidata linking

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

Mentioned in SAL (#wikimedia-operations) [2020-08-24T11:41:58Z] <urbanecm@deploy1001> Synchronized php-1.36.0-wmf.5/extensions/ContentTranslation/modules/publish/ext.cx.wikibase.link.js: 74a87184408937bcdb4a27f1f563bbbdff45cf97: Publish: Fix broken wikidata linking (T249458) (duration: 00m 58s)