Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

template parameter does not work correctly #19

Open
chiefgeek157 opened this issue Aug 4, 2015 · 7 comments
Open

template parameter does not work correctly #19

chiefgeek157 opened this issue Aug 4, 2015 · 7 comments
Labels

Comments

@chiefgeek157
Copy link

Using MW 1.25.1, I cannot seem to get the template parameter to work. Here are some examples using "Test Page", "Test Page/Subpage {1|2|3}", and "Template:Subpage list template" with the definition: "There is a subpage named {{{1}}}".

Works

Using parser function with defaults: {{#subpages:}}

  • Subpage 1
  • Subpage 2
  • Subpage 3

Using parser function with pathstyle=full: {{#subpages:pathstyle=full}}

  • Test Page/Subpage 1
  • Test Page/Subpage 2
  • Test Page/Subpage 3

Manually invoking template in a hand-built list:

* {{Subpage list template|Test Page/Subpage 1}}
* {{Subpage list template|Test Page/Subpage 2}}
* {{Subpage list template|Test Page/Subpage 3}}

  • There is a subpage named Test Page/Subpage 1
  • There is a subpage named Test Page/Subpage 2
  • There is a subpage named Test Page/Subpage 3

Fails

Using parser function with the template parameter: {{#subpages:template=Subpage list template}}

  • {{Subpage list template|Test Page/Subpage 1}}
  • {{Subpage list template|Test Page/Subpage 2}}
  • {{Subpage list template|Test Page/Subpage 3}}

It appears that the list is generated correctly, but the resulting output is not passed through the template renderer. This is apparently in part because FunctionRunner has no access to the Parser instance so cannot render the resulting text. Not sure.

Using tag mode with template parameter: <subpages template="My template"/>

<div class="subpagelist">
<ul><li> </li></ul>
<p>There is a subpage named Test Page/Subpage 1
</p>
<ul><li> </li></ul>
<p>There is a subpage named Test Page/Subpage 2
</p>
<ul><li> </li></ul>
<p>There is a subpage named Test Page/Subpage 3
</p>
</div>

HookRunner calls Parser->recursiveTagParse(), but the expansion is messed up. The content doesn't get put into the list item, but outside, and each item becomes a separate list. It appears that each list item is resolved into complete HTML as a separate list rather than waiting until all the items are combined to render into a list.

@JeroenDeDauw
Copy link
Member

Thanks for reporting this issue!

@emanspeaks
Copy link
Contributor

I had also seen similar behavior but had not had time to investigate the cause.

@amglez
Copy link

amglez commented Aug 4, 2020

Hi
I am trying it with mw 1.31, and does not work either.

@JeroenDeDauw
Copy link
Member

Unfortunately I cannot justify spending time on this without funding

@pwinkeler
Copy link

Hi Jeroen - I have a great interest in fixing the template rendering option of the Semantic MediaWiki SubPages extension. Do you have a rough idea of what amount of funding you might need to implement this properly?

@JeroenDeDauw
Copy link
Member

@pwinkeler my current day rate is several 1000 EUR, which I suspect is on the high side for an open-source fix :) If you wish you can write me with your budget at [email protected] and I'll see if it is sufficient to put one of our devs on it.

@pwinkeler
Copy link

pwinkeler commented Aug 10, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants