Page MenuHomePhabricator

Update code that prevents moving event pages outside the event namespace
Closed, ResolvedPublic

Description

Context: currently, when trying to move an event page (with registration enabled) to a target outside the Event: namespace, we disallow the page move with the following message: This event page cannot be moved outside the {{ns:event}} namespace because it has, or had, event registration enabled.. This was implemented as part of T358704. Now we need to generalize this restriction so that pages with registration enabled cannot be moved to a namespace where event registration is not allowed.

Acceptance criteria

When I try to move a page with event registration enabled
AND the target namespace allows event registration
Then the page should be moved.

When I try to move a page with event registration enabled
AND the target namespace does not allow event registration
Then the page should not be moved
AND I should receive the following error: Event registration is not permitted in this namespace.

Event Timeline

Daimona renamed this task from [placeholder] Update code that prevents moving event pages outside the event namespace to Update code that prevents moving event pages outside the event namespace.Mar 14 2025, 9:29 PM
Daimona updated the task description. (Show Details)

Change #1131788 had a related patch set uploaded (by Mhorsey; author: Mhorsey):

[mediawiki/extensions/CampaignEvents@master] Allow page moves in permitted namespaces

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

Change #1131788 merged by jenkins-bot:

[mediawiki/extensions/CampaignEvents@master] Allow page moves in permitted namespaces

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

vaughnwalters subscribed.

When I try to move a page with event registration enabled
AND the target namespace allows event registration
✅ Then the page should be moved.

Screen Recording 2025-04-03 at 4.57.52 PM.gif (1×1 px, 1 MB)

When I try to move a page with event registration enabled
AND the target namespace does not allow event registration
✅ Then the page should not be moved
❌ AND I should receive the following error: Event registration is not permitted in this namespace.

Screen Recording 2025-04-03 at 4.59.37 PM.gif (1×1 px, 1 MB)

Screenshot 2025-04-03 at 5.09.17 PM.png (116×966 px, 16 KB)

This is functioning correctly, but the error message is The event page must be in one of the permitted namespaces. Does this just need changed in the AC @MHorsey-WMF

ifried subscribed.

@vaughnwalters, I just updated the AC. In that case, can it be moved to product sign-off?

This is functioning correctly, but the error message is The event page must be in one of the permitted namespaces. Does this just need changed in the AC @MHorsey-WMF

The gif shows changing the event page associated with event registration, but this task is about moving the event page. The error message sould be correct; the one you saw is from T387967.

This is functioning correctly, but the error message is The event page must be in one of the permitted namespaces. Does this just need changed in the AC @MHorsey-WMF

The gif shows changing the event page associated with event registration, but this task is about moving the event page. The error message sould be correct; the one you saw is from T387967.

Ah, thx @Daimona. I was testing the entirely wrong thing. This is working as expected with the error message Event registration is not permitted in this namespace. I'll revert the AC to this @ifried and move this to product sign off.

Acceptance criteria
When I try to move a page with event registration enabled
AND the target namespace allows event registration
✅ Then the page should be moved.

Screen Recording 2025-04-08 at 11.23.23 AM.gif (1×1 px, 637 KB)

When I try to move a page with event registration enabled
AND the target namespace does not allow event registration
✅ Then the page should not be moved
✅ AND I should receive the following error: Event registration is not permitted in this namespace.

Screenshot 2025-04-08 at 11.10.58 AM.png (1×1 px, 294 KB)

This feature is on the beta cluster and working as expected, so I am marking this work as done.