Page MenuHomePhabricator

VisualEditor: Whitespace-only headings should be collapsed to (blank) paragraphs
Closed, ResolvedPublic1 Estimated Story Points

Description

When an editor tried to remove a heading, the following empty h3 tag seems to have been left behind: <h3 data-parsoid='{"dsr":[4514,4534,3,3]}'></h3>

Serializes to ===<nowiki/>=== and the user complained about it.

From the bug report: /mng/bugs/en.2013-06-10T16:41:02.032Z-Lightning_(software) on parsoid.wmflabs.org


Version: unspecified
Severity: enhancement

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 1:40 AM
bzimport set Reference to bz49452.

/mnt/bugs/2013-06-09T22%3A08%3A31.223Z-Sapo-comum (ptwiki) reports an empty heading left behind "== ==" when the user actually meant to delete it (and I presume thought it gone after the non-whitespace text was deleted).

/mnt/bugs/2013-06-10T13:57:10.670Z-%25E8%25A5%25BF%25E7%2593%259C%25E6%25B3%25A2 (chinese wikipedia) has an empty heading tag left behind as well (probably inserted when the user added a heading and then deleted it).

Change 162310 had a related patch set uploaded by Jforrester:
MWHeading: Don't put self in output if contents are blank or whitespace

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

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

Change 162310 had a related patch set uploaded (by Jforrester):
MWHeading: Don't put self in output if contents are blank or whitespace

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

Patch-For-Review

Change 162310 merged by jenkins-bot:
For empty / whitespace-only headings, output <p> instead of <h#>

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

Deleting headings is clean now

Beta

Screen_Shot_2015-03-23_at_4.34.38_PM.png (197×1 px, 15 KB)

vs
current production(wmf22)
Screen_Shot_2015-03-23_at_4.32.06_PM.png (174×1 px, 15 KB)

It doesn't seem to be fixed in 1.25wmf23.
Edit from 17 hours ago on frwiki (Version page reports 1.25wmf23) with the same kind of problems :
https://fr.wikipedia.org/w/index.php?title=Tour_d%27Alg%C3%A9rie_1952&diff=prev&oldid=113472247

It doesn't seem to be fixed in 1.25wmf23.
Edit from 17 hours ago on frwiki (Version page reports 1.25wmf23) with the same kind of problems :
https://fr.wikipedia.org/w/index.php?title=Tour_d%27Alg%C3%A9rie_1952&diff=prev&oldid=113472247

Yesterday's deployment happened late, so maybe this happened just before or just after the deployment and the user's browser was still running the old code? I tried to create an empty heading or a whitespace-only heading in VE on frwiki and I couldn't. Are there any other edits adding ==<nowiki/>== that are more recent?

No other edits with ==<nowiki/>== for the moment, I will send an other comment if I see one

I checked again on production - including checking on the exactly same section layout on which the bug was reported:

Screen_Shot_2015-04-02_at_3.58.43_PM.png (620×1 px, 63 KB)

These look like cached code issues. Closing absent further issues.