Page MenuHomePhabricator

Verify page-linked notification works correctly for pages created by Temporary account owners
Open, Needs TriagePublic

Description

Split from T402556: InvalidArgumentException: MediaWiki\User\Options\UserOptionsManager::saveOptionsInternal was called on IP or temporary user.

Notifications (Echo) include the page-linked ("Notify me when someone links to a page I created from another page") notification. This notification is sent whenever a mainspace page created by user A is linked from another mainspace page by user B.

This notification includes a mute button that allows the user to mute further notifications regarding that page:

image.png (1,896×667 px, 127 KB)

Following the changes made in T402556, this button likely gets stuck for Temporary account holders (this is because it is ultimately backed by user preferences, and Temporary accounts do not have any preferences, making the button fail).

However, @Urbanecm_WMF had some issues reproducing the situation (to get the screenshot above), so it is not clear what the level of breakage in production is ATM. We should check the following:

  • Is there a page-linked notification fired for pages that were created by a Temporary account?
    • Expected behaviour: The notification should exist, as notifications should generally work the same for named and temporary accounts.
    • Current behaviour: So far, @Urbanecm_WMF did not manage to get a notification appear (using regular ways), but I might be missing something.
  • If the page-linked notification can be triggered, does it have the muting link?
    • Expected behaviour: No mute link is included, as muting is not technically possible for Temporary accounts.
      • If we really want to, we might add a clever "register to do this" prompt, but (a) I have no idea how that could look like (b) the notification would not appear in the new account, meaning there wouldn't be any link to re-click.
    • Current behaviour: When I hack the notification in, the link just gets stuck (with an error visible in the Network tab.

Event Timeline

@Etonkovidova, would it be possible to double check my observations? Also if you think of any other "shady" behaviour, I'd appreciate knowing about it.

@KStoller-WMF @AAlhazwani-WMF If you have any thoughts from design/product perspective, feel free to speak up.

FWIW, I'm fairly certain I'm doing something wrong when wanting to trigger the page-linked notification. On production DB, I can see such notifications getting triggered on eg. kowiki (I was testing on testwiki).

@Urbanecm_WMF - I check the scenario on cswiki beta

  • a temp user creates a page
  • another user links a page to that page

Results:

  • as far as I could see, no page-linked notifications are received by a temp user. I double-checked whether page-linked notifications worked in beta - no issues with getting page-linked notifications in general
  • I checked beta cluster db - cswiki doesn't show temp users received page-linked; dewiki- shows that some old temp users did receive page-linked notifications. Maybe such notification behavior has been corrected?

My test temp user on cswiki beta - user_id: 581

  • created a page
  • that page got 'thank'
  • a link to that page was created by another user user_id: 581 got:
select * from echo_event where event_agent_id=581\G
*************************** 1. row ***************************
      event_id: 31992
    event_type: thank-you-edit
event_agent_id: 581
event_agent_ip: NULL
   event_extra: {"editCount":1,"revid":4822}
 event_page_id: 3197
 event_deleted: 0
*************************** 2. row ***************************
      event_id: 31995
    event_type: page-linked
event_agent_id: 581
event_agent_ip: NULL
   event_extra: {"target-page":3197,"link-from-page-id":3197,"revid":4826}
 event_page_id: 3157
 event_deleted: 0
2 rows in set (0.034 sec)

But

select * from echo_notification where notification_user=581\G
*************************** 1. row ***************************
         notification_event: 31992
          notification_user: 581
     notification_timestamp: 20250903223855
notification_read_timestamp: NULL
   notification_bundle_hash: 
*************************** 2. row ***************************
         notification_event: 31993
          notification_user: 581
     notification_timestamp: 20250903224126
notification_read_timestamp: NULL
   notification_bundle_hash: 6956e93c72feb3d69f42accfb08b01bc
2 rows in set (0.001 sec)

notification_event: 31993 is

(cswiki)> select * from echo_event where event_id=31993\G
*************************** 1. row ***************************
      event_id: 31993
    event_type: edit-thank
event_agent_id: 75
event_agent_ip: NULL
   event_extra: {"revid":4822,"source":"history","excerpt":" ","revcreation":true,"recipients":[581]}
 event_page_id: 3197
 event_deleted: 0
1 row in set (0.001 sec)

The UI:

Screenshot 2025-09-03 at 6.46.21 PM.png (2,680×1,186 px, 208 KB)