Page MenuHomePhabricator

Uncaught type errors inserting citations with citoid, and adding or removing unused parameters to template inside ref in VE in production (but the changes are successful)
Closed, DuplicatePublic

Description

I'm getting a lot of uncaught type errors in prod using citoid.

In Chrome the error looks like this:

Uncaught TypeError: Cannot read property 'element' of null

at VeCeMWTransclusionInlineNode.ve.ce.View.initialize (load.php?debug=false&lang=en&modules=ext.visualEditor.core&skin=vector&version=1hztqva:361)
at VeCeMWTransclusionInlineNode.ve.ce.LeafNode.initialize (load.php?debug=false&lang=en&modules=ext.visualEditor.core&skin=vector&version=1hztqva:381)
at VeCeMWTransclusionInlineNode.ve.ce.GeneratedContentNode.render (load.php?debug=false&lang=en&modules=ext.visualEditor.core&skin=vector&version=1hztqva:513)
at VeCeMWTransclusionInlineNode.ve.ce.MWTransclusionNode.render (<anonymous>:525:987)
at VeCeMWTransclusionInlineNode.ve.ce.GeneratedContentNode.doneGenerating (load.php?debug=false&lang=en&modules=ext.visualEditor.core&skin=vector&version=1hztqva:514)
at load.php?debug=false&lang=en&modules=ext.visualEditor.core&skin=vector&version=1hztqva:513
at fire (load.php?debug=false&lang=en&modules=jquery%2Cmediawiki|mediawiki.base|mediawiki.legacy.wikibits&only=scripts&skin=vector&version=06sarth:46)
at Object.fireWith [as resolveWith] (load.php?debug=false&lang=en&modules=jquery%2Cmediawiki|mediawiki.base|mediawiki.legacy.wikibits&only=scripts&skin=vector&version=06sarth:47)
at Object.deferred.(/w/anonymous function) [as resolve] (https://en.wikipedia.org/w/load.php?debug=false&lang=en&modules=jquery%2Cmediawiki%7Cmediawiki.base%7Cmediawiki.legacy.wikibits&only=scripts&skin=vector&version=06sarth:51:337)
at VeCeMWTransclusionInlineNode.ve.ce.MWTransclusionNode.onParseSuccess (<anonymous>:525:808)

In firefox ESR I get the error "TypeError: this.model is null" instead.

I haven't drilled down whether this only happens inside ref tags or not, or if it's only adding or removing parameters, but it doesn't happen with other templates outside ref tags that I've tried. To reproduce,

  1. Go to https://en.wikipedia.org/wiki/Breastfeeding
  2. Click on the 6th ref and click edit
  3. Remove the unused "last" and/or "first" parameters in the template dialog.
  4. Hit apply

This triggers the error for me consistently.

Event Timeline

Mvolz triaged this task as Medium priority.Jul 8 2018, 6:42 AM
Deskana renamed this task from Uncaught type errors inserting citations with citoid, and adding or removing unused parameters to template inside ref in VE in production to Uncaught type errors inserting citations with citoid, and adding or removing unused parameters to template inside ref in VE in production (but the changes are successful).Jul 9 2018, 9:23 AM
Deskana edited projects, added VisualEditor (Current work); removed VisualEditor.
Deskana subscribed.

Fortunately, it seems like this doesn't affect the actual functionality. This task still needs investigation though, as harmless errors have a habit of turning into harmful ones.