alex4401 / mediawiki-extensions-DataMaps

Interactive data maps extension without extra services needed.
https://mediawiki.org/wiki/Extension:DataMaps
Other
5 stars 4 forks source link

Template transclusion in Map Marker descriptions break when certain elements occur in transcluded Templates. #283

Closed Shuben103 closed 1 month ago

Shuben103 commented 2 months ago

Describe the bug Template transclusion does not work as intended on map marker Description fields. When transcluding templates contain multiple span elements, div elements, or linebreaks, the expected content does not show up; instead, a link to the Template's page appears on the description. Applies to both Desktop and Mobile.

To Reproduce Steps to reproduce the behavior:

  1. Find or create a template utilizing the and/or
    tag.
  2. Create a new Data Map; in the "description" field for a map marker, call the Template multiple times.
  3. All calls after the first would show up as a link to the Template's page. If the Template utilizes multiple tags, even the first call would show up as a link.
  4. The same behavior should also occur for all Templates containing linebraks too.

Expected behavior The contents of the transcluded Template occurring as normal, instead of a link to the Template page appearing.

Screenshots Template Error

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context This does not appear to be an issue to other wikis as they generally keep their Map Marker descriptions short and simple. However, the wiki I am maintaining puts a lot of data into these Map Marker descriptions, so using Templates is quite crucial to ease of upkeep, as then we can put all the data in a single Module.

alex4401 commented 2 months ago

You're probably hitting the wikitext expansion limit, which by default is 800 bytes. Adjust $wgDataMapsMarkerParserExpansionLimit in the wiki's config (if this is on wiki.gg either DM me on Discord - alex4401 - or email me on wiki via Special:EmailUser/Alex4401).

All descriptions are by default shipped with all the other data so this may impact the map's load time.

alex4401 commented 1 month ago

Replacing with #293, given this specific issue report seems to have been a user error/misconfiguration.