Page MenuHomePhabricator

Show patrol link regardless of whether preview is shown (Was: Edits can't be patrolled on Commons by users who have the user preference "Do not show page content below diffs" enabled)
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

What happens?:
No patrol link shows at bottom of page

What should have happened instead?:
Patrol link should show

Software version (skip for WMF-hosted wikis like Wikipedia):

Other information (browser name/version, screenshots, etc.):

Original report

Edits can't be patrolled on Commons since this morning (CET).
This was reported by at least 2 persons, i.e. https://commons.wikimedia.org/w/index.php?title=Commons:Village_pump/Technical&oldid=852015656#Patrol_interface_changed?

Example: this edit doesn't seem to be patrolled (i.e. not in the log https://commons.wikimedia.org/wiki/Special:Log?type=patrol&user=&page=Commons%3AAdministrators%27+noticeboard&wpdate=&tagfilter=&wpFormIdentifier=logeventslist), but it can't be patrolled, and the user is not autopatrolled.

Other information (browser name/version, screenshots, etc.):
Chrome on Windows 10, Monobook skin.

Event Timeline

When will it be fixed? That's becoming annoying.

matej_suchanek subscribed.

Is there an error message or does the button just not display?
The change is in the database:

+------------+----------------+--------------+
| rc_id      | rc_timestamp   | rc_patrolled |
+------------+----------------+--------------+
| 2434470175 | 20240215162738 |            0 |
+------------+----------------+--------------+

No, no error message. I can give patroller right to some developers for debugging.

Apparently, there was an issue with the patrol button not showing up last week: T357213. I'm not sure if it is related, but it would be a weird coincidence...

Thanks for the ping @matej_suchanek this does sound very odd. The change there simply moved the button it shouldn't have had any changes to the logic.

I'm seeing patrol edits on https://commons.wikimedia.org/wiki/Special:Log?type=patrol&user=&page=&wpdate=&tagfilter=&wpFormIdentifier=logeventslist - so it seems patrolling is working to can you provide some more information - is it only certain types of pages impacted?

I'll give myself temporary patroller rights on Commons later today to see if I can get any more information about this issue.

Chrome on Windows 10, Monobook skin.

Could be this skin-specific?

Jdlrobson changed the task status from Open to Stalled.Feb 20 2024, 9:05 PM

I am seeing the patrol link on all skins all the bottom of the page and in the diff (including in the example @Yann gave ). @Yann do you have any user gadgets / scripts enabled that may be interfering? Does the link show on this URL: https://commons.wikimedia.org/w/index.php?title=Commons:Administrators%27_noticeboard&curid=1067011&diff=852012387&oldid=852006505&useskin=vector-2022&safemode=1 ?

Screenshot 2024-02-20 at 1.00.08 PM.png (1×2 px, 695 KB)

Screenshot 2024-02-20 at 1.00.22 PM.png (1×3 px, 623 KB)

Screenshot 2024-02-20 at 1.00.42 PM.png (1×1 px, 647 KB)

Screenshot 2024-02-20 at 1.02.02 PM.png (1×2 px, 426 KB)

@Yann i'm noticing you are an admin - https://commons.wikimedia.org/w/index.php?title=Special%3AUserRights&user=Yann - if you check the patroller box there does that fix anything? If so perhaps this is some kind of permission error?

This error is when patrolling a diff. Patrolling works for pages / files, etc.

It doesn't work for me. I also tried with 2 other skins (Vector 2010 and Vector 2022), and with adding the patroller right.

I am seeing the patrol link on all skins all the bottom of the page and in the diff (including in the example @Yann gave ). @Yann do you have any user gadgets / scripts enabled that may be interfering? Does the link show on this URL: https://commons.wikimedia.org/w/index.php?title=Commons:Administrators%27_noticeboard&curid=1067011&diff=852012387&oldid=852006505&useskin=vector-2022&safemode=1 ?

I didn't change any setting or add any gadget. It worked until February 14th.

This comment was removed by Jony.

I see the link on fully opened diff pages. But on RTRC (https://meta.wikimedia.org/wiki/User:Krinkle/Tools/Real-Time_Recent_Changes) the links are missing.

I tested it also on a non admin patroller account with the same result. Vector 2010 or 2022 also does not make any difference.

I am seeing the patrol link on all skins all the bottom of the page and in the diff (including in the example @Yann gave ). @Yann do you have any user gadgets / scripts enabled that may be interfering? Does the link show on this URL: https://commons.wikimedia.org/w/index.php?title=Commons:Administrators%27_noticeboard&curid=1067011&diff=852012387&oldid=852006505&useskin=vector-2022&safemode=1 ?

I didn't change any setting or add any gadget. It worked until February 14th.

@Yann could you please try https://meta.m.wikimedia.org/wiki/User:Pathoschild/Scripts/Ajax_sysop maybe it will works for you.

I tested it on all skins, it’s works only on Minerva skin!

Jdlrobson renamed this task from Edits can't be patrolled on Commons to Edits can't be patrolled on Commons by users who have the user preference "Do not show page content below diffs" enabled.Feb 21 2024, 9:06 PM
Jdlrobson changed the task status from Stalled to Open.
Jdlrobson updated the task description. (Show Details)

We think we've identified the issue here. The current workaround is to unset the preference "Do not show page content below diffs" or to add the following CSS to your Special:MyPage/common.css:

.patrollink.patrollink-diffonly { display: block; }

Change 1005602 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/core@master] Restore patrol link for users who have disabled previews

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

Finally found that DifferenceEngine was modified and then I found this task. T357213 caused some community noises on frwiki too and yes, the problem is only met by editors with "Do not show page content below diffs" enabled. Thanks for the reporting @Yann, and @Jdlrobson for the permanent fix.

The code is very misleading:

// Patrol link is hidden when no preview shows, unless the user has specifically
// opted out of previews via user preference (T357693).
$showPatrolLink = $userRequestedDiffOnly ? false : $diffOnly;

(then, $showPatrolLink gets passed as argument to the markPatrolledLink() method, as the $isDiffOnly parameter)

Thus, $showPatrolLink has to be "false" in order to show the link… !!

Also, if user requested diff only, in markPatrolledLink() we have $isDiffOnly == false and the class patrollink-diffonly class is not added... That's what is expected, but the variable and the class have become badly named, because of the new use case that has appeared since then.

Change 1005857 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/core@master] Always show patrol link regardless of whether in diff-only mode

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

