Page MenuHomePhabricator

Talk page: edit section: Cannot find section -> off by one error
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

What happens?:

Cannot find section
You tried to edit a section that does not exist. It may have been moved or deleted while you were viewing the page.

What should have happened instead?:

Editing Dyskusja wikipedysty:Saper (section)

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):

MediaWiki 1.47.0-wmf.7 (rMW294e7850569f) 2026-06-23T00:03:20

Other information (browser name/version, screenshots, etc.):

Section number 529 linked from the edit source does not exist

https://pl.wikipedia.org/w/index.php?title=Dyskusja_wikipedysty:Saper&action=edit&section=529

Section number 528 works

https://pl.wikipedia.org/w/index.php?title=Dyskusja_wikipedysty:Saper&action=edit&section=528

Event Timeline

Zaidusyy subscribed.

Hi! I was able to reproduce this issue and would like to investigate it.

matmarex subscribed.

Looks like a Parsoid bug. https://pl.wikipedia.org/w/index.php?title=Dyskusja_wikipedysty:Saper&useparsoid=0#toolserwer_3 has the correct, working link.

The first broken section on the page is https://pl.wikipedia.org/w/index.php?title=Dyskusja_wikipedysty:Saper&useparsoid=1#Odp:[[Akceleracja_(biologia), probably due to the unclosed [[ markup.
When using the old parser, that section has no [edit] link: https://pl.wikipedia.org/w/index.php?title=Dyskusja_wikipedysty:Saper&useparsoid=0#Odp:[[Akceleracja_(biologia).
When using Parsoid, it has a link, and all section edit links from that point are off by one.

Change #1305971 had a related patch set uploaded (by Arlolra; author: Arlolra):

[mediawiki/services/parsoid@master] Unbalanced preproc prevents heading

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

Hi! I was able to reproduce this issue and would like to investigate it.

@Zaidusyy Sorry, I put up a patch for this already. T391624: Parsoid section edit link issues, that this falls under, is an active area of development and probably not the best place to be looking for bugs to tackle. Hopefully you didn't spend too much time investigating

@ABreault-WMF
No worries, it was a good learning experience.
Thanks for the heads up

Change #1305971 merged by jenkins-bot:

[mediawiki/services/parsoid@master] Unbalanced preproc prevents heading

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

Change #1306186 had a related patch set uploaded (by Isabelle Hurbain-Palatin; author: Isabelle Hurbain-Palatin):

[mediawiki/vendor@master] Bump wikimedia/parsoid to 0.24.0-a13

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

Change #1306186 merged by jenkins-bot:

[mediawiki/vendor@master] Bump wikimedia/parsoid to 0.24.0-a13

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