Page MenuHomePhabricator

Collapsible element with custom toggles do not work with Parsoid
Closed, InvalidPublicBUG REPORT

Description

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

What happens?:

  • The map disappears.

What should have happened instead?:

  • The map is replaced by an interactive (Kartographer) version of the map.

Event Timeline

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

The issue is that the regionlist template uses id html attributes to have the "interactive" map open as the "static" one gets toggled off https://en.wikivoyage.org/w/index.php?title=Template:Regionlist&diff=prev&oldid=4073000.

This is how it's documented: https://www.mediawiki.org/wiki/Manual:Collapsible_elements#With_custom_toggle_link

But, since Parsoid overwrites the element IDs, this can't work.

This is actually an issue with the usage of Collapsible Elements, which uses the same toggle to toggle two elements at the same time with the same ID, which is the circumstance under which Parsoid will actually overwrite the element ID. We suggested an edit on the template in https://en.wikivoyage.org/wiki/Wikivoyage:Travellers%27_pub#switch_to_interactive_map_does_not_work.