The code is very misleading:

The code is confusing because the behaviour here is very confusing.
Personally I think we should just always show the patrol link.

In T357213#9531430 @Nardog stated that the patrol link should never show for editors viewing diff only as "You shouldn't be marking pages you haven't seen in parsed whole as patrolled." but with this new information that doesn't seem true to me and this view seems in direct conflict with this bug report.

How do we feel about always showing the preview link? The code would look a lot simpler https://gerrit.wikimedia.org/r/1005857

Indeed, if it's present in mobile diff then we might as well show it always.

Agree too for always showing the links.

Case in point, looking at the diff is often sufficient to determine if the edit is legit or not. Indeed, most times I only look at the diff. And it seems that many editors would agree (and some of them even configured their account to completely remove the page preview…)

A quick search shows that the $isDiffOnly argument doesn't seem to be used outside MediaWiki core, should removing it should be safe.

Change 1005857 merged by jenkins-bot:

[mediawiki/core@master] Always show patrol link regardless of whether in diff-only mode

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

Thanks all! Okay, so this change will currently go out with next week's deployment and will be out everywhere on 29th February. If that's too long to wait, I can hopefully get it out sooner on Monday (we avoid deployments on Fridays). You are invited to test on the beta cluster in the mean time (let me know if you need temporary user rights there - https://en.wikipedia.beta.wmflabs.org/).

Change 1005602 abandoned by Jdlrobson:

[mediawiki/core@master] Restore patrol link for users who have disabled previews

Reason:

We will now enable patrol link for all your users regardless of whether diff is shown

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

Jdlrobson renamed this task from Edits can't be patrolled on Commons by users who have the user preference "Do not show page content below diffs" enabled to Show patrol link regardless of whether preview is shown (Was: Edits can't be patrolled on Commons by users who have the user preference "Do not show page content below diffs" enabled).Feb 23 2024, 6:05 PM
TheDJ claimed this task.
TheDJ subscribed.

Calling it closed as this was deplooyed