Page MenuHomePhabricator

VisualEditor: Remove transclusion node if we were just going to set it to empty content
Closed, ResolvedPublic

Description

Screenshot

Steps to reproduce:

1.Open a page with VE
2.Go to Insert>Template
3.Click on Show Options
4.Click on the trash icon.
5.Click on "Add Content"

Observed Result:
The "Insert transclusion" button becomes enabled and an empty transclusion with empty content gets added upon clicking on it.

See the screenshot attached

Test Environment: https://test2.wikipedia.org/
Browser: Chrome Version 26.0.1410.65
OS: MAC OS X 10. 8. 5


Version: unspecified
Severity: minor

Attached:

Screen_Shot_2014-03-31_at_5.32.09_PM.png (466×1 px, 122 KB)

Details

Reference
bz63341

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 3:02 AM
bzimport set Reference to bz63341.

Created attachment 14990
Screenshot

Attached:

Screen_Shot_2014-03-31_at_5.32.09_PM.png (466×1 px, 122 KB)

Also, there is an error in the console:
Uncaught TypeError: Cannot read property 'length' of null

  • Bug 63340 has been marked as a duplicate of this bug. ***

See also bug 63340, which was duped to this one but is actually subtly different: it's about when the only part is a TemplatePlaceholderPage

Change 169638 had a related patch set uploaded by Alex Monk:
MWTransclusionModel: Exclude parts serialising to '' from the plain object

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

Change 169638 merged by jenkins-bot:
MWTransclusionModel: Exclude parts serialising to '' from the plain object

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