Page MenuHomePhabricator

Bug section in frwiki Wikipédia:Le Bistro
Closed, ResolvedPublic

Description

Bug Wikipedia.png (1×1 px, 411 KB)

Hello, I’m here to tell you about a really annoying bug that other contributors have complained about.

*TEST*
1 : Go to https://fr.wikipedia.org/wiki/Wikip%C3%A9dia:Le_Bistro
2: Clic on "Modifier le code" in the last section
3:A message appears: "There is no section 15 in revision 167820293".

Le Bistro page uses several talk sub-pages, and the wikisource editor 2017 causes a shift in one section. So if the last section is 14, it will think it's 15.

Similarly, clicking on any section will not bring back to the right discussion but to the one below

Thank you in advance,

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

The link on the last [Edit source] button on the page at the moment is https://fr.wikipedia.org/w/index.php?title=Wikip%C3%A9dia:Le_Bistro/2_mars_2020&action=edit&section=T-14 It works in the 2010WTE (which disregards the section number?) but not in the 2017WTE. I don't know if the problem is really the the editor or the link.

This is related to transcluding the section from another page.

Looks like the new wikitext editor doesn't handle section numbers prefixed with 'T-' correctly. I think they are supposed to count section headers defined inside <includeonly> tags, like the header =Le Bistro/2 mars 2020= on that page, while normal section numbers don't. NWE just removes the 'T-' and pretends it's a normal section number.

I don't think that this scheme is documented anywhere, and I'm not sure if that's the only difference. I would need to read some code to figure out how exactly it's supposed to work, and how we should make use of that correctly.

Change 581081 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/extensions/VisualEditor@master] Remove incorrect handling for 'T-' prefix in section numbers

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

Well, this was easier than I expected. Hopefully we won't discover that I missed something obvious.

Change 581081 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@master] Remove incorrect handling for 'T-' prefix in section numbers

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

matmarex moved this task from Code Review to QA on the Editing-team (Q3 2019-2020 Kanban Board) board.

QA note: this is not expected to work correctly on mobile, as the mobile skin generates those links wrong (T198011).

(I think I fixed T198011 too, so it should work on mobile as well.)