Page MenuHomePhabricator

Null edits should not be saved in posts, topic titles, descriptions, summaries
Closed, ResolvedPublic

Description

Example: http://en.wikipedia.beta.wmflabs.org/w/index.php?title=Topic:Sk5vp4t1ixkkt4bc&action=history

In that edit: User:Test3544535452 edits the topic title, and hit save, without making any actual changes.

This "no-change action" currently would not get saved in the database, with regular wikipages (see [[WP:Null edit]]). It shouldn't in Flow, either.

This also happens in posts:
https://www.mediawiki.org/w/index.php?title=Topic:Sm56a9q3oa7enyxr&action=compare-post-revisions&topic_newRevision=sm7mynnx1c7j2mo2

And in summaries:
http://test.wikimedia.beta.wmflabs.org/w/index.php?title=Talk:ET4&action=history

A null edit should be ignored and not saved as an edit.

Note that this is also used as a workaround for T59991: Changes in templates are not immediately reflected in Flow posts which transclude those templates (and similar issues), so possibly should be fixed in conjunction.

See also: T98127: null edits on Flow posts are registered in history

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 2:27 AM
bzimport set Reference to bz58975.
bzimport added a subscriber: Unknown Object (MLST).

bingle-admin wrote:

The WMF core features team tracks this bug on Mingle card https://mingle.corp.wikimedia.org/projects/flow/cards/658, but people from the community are welcome to contribute here and in Gerrit.

Ciencia_Al_Poder renamed this task from Flow: If no content is changed, the revision should not be saved to Flow: Topic title edit: If no content is changed, the revision should not be saved.Jul 10 2015, 12:30 PM
Ciencia_Al_Poder updated the task description. (Show Details)
Ciencia_Al_Poder set Security to None.
Ciencia_Al_Poder removed a subscriber: wikibugs-l-list.
DannyH renamed this task from Flow: Topic title edit: If no content is changed, the revision should not be saved to Null edits should not be saved in posts, topic titles, summaries.Aug 2 2015, 12:05 AM
DannyH updated the task description. (Show Details)
DannyH removed subscribers: EBernhardson, Spage.
Mattflaschen-WMF renamed this task from Null edits should not be saved in posts, topic titles, summaries to Null edits should not be saved in posts, topic titles, descriptions, summaries.Aug 27 2015, 8:41 PM
Catrope added a subscriber: Catrope.

Duped this in the wrong direction.

Change 241142 had a related patch set uploaded (by Sbisson):
Ignore null edits for topic title, post, description, and summary

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

Change 241142 merged by jenkins-bot:
Ignore null edits for topic title, post, description, and summary

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

https://gerrit.wikimedia.org/r/#/c/241142/ Ignore null edits for topic title, post, description, and summary

Checked all those items in betalabs - 'View history' seems to be free now from those null edits.

DannyH added a subscriber: DannyH.

The history reports the second edit as +22.

Screen Shot 2015-10-13 at 16.32.52.png (196×982 px, 100 KB)
But the diff reports no difference.

@mattflaschen is 99.9% sure this is caused by T115236: Flow posts being serialized from HTML -> WT without providing Parsoid data-parsoid attributes?

Will do comparison in wikitext to avoid these problems.

The revisions have slightly different html representations. One has title="mw:talk:Flow" while the other has title="mediawikiwiki:talk:Flow".

<p id="mwAQ">Hello Shizhao,</p>
<p id="mwAg"><a rel="mw:ExtLink" href="//www.mediawiki.org/wiki/Flow/Request Flow on a page" title="mw:Flow/Request Flow on a page" id="mwAw">Following your request</a>, your talk page has been converted to Flow. The previous page is archived, with a link on the sidebar. </p>
<p id="mwBA">If you have any feedback to provide, please leave a message <a rel="mw:ExtLink" href="//www.mediawiki.org/wiki/talk:Flow" title="mw:talk:Flow" id="mwBQ">on MediaWiki</a> in any language or contact me.</p>
<p id="mwBg">Have fun!</p>
<p id="mwAQ">Hello Shizhao,</p>
<p id="mwAg"><a rel="mw:ExtLink" href="//www.mediawiki.org/wiki/Flow/Request Flow on a page" title="mediawikiwiki:Flow/Request Flow on a page" id="mwAw">Following your request</a>, your talk page has been converted to Flow. The previous page is archived, with a link on the sidebar. </p>
<p id="mwBA">If you have any feedback to provide, please leave a message <a rel="mw:ExtLink" href="//www.mediawiki.org/wiki/talk:Flow" title="mediawikiwiki:talk:Flow" id="mwBQ">on MediaWiki</a> in any language or contact me.</p>
<p id="mwBg">Have fun!</p>

Change 246249 had a related patch set uploaded (by Sbisson):
Check for null edits using wikitext format

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

Change 246249 merged by jenkins-bot:
Check for null edits using wikitext format

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

Checked in betalabs.

The fix successfully catches

  • white spaces:

Screen Shot 2015-10-16 at 4.27.50 PM.png (290×1 px, 51 KB)

Screen Shot 2015-10-16 at 4.16.59 PM.png (378×866 px, 50 KB)

  • moving chunk of text

Screen Shot 2015-10-16 at 4.34.44 PM.png (141×790 px, 45 KB)

Screen Shot 2015-10-16 at 4.33.36 PM.png (350×857 px, 52 KB)

Still failing in summaries after rEFLW48aea31224dcfae3232ec1d97f3f734316c03f70 got merged (not sure if it was fixing that):

Topic:Sq8d47itaqbchwqh

Interesting! Looks like it's possible to create an empty topic summary. Because that's not technically the same as a null edit, I've filed that as T119349: Creating empty summaries should not be allowed.