Page MenuHomePhabricator

Special:EditFocusArea doesn't warn about invalid FA ID
Closed, ResolvedPublicBUG REPORT

Description

It's possible to edit an existing focus area at e.g. Special:EditFocusArea/FA3, and trying to edit a non-existing one with a validly formatted ID results in an error message:

The focus area Community Wishlist/Focus areas/FA45 was not found or was not properly saved.

But editing an invalid ID (e.g. via Special:EditFocusArea/FOO doesn't show any warning and opens a blank form. Saving the form discards the entered ID.

Instead, an error should be shown, explaining that the focus area can not be saved with the given ID.


Derived Requirement

Ensure that when a user navigates to Special:EditFocusArea with an invalid Focus Area ID (e.g., FOO), the system displays an error message explaining that the focus area cannot be saved with the given ID. The form should not load in an editable state when the ID format is invalid.

Test Steps

Test Case 1: Validate behavior for valid existing Focus Area ID

  1. Navigate to 'Special:EditFocusArea/FA3' on beta wiki.
  2. Observe the page load.
  3. ✅❓❌⬜ AC1: Confirm that the existing Focus Area loads correctly for editing without any error message.

Test Case 2: Validate behavior for non-existing but validly formatted Focus Area ID

  1. Navigate to 'Special:EditFocusArea/FA45' on beta wiki.
  2. Observe the displayed message.
  3. ✅❓❌⬜ AC2: Confirm that an error message appears stating 'The focus area Community Wishlist/Focus areas/FA45 was not found or was not properly saved.'

Test Case 3: Validate behavior for invalid Focus Area ID format

  1. Navigate to 'Special:EditFocusArea/FOO' on beta wiki.
  2. Observe the page load and any displayed content.
  3. ✅❓❌⬜ AC3: Confirm that an error message is displayed explaining that the focus area cannot be saved with the given ID and the form does not open in an editable state and no blank form appears.

QA Results - Meta Beta

ACStatusDetails
1T403351#11279055
2T403351#11279055
3T403351#11279055

Event Timeline

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

Change #1195429 had a related patch set uploaded (by Samwilson; author: Samwilson):

[mediawiki/extensions/CommunityRequests@master] Show error for invalid entity ID on special pages

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

Change #1195429 merged by jenkins-bot:

[mediawiki/extensions/CommunityRequests@master] Show error for invalid entity ID on special pages

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

MusikAnimal changed the task status from Open to In Progress.Oct 14 2025, 5:56 AM
MusikAnimal changed the task status from In Progress to Open.Oct 14 2025, 6:57 AM
mikez-WMF triaged this task as Medium priority.Oct 14 2025, 7:16 PM

@Samwilson Confirmed an error should be shown, explaining that the focus area can not be saved with an invalid and/or non-existing ID, as seen in the videos below. I will mark this as Resolved. Thanks for all your work!

Derived Requirement

Ensure that when a user navigates to Special:EditFocusArea with an invalid Focus Area ID (e.g., FOO), the system displays an error message explaining that the focus area cannot be saved with the given ID. The form should not load in an editable state when the ID format is invalid.

Test Result - Meta Beta

Status: ✅ PASS
Environment: Meta Beta
OS: macOS Tahoe 26.0.1
Browser: Chrome 141
Device: MBA
Emulated Device: NA

Test Artifact(s):

Test Steps

Test Case 1: Validate behavior for valid existing Focus Area ID

  1. Navigate to 'Special:EditFocusArea/FA3' on beta wiki.
  2. Observe the page load.
  3. AC1: Confirm that the existing Focus Area loads correctly for editing without any error message.

Test Case 2: Validate behavior for non-existing but validly formatted Focus Area ID

  1. Navigate to 'Special:EditFocusArea/FA45' on beta wiki.
  2. Observe the displayed message.
  3. AC2: Confirm that an error message appears stating 'The focus area Community Wishlist/Focus areas/FA45 was not found or was not properly saved.'

Test Case 3: Validate behavior for invalid Focus Area ID format

  1. Navigate to 'Special:EditFocusArea/FOO' on beta wiki.
  2. Observe the page load and any displayed content.
  3. AC3: Confirm that an error message is displayed explaining that the focus area cannot be saved with the given ID and the form does not open in an editable state and no blank form appears.

GMikesell-WMF updated the task description. (Show Details)
GMikesell-WMF updated Other Assignee, added: GMikesell-WMF.
GMikesell-WMF updated Other Assignee, removed: GMikesell-WMF.