Page MenuHomePhabricator

Echo gets the wrong section name (i.e. it parses the page differently from MediaWiki)
Open, MediumPublic

Description

The edit
https://pt.wikipedia.org/w/index.php?diff=36979705
triggered the following notification:

Reverta-me mentioned you on Filtro de edições/Análise talk page in "Filtro 119".
10 minutes ago | View changes

The section name is actually "Registros analisados", not "Filtro 119". The problem is caused by the following table which is in that section:

{| class="wikitable"
|-
! [[WP:Filtro de edições/Análise/2013/06]]<span style="margin:0 0.5em;">/</span>[[WP:Filtro de edições/Análise/2013/06/Registros|Registros]]
! ...
! [[WP:Filtro de edições/Análise/2013/09]]<span style="margin:0 0.5em;">/</span>[[WP:Filtro de edições/Análise/2013/09/Registros|Registros]]
|-
|<pre>Introdução...
== Filtro 1 ==
*{{Ação|...}}
...
== Filtro 112 ==
*{{Ação|...}}
...</pre>
| ...
|<pre>Introdução...
== Filtro 1 ==
*{{Ação|...}}
...
== Filtro 119 ==
*{{Ação|...}}
...</pre>
|}

Version: unspecified
Severity: normal

Details

Reference
bz54603

Related Objects

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 2:14 AM
bzimport added a project: Notifications.
bzimport set Reference to bz54603.
bzimport added a subscriber: Unknown Object (MLST).

Looks like extension tag blocks like <nowiki> and <pre> need to be stripped before the DiscussionParser goes looking for section boundaries...

Prioritization and scheduling of this bug is tracked on Mingle card https://mingle.corp.wikimedia.org/projects/flow/cards/286

Here is another example: the edit
https://www.wikidata.org/w/index.php?title=Wikidata:Property_proposal/Creative_work&oldid=prev&diff=112096586

caused this notification:

Jakec mentioned you on the Property proposal/Creative work talk page in "Film".

but the edit was on section "Classificação Decimal Universal", not on section "Film".

EBernhardson subscribed.

This is something we should fix, but is a bit of an edge case. Should be able to turn one of these edits into a unit test(echo has facilities for this).

I was just about to report this again (then I searched for duplicates):

If a page has multiple sections with the same title, like „Benachrichtigung“ in this case, the first link has the anchor „#Benachrichtigung“, while the second link has the anchor „#Benachrichtigung 2“.
However, notifications are unaware of this behavior and always use the section title. This shouldn't be the case. Note that this isn't that trivial, as section headings can change between notification sending and page view.

I disagree that this really is an edge case, it happens quite often.