Page MenuHomePhabricator

Why does Special:EnableEventRegistration validate 'Event' titles as NS_MAIN instead of NS_EVENT?
Closed, InvalidPublic

Description

When entering an event title in Special:EnableEventRegistration, the system incorrectly treats it as being in NS_MAIN instead of NS_EVENT. This results in a wrong URL like /wiki/Test instead of /wiki/Event:Test.

Steps to Reproduce

  • Go to Special:EnableEventRegistration.
  • Enter an event title, e.g., Test
  • Fill out all other required fields
  • Press "Enable registration"

The system displays the error:

Test is not in the "Event" namespace.

The generated URL is /wiki/Test (NS_MAIN) instead of /wiki/Event:Test (NS_EVENT).

🤔 Expected Behavior
The title should be recognized as part of the Event namespace.
No incorrect namespace validation should occur.

I need someone to solve this doubt for me

Event Timeline

What is described here seems the expected behaviour. The page selector field is the same used on other pages (for example, Special:WhatLinksHere, Special:ComparePages, Special:Log), and it requires you to enter the full page title. Letting it accept a page title with an implicit namespace is not supported by the component we are using, and it would be a departure from the standard behaviour of this field that is expected on every other place where it's used. On top of that, we'll soon be working on allowing registration outside of the Event: namespace (T385341), at which point this field would require specifying the full page name anyway.

As it stands, this task should probably be closed as invalid, but I'd be happy to answer more questions, also in case I misunderstood what is being asked.

Per above, this seems to be the intended behaviour. Please feel free to reopen if I misunderstood something.

accept[ing] a page title with an implicit namespace is not supported by the component we are using

For posterity, I was wrong on this. It is supported, although it isn't commonly used: the only examples I could find in WMF production are Special:RandomInCategory and Special:Categories. Nonetheless:

we'll soon be working on allowing registration outside of the Event: namespace (T385341), at which point this field would require specifying the full page name anyway.

This is currently being worked on, so the conclusion above is still valid.