Steps to replicate the issue (include links if applicable):
- Go to https://zh.wikipedia.org/wiki/Wikipedia:申请成为管理人员#User:Bosco_Sin
- Click any reply link ("回复") under the section "User:Bosco Sin"
What happens?:
Modal window shows:
TypeError: Cannot read properties of undefined (reading '0')
Wikipedia:申请成为管理人员 transcludes its subpage /申請區 (title in zh-hant), which gets automatically resolved by the Language Converter (LC) to the existing page Wikipedia:申请成为管理人员/申请区 (title in zh-hans). Note that the page with the exact title /申請區 does not exist. On zhwiki, sometimes a redirection page to the other variant is created ("繁简重定向"), however it's not always done, as the LC can handle that.
The action=discussiontoolspageinfo API response shows Wikipedia:申请成为管理人员/申請區 in the transcludedfrom object. Subsequent action=query&prop=revisions on this title fails because the title does not exist (the converttitles API parameter will invoke the LC to resolve the canonical title, which is helpful sometimes). I would not be surprised if Parsoid's incomplete support for LC is one of the reasons here.
Reply tool works correctly on the subpage /申请区, where the discussiontools-error-comment-is-transcluded message is shown. That's because the discussion is eventually transcluded from Wikipedia:申请成为管理员/Bosco Sin. That page is under full protection due to some local affairs, and reply tool gives the protectedpagetext message there.
What should have happened instead?:
Wikipedia:申请成为管理人员 should give normal error message, instead of a caught exception message.
Software version: 1.45.0-wmf.24