VisualEditor: Whitespace-only headings should be collapsed to (blank) paragraphs
Closed, ResolvedPublic

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

bzimport set Reference to bz49452.
ssastry created this task.Via LegacyJun 11 2013, 8:15 PM
ssastry added a comment.Via ConduitJun 11 2013, 8:32 PM

/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).

ssastry added a comment.Via ConduitJun 11 2013, 8:49 PM

/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).

gerritbot added a comment.Via ConduitOct 5 2014, 7:54 PM

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

Jdforrester-WMF added a comment.Via ConduitNov 13 2014, 1:50 PM
  • Bug 70368 has been marked as a duplicate of this bug. ***
Jdforrester-WMF moved this task to Next up: Stability on the VisualEditor workboard.Via WebNov 23 2014, 11:02 PM
Jdforrester-WMF moved this task to Doing on the VisualEditor workboard.Via WebDec 1 2014, 9:25 PM
Jdforrester-WMF moved this task to Backlog on the VisualEditor workboard.Via WebJan 15 2015, 12:09 AM
gerritbot added a subscriber: gerritbot.Via ConduitFeb 17 2015, 6:22 PM

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

Jdforrester-WMF moved this task to Doing on the VisualEditor workboard.Via WebFeb 17 2015, 7:42 PM
Elitre added a subscriber: Elitre.Via WebFeb 27 2015, 3:52 PM
gerritbot added a comment.Via ConduitMar 20 2015, 11:16 PM

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

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

Jdforrester-WMF closed this task as "Resolved".Via WebMar 20 2015, 11:25 PM
Jdforrester-WMF removed a project: Patch-For-Review.
Jdforrester-WMF moved this task to Done on the VisualEditor 2014/15 Q3 blockers workboard.
Jdforrester-WMF moved this task to Done on the VisualEditor workboard.Via WebMar 20 2015, 11:29 PM
Liuxinyu970226 removed a subscriber: Liuxinyu970226.Via WebMar 21 2015, 3:41 AM
Etonkovidova added a subscriber: Etonkovidova.Via WebMar 23 2015, 11:37 PM

Deleting headings is clean now

Beta


vs
current production(wmf22)

NicoV added a subscriber: NicoV.Via WebThu, Apr 2, 4:02 PM

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

Catrope added a comment.Via WebThu, Apr 2, 5:23 PM

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?

NicoV added a comment.Via WebThu, Apr 2, 8:51 PM

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

Etonkovidova added a comment.Via WebThu, Apr 2, 11:00 PM

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

NicoV added a comment.Via WebFri, Apr 3, 5:19 AM

Found an other one, edit time is about 12 hours after the first example
https://fr.wikipedia.org/w/index.php?title=Nahhalin&diff=prev&oldid=113480458

Elitre reopened this task as "Open".Via WebFri, Apr 3, 7:18 AM
Liuxinyu970226 added a subscriber: Liuxinyu970226.Via WebThu, Apr 9, 2:39 AM
Jdforrester-WMF closed this task as "Resolved".Via WebSun, Apr 12, 10:56 PM

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

Liuxinyu970226 removed a subscriber: Liuxinyu970226.Via WebMon, Apr 13, 3:26 AM

Add Comment

Column Prototype
This is a very early prototype of a persistent column. It is not expected to work yet, and leaving it open will activate other new features which will break things. Press "\" (backslash) on your keyboard to close it now.