There are a couple of edge cases where the MobileFormatter fails which breaks editing. We will fix this to ensure editing is possible.
Scenario 1
Some users have used <div> in their talk pages.
Theses pages are not recognized by the mobile site, in other words the pencil icon is not displayed beside sections titles. We can't edit sections, we are obligate to edit the whole page.
Sample: https://fr.m.wikipedia.org/wiki/Discussion_utilisateur:Gratus
@Gratus uses https://fr.wikipedia.org/w/index.php?title=Utilisateur:Gratus/Acceuil_PDD&action=edit at the top of his talk page.
Other sample: https://fr.m.wikipedia.org/wiki/Discussion_utilisateur:Mathis73
At the opposite, this talk page is is well recognized: https://fr.m.wikipedia.org/wiki/Discussion_utilisateur:Speculos
Another example:
- It is not possible to edit sections on https://en.m.wikipedia.org/wiki/Template:Set_index_article
Scenario 2
This hasn't been seen in the wild, but if you create a page with the following wikitext:
a =====5===== ====4==== ======6======
e.g. https://m.mediawiki.org/wiki/User:Jdlrobson/tba
Sections 4 and 6 are editable, but not the section 5.
Replicate locally using:
$wgMFContentProviderClass = 'MobileFrontend\ContentProviders\MwApiContentProvider'; $wgMFMwApiContentProviderBaseUri = "https://mediawiki.org/w/api.php";
Acceptance criteria
- The edit icon should load the entire page in the wikitext editor on pages where no sections are found
- If a page is malformed and the first heading is nested deeper than a heading that follows e.g. an h3 before a h2 then do not wrap sections. The edit icon should also load the entire page in the wikitext editor.
Related: T157995