Page MenuHomePhabricator

Template context menu doesn't appear in some cases
Open, Needs TriagePublic

Description

Template context menu doesn't appear in some cases, for example when clicking the infobox on https://en.wikipedia.org/wiki/The_Fighting_Temeraire?veaction=edit.

Error message in the browser console:

Uncaught TypeError: Cannot read property 'getPrefixedText' of null
    at Object.ve.ui.MWDefinedTransclusionContextItem.static.getMatchedTool (<anonymous>:745:772)
    at Object.ve.ui.MWDefinedTransclusionContextItem.static.isCompatibleWith (<anonymous>:745:94)
    at collect (load.php?lang=en&modules=ext.visualEditor.articleTarget%2Ccore%2CdesktopArticleTarget%2Cmwlink&skin=vector&version=1ctog:655)
    at VeUiContextItemFactory.ve.ui.ModeledFactory.getRelatedItems (load.php?lang=en&modules=ext.visualEditor.articleTarget%2Ccore%2CdesktopArticleTarget%2Cmwlink&skin=vector&version=1ctog:655)
    at VeUiDesktopContext.ve.ui.LinearContext.getRelatedSourcesFromModels (load.php?lang=en&modules=ext.visualEditor.articleTarget%2Ccore%2CdesktopArticleTarget%2Cmwlink&skin=vector&version=1ctog:650)
    at VeUiDesktopContext.ve.ui.LinearContext.getRelatedSources (load.php?lang=en&modules=ext.visualEditor.articleTarget%2Ccore%2CdesktopArticleTarget%2Cmwlink&skin=vector&version=1ctog:649)
    at VeUiDesktopContext.ve.ui.DesktopContext.isEmbeddable (<anonymous>:1126:840)
    at VeUiDesktopContext.ve.ui.DesktopContext.updateDimensions (<anonymous>:1125:472)
    at later (load.php?lang=en&modules=oojs-ui-core%2Coojs-ui-widgets|oojs-ui.styles.icons-interactions&skin=vector&version=u0mdi:3)

Event Timeline

matmarex created this task.Mon, Oct 7, 12:31 PM
Restricted Application added a project: VisualEditor. · View Herald TranscriptMon, Oct 7, 12:31 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
matmarex claimed this task.Mon, Oct 7, 12:39 PM
matmarex edited projects, added VisualEditor (Current work); removed VisualEditor.

This is a very similar bug to T167613 (caused by newlines in the template transclusion wikitext).

Change 541241 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/extensions/VisualEditor@master] ve.ui.MWDefinedTransclusionContextItem: Fix handling of template names

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

Change 541241 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@master] ve.ui.MWDefinedTransclusionContextItem: Fix handling of template names

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

Change 541305 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/extensions/VisualEditor@wmf/1.34.0-wmf.25] ve.ui.MWDefinedTransclusionContextItem: Fix handling of template names

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

Change 541306 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/extensions/VisualEditor@REL1_34] ve.ui.MWDefinedTransclusionContextItem: Fix handling of template names

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

Change 541306 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@REL1_34] ve.ui.MWDefinedTransclusionContextItem: Fix handling of template names

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

Change 541305 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@wmf/1.34.0-wmf.25] ve.ui.MWDefinedTransclusionContextItem: Fix handling of template names

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

Mentioned in SAL (#wikimedia-operations) [2019-10-07T18:25:08Z] <urbanecm@deploy1001> Synchronized php-1.34.0-wmf.25/extensions/VisualEditor/: SWAT: 011b6eb: 11033b7: Update VE core submodule to rGVED2ffb699ebed0 (TreeModifier fixes), T234489, T234742 + ve.ui.MWDefinedTransclusionContextItem: Fix handling of template names (T234817) (duration: 00m 53s)

This problem is now fixed on all Wikimedia wikis.