Page MenuHomePhabricator

Marking as reviewed + typing a message for creator sometimes doesn't write to article talk page and user talk page
Open, Needs TriagePublicBUG REPORT

Assigned To
None
Authored By
Novem_Linguae
Dec 8 2022, 7:26 PM
Referenced Files
Restricted File
Dec 12 2022, 8:33 PM
Restricted File
Dec 12 2022, 8:33 PM
F35860526: Screen Shot 2022-12-12 at 10.56.51 AM.png
Dec 12 2022, 8:30 PM
F35850215: Screen Shot 2022-12-09 at 7.07.51 PM.png
Dec 10 2022, 3:19 AM
F35850204: Screen Shot 2022-12-09 at 6.52.23 PM.png
Dec 10 2022, 3:19 AM
F35850193: Screen Shot 2022-12-09 at 6.53.03 PM.png
Dec 10 2022, 3:19 AM
F35847309: Screen Shot 2022-12-08 at 7.41.18 PM.png
Dec 9 2022, 3:55 AM

Description

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

  • Have PageTriage installed on a wiki
  • Log in, have "patrol" permission on a wiki
  • Go to an unreviewed article
  • Open "mark as reviewed" menu
  • Type "test" in the message box
  • Click "Mark as reviewed" button

What happens?:

  • Article is marked as reviewed
  • "Test" message NOT written to article talk page <----- bug
  • "Test" message NOT written to user talk page <----- bug

What should have happened instead?:

  • Article is marked as reviewed
  • "Test" message written to article talk page
  • "Test" message written to user talk page

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

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

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

@Novem_Linguae - I checked the scenario steps on testwiki wmf.13. When a patroller posts a message in the message box upon reviewing an article, the message will be posted to an article talk page and to a user's talk page (checked for users with two formats for user talk pages - Flow (to Structured data) and the threaded discussion)
The text box indicates where the message will be posted:

Screen Shot 2022-12-08 at 7.41.18 PM.png (486×1 px, 133 KB)

Novem_Linguae renamed this task from Marking as reviewed + typing a message for creator doesn't write the message to their user talk page to Marking as reviewed + typing a message for creator sometimes doesn't write to article talk page and user talk page.Dec 9 2022, 4:27 AM
Novem_Linguae updated the task description. (Show Details)

Looks like this is probably intermittent then. When I marked this as reviewed, it didn't post either of the messages (to article talk page, to user talk page):

https://test.wikipedia.org/wiki/Special:Log?type=&user=&page=MPGuy-newArticleTest&wpdate=&tagfilter=&wpfilters%5B%5D=newusers&wpFormIdentifier=logeventslist

Looks like this is probably intermittent then. When I marked this as reviewed, it didn't post either of the messages (to article talk page, to user talk page):

https://test.wikipedia.org/wiki/Special:Log?type=&user=&page=MPGuy-newArticleTest&wpdate=&tagfilter=&wpfilters%5B%5D=newusers&wpFormIdentifier=logeventslist

I also encountered somewhat intermittent behavior when it comes to posting messages when a page is reviewed. I'll do more testing to look into it more. However, the straightforward scenario seems to be working:

  1. User Tesetvinca10 creates a page Testvinca10 test1
  2. Patroller Etonkovidova goes to Testvinca10 test1 and clicks on the check icon to review the page.
  3. Patroller Etonkovidova enters Test text into the message box and clicks on Mark as reviewed (not on Send message).

The Special:Log shows that Etonkovidova reviewed Testvinca10 test1 at 02:51, 10 December 2022.

Screen Shot 2022-12-09 at 6.53.03 PM.png (208×2 px, 100 KB)

  1. The article Talk page - Talk:Testvinca10 test1 will have a message posted with the same timestamp:
    Screen Shot 2022-12-09 at 6.52.23 PM.png (516×2 px, 126 KB)
  2. User_talk:Testvinca10 will have a message posted with the same timestamp - 02:51, 10 December 2022

Screen Shot 2022-12-09 at 7.07.51 PM.png (890×2 px, 279 KB)

