Page MenuHomePhabricator

An empty extension shows up as "undefined" inside the Media/Gallery dialog
Closed, DuplicatePublic

Description

Steps to reproduce:

  1. Open any page on Beta cluster within VE.
  2. Go to Insert>Images and Media.
  3. Click on the Cite option on the Media dialog toolbar.
  4. Go to the "Extends" tab.
  5. Select a reference to extend.
  6. Click on "Insert" keeping the text field empty.

Observed Result:
The empty extension shows up as "undefined" inside the Media/Gallery dialog, however it does not show up as that on the main article page.

Inside the Media/Gallery dialog:

Screenshot 2024-09-04 at 4.47.34 PM.png (1,002×1,010 px, 120 KB)

On the main page:

Screenshot 2024-09-04 at 4.47.56 PM.png (1,446×942 px, 179 KB)

Expected Result: If empty extension is not something we are going to allow, we should keep the "Insert" button disabled unless there is something entered on the "Extend a reference" text field.

Event Timeline

awight subscribed.

Thank you for the detailed report! I'm closing this as a duplicate only because it seems to be a special case of the other bug, and once that issue is fixed it will no longer be possible to create a new subreference from the VE image caption dialog.

However, there will still probably be a related issue that a subreference inside of an image caption will be "orphaned" if its parent is defined inline, elsewhere in the document. This would be an edge case and slightly different than the bug described here.