Page MenuHomePhabricator

"Add a link" menu half-freezes while using it to add an external link in source mode
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue

  1. Navigate to https://mediawiki.org/wiki/Project:Support_desk?safemode=1.
  2. Click the "Add topic" button at the top-right of the page.
  3. At the top-right of the box labeled "Description" within the 'new topic' area, click the "Source" button (to switch the box to source-mode).
  4. Click the "Link" icon in the toolbar (or press Ctrl/Cmd+K).
  5. In the "Add a link" box that appears, click "External site".
  6. Paste in/type a link to any external site.
  7. Click the "Insert" button at the top-right of the "Add a link" box.

What happens?
The link isn't inserted, the "Add a link" menu doesn't allow me to either insert the link or close the box, and I get the following error in the browser console:

Uncaught TypeError: can't access property "element", this.initialAnnotation is null
    getTeardownProcess ve.ui.MWWikitextLinkAnnotationInspector.js:307
screenshot.png (1,074×425 px, 35 KB)

What should have happened instead?:
Link should have been added / editor shouldn't've frozen.

Software version
1.45.0-wmf.18

Other information
Could repro on Chrome + Edge + Firefox. Haven't tried any others.

Event Timeline

A_smart_kitten renamed this task from "Add a link" menu half-freezes while using the "Add a link" box to add an external link in source mode to DiscussionTools "Add a link" menu half-freezes while using it to add an external link in source mode.Sep 16 2025, 5:19 PM
DLynch renamed this task from DiscussionTools "Add a link" menu half-freezes while using it to add an external link in source mode to "Add a link" menu half-freezes while using it to add an external link in source mode.Sep 16 2025, 8:50 PM
DLynch claimed this task.

Not a discussiontools issue per-se, it's really a 2017 wikitext editor issue.

Fair point :) I just discovered it myself when using DT and didn't test it in any other environments before filing this. (I tagged VisualEditor mainly based on the ve.ui within the console error, presuming because of it that VE might have something to do with this)

Change #1188885 had a related patch set uploaded (by DLynch; author: DLynch):

[mediawiki/extensions/VisualEditor@master] Wikitext link annotation inspector: check that initialAnnotation exists

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

Change #1188885 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Wikitext link annotation inspector: check that initialAnnotation exists

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

EAkinloose edited projects, added: Verified; removed: Editing QA.