Page MenuHomePhabricator

Register: Check if the event page belongs to the wiki when a user accesses Special:RegisterForEvent
Closed, ResolvedPublic2 Estimated Story Points

Description

As an organizer, I only users who go to Special:RegisterForEvent for my event (but on a wiki that is not the event wiki) to be redirected to the wiki of the event, so that users who are blocked on the local wiki of the event cannot register for the event.

Acceptance Criteria:

  • Given a user goes to Special:RegisterForEvent/{eventID}
    • And the event ID does not belong to the wiki where the user is trying to access the page
      • Then we display the following text: "Please complete your event registration on [wiki name], the wiki where the event was created."
        • Hyperlink to the proper wiki Special:RegisterForEvent/{eventID} on the following text: "complete your event registration on [wiki name]"
          • Note that the wiki name should be displayed as a URL (such as en.wikipedia.org) rather than the DB name
  • Given a user tries to register using the "Register for event" API endpoint
    • And the event does not belong to the current wiki
    • Then they should receive a 4xx response with an error message similar to the one above
    • And this new error should be documented on mediawiki.org

Design:
Design Specs

image.png (706×2 px, 105 KB)

Event Timeline

ifried added a subscriber: gonyeahialam.

Hello, @gonyeahialam! Can you add in a visual example in the "Visual example" section of this task? Thank you in advance!

Hello, @gonyeahialam! Can you add in a visual example in the "Visual example" section of this task? Thank you in advance!

Done

ifried updated the task description. (Show Details)
ifried updated the task description. (Show Details)
ifried set the point value for this task to 3.Mar 4 2024, 7:07 PM
ifried updated the task description. (Show Details)
ifried changed the point value for this task from 3 to 2.Mar 5 2024, 5:17 PM
Daimona updated the task description. (Show Details)
Daimona updated the task description. (Show Details)
cmelo changed the task status from Open to In Progress.Mar 14 2024, 1:45 PM
cmelo claimed this task.

Change 1011144 had a related patch set uploaded (by Cmelo; author: Cmelo):

[mediawiki/extensions/CampaignEvents@master] Add notice for when a user tries to register for an event on another wiki

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

Change 1011169 had a related patch set uploaded (by Cmelo; author: Cmelo):

[mediawiki/extensions/CampaignEvents@master] Add error message in case user the tries to use the register API on another wiki

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

Change 1011144 merged by jenkins-bot:

[mediawiki/extensions/CampaignEvents@master] Add notice for when a user tries to register for an event on another wiki

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

Daimona changed the task status from In Progress to Stalled.Mar 21 2024, 1:25 PM
Daimona subscribed.

Blocked on T312568.

Moved to in review after team discussion on how we will unblock this work, which is: Remove open/close in all cases (whether on the local or foreign wiki) from the kebab menu, and redirect users to special delete page if on a foreign wiki

Daimona changed the task status from Stalled to Open.Apr 4 2024, 2:31 PM

Change #1011169 merged by jenkins-bot:

[mediawiki/extensions/CampaignEvents@master] Add error message in case user the tries to use the register API on another wiki

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

Change #1018769 had a related patch set uploaded (by Cmelo; author: Cmelo):

[mediawiki/extensions/CampaignEvents@master] Bold register and delete-registration non local message

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

Given a user goes to Special:RegisterForEvent/{eventID}
And the event ID does not belong to the wiki where the user is trying to access the page
✅ Then we display the following text: "Please complete your event registration on [wiki name], the wiki where the event was created."
✅ Hyperlink to the proper wiki Special:RegisterForEvent/{eventID} on the following text: "complete your event registration on [wiki name]"
Note that the wiki name should be displayed as a URL (such as en.wikipedia.org) rather than the DB name

Screenshot 2024-04-10 at 12.52.09 PM.png (550×2 px, 86 KB)

(Note that the link will be correctly made bold to match the comp when this patch is merged.)


Given a user tries to register using the "Register for event" API endpoint
And the event does not belong to the current wiki
✅Then they should receive a 4xx response with an error message similar to the one above

Screenshot 2024-04-10 at 3.43.24 PM.png (462×1 px, 84 KB)

❌ And this new error should be documented on mediawiki.org
@cmelo Please set organizers on arwiki, the wiki where the event was created needs to be added to the Register as a participant documentation on mediawiki.org

Given a user goes to Special:RegisterForEvent/{eventID}
And the event ID does not belong to the wiki where the user is trying to access the page
✅ Then we display the following text: "Please complete your event registration on [wiki name], the wiki where the event was created."
✅ Hyperlink to the proper wiki Special:RegisterForEvent/{eventID} on the following text: "complete your event registration on [wiki name]"
Note that the wiki name should be displayed as a URL (such as en.wikipedia.org) rather than the DB name

Screenshot 2024-04-10 at 12.52.09 PM.png (550×2 px, 86 KB)

(Note that the link will be correctly made bold to match the comp when this patch is merged.)


Given a user tries to register using the "Register for event" API endpoint
And the event does not belong to the current wiki
✅Then they should receive a 4xx response with an error message similar to the one above

Screenshot 2024-04-10 at 3.43.24 PM.png (462×1 px, 84 KB)

❌ And this new error should be documented on mediawiki.org
@cmelo Please set organizers on arwiki, the wiki where the event was created needs to be added to the Register as a participant documentation on mediawiki.org

✅ Error message is now documented on mediawiki.org

Final thing before sending to design sign off is This patch that makes the text bold to match the comp.

@vaughnwalters

❌ And this new error should be documented on mediawiki.org
@cmelo Please set organizers on arwiki, the wiki where the event was created needs to be added to the Register as a participant documentation on mediawiki.org

Done thanks, but the correct message is:
Please complete your event registration on xxx, the wiki where the event was created.

Change #1018769 merged by jenkins-bot:

[mediawiki/extensions/CampaignEvents@master] Bold register and delete-registration non local messages

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

Docs have been updated and link text is now bold, so I am sending this to design sign off

Screenshot 2024-04-15 at 2.41.28 PM.png (706×1 px, 131 KB)

We have finished the global implementation work and we have released the extension to another wiki (Igbo Wikipedia), so I'm marking this work as Done.