Page MenuHomePhabricator

VisualEditor: removeHtmlAttributes throws an exception when copying complex templates
Closed, ResolvedPublic

Description

Steps to reproduce:

1.Open the editor.
2.Add a template
3.Save the page
4.Reopen the editor
5.Copy the template

Observed Result:

It gives an error:Uncaught TypeError: Cannot convert null to object .However, it does get pasted correctly onto other VE.


Version: unspecified
Severity: normal

Details

Reference
bz58421

Event Timeline

bzimport raised the priority of this task from to Normal.Nov 22 2014, 2:18 AM
bzimport set Reference to bz58421.

Test Environment: production-https://en.wikipedia.org/
Browser: Chrome Version 26.0.1410.65 & FF 25
OS: MAC OS X 10. 8. 5

Created attachment 14077
screenshot

Attached:

Can you reproduce on beta labs?

Change 101148 had a related patch set uploaded by Esanders:
Check values property exists before remove attribute

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

For betalabs, I could reproduce for only templates which has parameters with values

Change 101148 merged by jenkins-bot:
Check values property exists before removing attribute

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

Verified the fix in test2 with MediaWiki 1.23wmf8 on page:
https://test2.wikipedia.org/wiki/19th_december