Below is the most likely scenario for a message not being posted; needs to be confirmed.
Testing note: re-check the following scenario

  • a patroller click the review icon
  • a patroller types some message
  • a patroller clicks Cancel to close Review popup
  • a patroller clicks the review icon - the text is still entered. A patroller clicks to confirm review - the message is not posted anywhere.
Chlod subscribed.

@Novem_Linguae asked for me on Discord saying this could be race condition, and it definitely does look like a race condition. Cursory look of mark.js shows that some parts branch off into asynchronous code without being awaited for, leading up to the issue. Same thing we had with T238025. Possible fix would be to do kind of the same thing in this change.

Chlod removed Chlod as the assignee of this task.Dec 10 2022, 8:01 AM

Striking previous comment, this is probably not a race condition since the page never reloads when marking as reviewed (which would lead to request drops).

This particular block from mark.js@72 looks particularly fishy.

// a note needs to be posted to article talk page when an article is marked as
// unreviewed and it meets the use case set in talkPageNote
if ( action === 'unreviewed' ) {
	that.talkPageNote( note, action, '' );
} else {
	that.hideFlyout( action );
}

This condition essentially blocks messages from sending completely if the action isn't "reviewing" a page. Since talkPageNote does, in fact, consider both "reviewed" and "unreviewed" actions, I wondered if that was intentional; this diff implies it is.

Removing this (and fixing it up, as right now it'll always not send anything) solves this issue. But this now means the message is automatically sent whenever the reviewer marks/unmarks a page for review. Though this may be ideal, it may be unexpected, given the section for sending a message is made completely separate relative to the rest of the box. In any case, that proposed solution can be found at P42665. Note that it does not inform a user of this behavior at all; this must be separately done by modifying the button contents on input or adding a static notice.

Deassigning myself, since this isn't race condition-related and discussion on the next step for this (that can be implemented by any interested developer) seems needed.

After some more testing, it looks like the "Mark as reviewed" and "Mark as unreviewed" buttons never submit a message to the creator. Perhaps this isn't a bug after all, but just unintuitive design.

When @Etonkovidova tested above, they added a step to the "steps to reproduce" of clicking the "Send message" button, which I wasn't doing.

Anything else to do here? Could...

  • close as invalid
  • add some text somewhere that makes the behavior clearer, i.e. "Marking as reviewed/unreviewed does not message the creator. Please use the form below to send messages."
  • rip "send message" stuff into its own menu to emphasize that it's different
  • change the "Mark as reviewed/unreviewed" button behavior to auto send a message if a user is picked AND there is text in the message box.

Thoughts?

I'd prefer #4, while also making it more obvious in the interface that this will happen. Doesn't have to happen in this ticket though.

After some more testing, it looks like the "Mark as reviewed" and "Mark as unreviewed" buttons never submit a message to the creator. Perhaps this isn't a bug after all, but just unintuitive design.

When @Etonkovidova tested above, they added a step to the "steps to reproduce" of clicking the "Send message" button, which I wasn't doing.

Anything else to do here? Could...

  • close as invalid
  • add some text somewhere that makes the behavior clearer, i.e. "Marking as reviewed/unreviewed does not message the creator. Please use the form below to send messages."
  • rip "send message" stuff into its own menu to emphasize that it's different
  • change the "Mark as reviewed/unreviewed" button behavior to auto send a message if a user is picked AND there is text in the message box.

Thoughts?

The current behavior/phrasing in the "Marking as reviewed" dialog is rather confusing, indeed. "Send a message" button implies that the message will be sent when "Mark as review" is clicked. In fact, two buttons work independently.
Somehow I cannot reproduce anymore the successful scenario i.e. when a message is posted to User talk page and to page Discussion page by clicking only on "Mark as reviewed" button.

The best option will be

  • change the "Mark as reviewed/unreviewed" button behavior to auto send a message if a user is picked AND there is text in the message box.

There are three dialog boxes

First time page for review is visited - cannot select a user to send a messageVisiting a page marked as reviewed - a user can be selectedPage was unreviewed - a recipient can be selected
Screen Shot 2022-12-12 at 10.56.51 AM.png (856×1 px, 178 KB)
{F35860644}{F35860645}