DynamicPageList3 icon indicating copy to clipboard operation
DynamicPageList3 copied to clipboard

Alternate surrogate/formatting template name syntax

Open CrystalClearGal opened this issue 1 year ago • 3 comments

DynamicPageList3 version: MediaWiki version: 1.39.4 PHP version: 8.1.27 (cgi-fcgi) DPL3 version: 3.5.2

Issue:

  • The manual's include section states the following alternate surrogate template naming syntax works: {ParamSourceTemplate¦AltNameSurrogate}.dpl
  • However, it only works in debug=5 mode, outputting desired results as "pre"-escaped.
  • In normal mode, even with debug=0 explicitly set, the result is "pre"-escaped for no reason.

List of steps to reproduce (step by step, including full links if applicable):

  1. On Template:MyTemplate page, put:
{{#dpl:
|debug=0
|namespace=
|category=My Category
|include={ParamSourceTemplate¦AltNameSurrogate}.dpl
|mode = userformat
|listseparators = ¶{¦class="wikitable" 
¶¦-¶!Page ¶!Props ¶!colspan="2"¦Requirements¶¦-,,,¦}
|secseparators	    = ¶,,,¶¦,
|count=10
|noresultsfooter='''No results found'''
}}
  1. Add a surrogate called Template:AltNameSurrogate with 3 cells calling 3 valid ParamSourceTemplate params.

  2. Preview the Template:MyTemplate template page result.

What happens?:

  • All output displays as "pre" tag escaped, even with explicit |debug=0.

What should have happened instead?:

  • Content should display as intended.

Browser information, screenshots and other applicable information:

  • Any browser (unrelated to browser).

Workaround:

  • Redirect the "required"-syntax-named template's page, to the desired named one (or the namespace/page used as the desired surrogate). This functions as an alias of sorts.

CrystalClearGal avatar Apr 23 '24 21:04 CrystalClearGal