Page MenuHomePhabricator

Blocks loaded from `edit` raise an error
Closed, ResolvedPublicBUG REPORT

Description

errorLogger.js:19 TypeError: Cannot read properties of undefined (reading 'startsWith')
    at Proxy.loadFromData (block.js:289:27)

caused by

reasonOther.value = blockData.reason;

Reproduction steps:

  1. Go to Special:Block and enter a blocked user
  2. Click "edit" next to the block in the accordian

Expected:

  1. The block is loaded into the form for editing

Actual:

  1. TypeError: Cannot read properties of undefined (reading 'startsWith')

Derived Requirement

Ensure that the "edit" functionality in the Special:Block page loads block data without raising a TypeError when blockData.reason is undefined.

Test Case 1: Verify Block Data Loading Without Error When Using "Edit"

  1. Navigate to Special:Block on the Minerva skin.
  2. Enter the username of a previously blocked user in the input field.
  3. Click on the "edit" link in the accordion for the existing block.
  4. ✅❓❌⬜ AC1: Confirm that the block details are loaded into the form without raising a TypeError or other error in the console.

QA Results - Test Wiki

ACStatusDetails
1T383579#10458498

Event Timeline

Change #1110808 had a related patch set uploaded (by Samtar; author: Samtar):

[mediawiki/core@master] mediawiki.special.block: Ensure `parsedreason`

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

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

[mediawiki/core@master] SpecialBlock: Retrieve reason and parsedreason from API

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

Change #1110808 abandoned by Samtar:

[mediawiki/core@master] mediawiki.special.block: Ensure `parsedreason`

Reason:

see Id19ebe4cd387ca726cad1d966afc118dd58e488c

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

Change #1110885 merged by jenkins-bot:

[mediawiki/core@master] SpecialBlock: Retrieve reason and parsedreason from API

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

GMikesell-WMF updated Other Assignee, added: GMikesell-WMF.
GMikesell-WMF subscribed.

@Samwilson It is confirmed that the block details are loaded into the form without raising a TypeError or other error in the console as seen in the gif. I will move this to Done. Thanks for all your work!

Test Result - Test Wiki

Status: ✅ PASS
Environment: Test Wiki
OS: macOS Sequoia 15.2
Browser: Chrome 132
Device: MBA
Emulated Device: NA

Test Artifact(s):

https://test.wikipedia.beta.wmflabs.org/wiki/Special:Block/Betatester

Test Steps

Test Case 1: Verify Block Data Loading Without Error When Using "Edit"

  1. Navigate to Special:Block.
  2. Enter the username of a previously blocked user in the input field.
  3. Click on the "edit" link in the accordion for the existing block.
  4. AC1: Confirm that the block details are loaded into the form without raising a TypeError or other error in the console.

2025-01-14_07-48-33.mp4.gif (970×938 px, 536 KB)

GMikesell-WMF updated Other Assignee, removed: GMikesell-WMF.
GMikesell-WMF moved this task from QA to Done on the Community-Tech (Jackal (not a fox) Fox) board.