Page MenuHomePhabricator

No mentions when editing new/empty pages and empty line separates ping and signature
Closed, ResolvedPublic

Description

This really is a tricky one:

Create a new page or edit an empty page. Try to mention someone. Now add at least one empty line and below that line your signature. The mention will not be send. Also no mention failure notification is sent.

Looking into the code this seems to be an issue when parsing the diff. When adding content to an empty page that contains an empty line, the content before that line will treated as separate addition than the content below the line. The DiscussionParser then does not associate mentioned user and signature to trigger a mention.

Examples:

Create a new page/edit an empty page with:

[[User:UserToPing]]

~~~

It works when ping and signature are below the first empty line:

First line

[[User:UserToPing]]

Content

~~~

Event Timeline

Restricted Application added a project: TCB-Team. · View Herald TranscriptJan 23 2017, 1:07 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
WMDE-Fisch renamed this task from No mentions send when creating a new page without heading to No mentions when iediting new/empty pages and empty line separates ping and signature.Jan 24 2017, 10:24 AM
WMDE-Fisch updated the task description. (Show Details)

Change 333879 had a related patch set uploaded (by WMDE-Fisch):
[WIP] Fix mentions failing editing empty pages

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

Tobi_WMDE_SW renamed this task from No mentions when iediting new/empty pages and empty line separates ping and signature to No mentions when editing new/empty pages and empty line separates ping and signature.Jan 24 2017, 10:47 AM
Tobi_WMDE_SW added a subscriber: Tobi_WMDE_SW.
WMDE-Fisch moved this task from Proposed to Todo on the WMDE-QWERTY-Team board.Feb 1 2017, 2:32 PM
WMDE-Fisch moved this task from Todo to Sprint ready on the WMDE-QWERTY-Team board.

Change 333879 merged by jenkins-bot:
Fix mentions failing editing empty pages

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

Tobi_WMDE_SW moved this task from Done to Demoed on the WMDE-QWERTY-Team board.Feb 14 2017, 3:44 PM
Tobi_WMDE_SW closed this task as Resolved.Feb 21 2017, 2:30 PM