VisualEditor:Uncaught TypeError: Object [object Text] has no method 'setAttribute' appears while attempting to save after adding Cite Web template
Closed, ResolvedPublic

Description

Screenshot of the error

Steps to reproduce:

1.Open the editor for page
2.Go to Insert>Template
3.Search for template Cite Web
4.Add a a value for source title field but keep the URL field empty
5.Add the template
6.Click the button "Save Page"

Observed Result:
The "Save Page" button does not work .In the console it is showing an error:
Uncaught TypeError: Object [object Text] has no method 'setAttribute'

See the screenshot attached


Version: unspecified
Severity: critical
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=55985

Attached:

bzimport set Reference to bz59002.
Ryasmeen created this task.Via LegacyDec 27 2013, 6:44 PM
Ryasmeen added a comment.Via ConduitDec 27 2013, 6:45 PM

Test Environment: http://en.wikipedia.beta.wmflabs.org/
Browser: Chrome Version 26.0.1410.65
OS: MAC OS X 10. 8. 5
Page:http://en.wikipedia.beta.wmflabs.org/w/index.php?title=27th_december&veaction=edit

Husky added a comment.Via ConduitJan 13 2014, 12:29 PM

I can reproduce this problem as well. A pity, because not being able to save makes the Visual Editor, well, pretty much useless. I've changed priority to 'High' for that reason.

Husky added a comment.Via ConduitJan 13 2014, 12:32 PM

Adding to my previous comment: when i try to switch to wiki markup mode i get the same error. No way to save my stuff :(

Here's a stack trace:

Uncaught TypeError: Object [object Text] has no method 'setAttribute'
ve.dm.MWTransclusionNode.static.toDomElements
ve.dm.Converter.getDomElementsFromDataElement
ve.dm.Converter.getDomSubtreeFromData
ve.dm.MWReferenceNode.static.toDomElements
ve.dm.Converter.getDomElementsFromDataElement
ve.dm.Converter.getDomSubtreeFromData
ve.dm.Converter.getDomSubtreeFromModel
ve.dm.Converter.getDomFromModel
ve.init.mw.ViewPageTarget.editSource
ve.ui.MWEditModeSourceTool.onSelect
OO.ui.ToolGroup.onMouseUp
OO.ui.PopupToolGroup.onMouseUp
proxy
jQuery.event.dispatch
elemData.handle.eventHandle

Ryasmeen added a comment.Via ConduitJan 14 2014, 8:13 PM

This s\is happening for adding all templates on test2.

Ryasmeen added a comment.Via ConduitJan 14 2014, 8:14 PM

*This is happening for adding all templates on test2*

gerritbot added a comment.Via ConduitJan 14 2014, 11:47 PM

Change 107511 had a related patch set uploaded by Esanders:
Wrap text nodes in spans if trying to mark as data-ve-ignore

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

gerritbot added a comment.Via ConduitJan 15 2014, 1:33 AM

Change 107530 had a related patch set uploaded by Catrope:
Wrap text nodes in spans if trying to mark as data-ve-ignore

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

gerritbot added a comment.Via ConduitJan 15 2014, 1:34 AM

Change 107531 had a related patch set uploaded by Catrope:
Wrap text nodes in spans if trying to mark as data-ve-ignore

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

gerritbot added a comment.Via ConduitJan 15 2014, 1:34 AM

Change 107511 merged by jenkins-bot:
Wrap text nodes in spans if trying to mark as data-ve-ignore

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

Catrope added a comment.Via ConduitJan 15 2014, 2:48 AM

Fix has been merged, backported and will be deployed during tomorrow's lightning deploy window (Thu Jan 16 00:00 - 00:30 UTC; Wed Jan 15 16:00 - 16:30 PST)

Esanders added a comment.Via ConduitJan 15 2014, 10:46 AM

data-ve-ignore showing up in converter in some cases still. Working on a fix.

gerritbot added a comment.Via ConduitJan 15 2014, 11:08 AM

Change 107559 had a related patch set uploaded by Esanders:
About-group extra DOM data in toDomElements

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

gerritbot added a comment.Via ConduitJan 15 2014, 8:26 PM

Change 107559 merged by jenkins-bot:
About-group extra DOM data in toDomElements

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

gerritbot added a comment.Via ConduitJan 15 2014, 8:43 PM

Change 107638 had a related patch set uploaded by Catrope:
About-group extra DOM data in toDomElements

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

gerritbot added a comment.Via ConduitJan 15 2014, 8:53 PM

Change 107640 had a related patch set uploaded by Catrope:
About-group extra DOM data in toDomElements

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

gerritbot added a comment.Via ConduitJan 16 2014, 12:19 AM

Change 107531 merged by Catrope:
Wrap text nodes in spans if trying to mark as data-ve-ignore

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

gerritbot added a comment.Via ConduitJan 16 2014, 12:19 AM

Change 107640 merged by Catrope:
About-group extra DOM data in toDomElements

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

gerritbot added a comment.Via ConduitJan 16 2014, 12:19 AM

Change 107530 merged by Catrope:
Wrap text nodes in spans if trying to mark as data-ve-ignore

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

gerritbot added a comment.Via ConduitJan 16 2014, 12:19 AM

Change 107638 merged by Catrope:
About-group extra DOM data in toDomElements

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

Jdforrester-WMF added a comment.Via ConduitJan 16 2014, 2:02 AM

Now fixed and back-ported to production.

Ryasmeen added a comment.Via ConduitJan 16 2014, 4:12 AM

This issue is verified for test2.But in mw.org I still cannot save after adding a template in Chrome 26.0.1410.65, however it does not show any error in the console as such Uncaught TypeError: Object [object Text] has no method 'setAttribute'

In FireFox, it works for both test 2 and mw.org.

Hence reopening it.If it is a separate issue please Close this one , I will file a separate issue for mw.org

Esanders added a comment.Via ConduitJan 16 2014, 4:50 PM

Can't reproduce on mw.org. Which template did you use?

Jdforrester-WMF added a comment.Via ConduitJan 16 2014, 4:52 PM

(In reply to comment #21)

This issue is verified for test2.But in mw.org I still cannot save after
adding
a template in Chrome 26.0.1410.65, however it does not show any error in the
console as such Uncaught TypeError: Object [object Text] has no method
'setAttribute'

In FireFox, it works for both test 2 and mw.org.

Hence reopening it.If it is a separate issue please Close this one , I will
file a separate issue for mw.org

Maybe if you refresh it will go away? Sounds most likely like a cacheing issue…

Ryasmeen added a comment.Via ConduitJan 16 2014, 7:20 PM

Works for mw.org in Chrome now.Might be a caching issue.

Add Comment