As you can see here, it's impossible to thank for edits done with the ContentTranslation tool. This shouldn't be the case.
Description
Details
Subject | Repo | Branch | Lines +/- | |
---|---|---|---|---|
Allow thanking discontinuous revisions | mediawiki/extensions/Thanks | master | +5 -1 |
Related Objects
- Mentioned In
- T206587: Overhaul the undelete feature with a "pagearchive" table
T193690: RFC: How should we fix the undeletion system?
T206360: Special:Import does not preserve Tag:ContentTranslation
T186590: Don't apply Compact Language Links to pages with the noexternallanglinks magic word - Mentioned Here
- T206360: Special:Import does not preserve Tag:ContentTranslation
rETHA75c88532653e: Remove misleading Thank button from some diffs
T59721: Thanks: Don't show Thank-you buttons for diffs spanning multiple edits
Event Timeline
I'm not sure why is it impossible to thank using your link.
It's possible to thank using this link.
Maybe it's because of type=revision?
This isn't the same diff, @Amire80. The thanks link is displayed neither in the history nor in the diff.
There's a rev_parent_id discontinuity in that page's history. I think it might be because the edit you're pointing to is the one that originally created the page (since it has rev_parent_id=0), and there is imported history that comes before it chronologically.
There's a line in ThanksHooks::insertThankLink() that checks for rev_parent_id continuity (( !$oldRev || $rev->getParentId() == $oldRev->getId() )), which would cause this revision to not have a thank link because of the discontinuity. But I'm not sure why that check is there.
It was added in rETHA75c88532653e: Remove misleading Thank button from some diffs to fix T59721: Thanks: Don't show Thank-you buttons for diffs spanning multiple edits, but it looks like that had an unintentional effect on the history page too.
From the duplicate:
As someone reported (on DeWP technical workshop, TWS) the thanks button is missing on imported versions but curiously not in the mobile version (or per special page: https://de.wikipedia.org/wiki/Special:Thanks/173093813):
https://de.wikipedia.org/wiki/Spezial:MobileDiff/173093813
https://de.wikipedia.org/wiki/Spezial:Diff/173093813
In case this helps with triaging, this issue came up at the German-language Wikipedia's Village Pump today.
Specifically, the user wondered why they could not thank another user for this translation (oldid is younger than curid).
Some options for resolving this:
- Revert rETHA75c88532653e: Remove misleading Thank button from some diffs
- Revert rETHA75c88532653e: Remove misleading Thank button from some diffs, and on Special:Thanks/{revId} (e.g. https://de.wikipedia.org/wiki/Spezial:Danke/173093813) load the diff summary of {revId} and previous revision so the user has context about what specifically they are thanking
- Modify code so that functionality from rETHA75c88532653e: Remove misleading Thank button from some diffs is retained (do not allow "thanks" for diff of multiple revisions) but add an exclusion for cases when there is a content translation, which we'd somehow have to detect
- Revert rETHA75c88532653e: Remove misleading Thank button from some diffs and modify the code to look at adjacent revisions (i.e. ( !$oldRev || $rev->getPrevious()->getId() == $oldRev->getId() )) rather than the existing logic of ( !$oldRev || $rev->getParentId() == $oldRev->getId() )
AFAICT the option #4 would preserve the initial fix for diff pages spanning multiple revisions while allowing thanks links for history entries for pages with discontinued revisions.
Change 461709 had a related patch set uploaded (by Sbisson; owner: Sbisson):
[mediawiki/extensions/Thanks@master] Allow thanking discontinued revisions
In the patch above, I've just implemented @kostajh's suggestion #4. He has done the work of figuring it out.
Change 461709 merged by jenkins-bot:
[mediawiki/extensions/Thanks@master] Allow thanking discontinuous revisions
Re-checked the links - the diffs have 'danken' links, so from diff 'thank' action could be done:
and in history too:
@Amire80 There seem to be some deficiencies when an article that was translated is imported via Special:Import log - filed as T206360: Special:Import does not preserve Tag:ContentTranslation .