Extension talk:SubPageList

Jump to navigation Jump to search

About this board

Legaulph (talkcontribs)

Can SubPage List be installed without composer?

Reply to "Composer install"

template parameter not evaluated when output

3
Chiefgeek157 (talkcontribs)

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

{{#subpages:}}

  • Subpage 1
  • Subpage 2
  • Subpage 3

{{#subpages:pathstyle=full}}

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

* {{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

{{#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}}

So it appears that the list is generated correctly, but the resulting output is not passed through the template renderer.

Any clues about what could be preventing the output from being rendered as part of the extension when it renders as part of the page correctly?

Chiefgeek157 (talkcontribs)

If I am not mistaken, I would assume that HookRunner.php line 96 is the one that is supposed to render the template rather than return the wikitext containing the generated template text.

94 protected function getProcessedResultText( $resultText ) {
95    if ( $this->getOption( self::OPT_DO_PARSE ) ) {
96      return $this->parser->recursiveTagParse( $resultText, $this->frame );
97   }
98   return $resultText;
99 }

I am not skilled enough to debug this and confirm $resultText versus the output of $this->parser->recursiveTagParse($resultText). I tried commenting out the if statement to force the call to recursiveTagParse, but that did not change the result.

Chiefgeek157 (talkcontribs)

After more testing, I discovered that the "template" parameter doesn't appear to work.

In parser function mode as {{#subpages:|template=My template}}, the function Parser->recursiveTagParse() is never called because FunctionRunner is not passed the Parser instance.

In tag mode as <subpages template="My template"/> the HookRunner does call 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.

<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>
Reply to "template parameter not evaluated when output"

Fatal error: Coll to undefined method ...

1
Kghbln (talkcontribs)
Reply to "Fatal error: Coll to undefined method ..."

Fatal error: Class 'SubPageList\Extension' not found in /var/sites/c/cablefree.net/public_html/support/radio/software/extensions/SubPageList/SubPageList.php on line 50

2
62.232.223.74 (talkcontribs)

Fatal error: Class 'SubPageList\Extension' not found in /var/sites/c/cablefree.net/public_html/support/radio/software/extensions/SubPageList/SubPageList.php on line 50

How did this occur?

Hosted on a "Linux Server" on the ISP: Product Version MediaWiki 1.24.1 PHP 5.4.28 (cgi-fcgi) MySQL 5.6.21

Jeroen De Dauw (talkcontribs)

My guess is that you did not do the "composer install" step described in the installation instructions.

Reply to "Fatal error: Class 'SubPageList\Extension' not found in /var/sites/c/cablefree.net/public_html/support/radio/software/extensions/SubPageList/SubPageList.php on line 50"
Wikimanz (talkcontribs)

Hello, Subpagelist with Validator 0.4.14 had been working very well on my wiki for a long time. I just upgraded Validator 0.4.14 to the latest one Validator 0.5.1 and after adding the DataValues extension my SubPagelist extension broke with this error message, Fatal error: Call to undefined method DataValues\UnknownValue::isValid() in /home/wiki/public/wiki/public/a/extensions/Validator/includes/ParamProcessor/Param.php on line 298

I updated DataValues, SubPagelist and Validator via git. I currently have mediawiki 1.21. I have temporarily reverted back to validator 0.4.14 and also to older subpage list. Combining New Validator with the older subpagelist 0.3 gives the following error. Fatal error: Class 'Parameter' not found in /home/wiki/public/wiki/public/a/extensions/SubPageList/SubPageList.class.php on line 63

Thanks for the great extension. My wiki completely depends on this. Hoping a fix to come.

Jeroen De Dauw (talkcontribs)

The latest git versions (SPL, Validator and DataValues) appear to be working with each other. Is that not the case for you?

Wikimanz (talkcontribs)

Just tried downloading everything once again from Git and it is working fine. Thanks, i must have not downloaded one of them from Git or mixed it up while reverting back and forth.

Thanks

Reply to "Support for Validator 0.5.1"
Wikimanz (talkcontribs)

I currently use this extension to list subpages according to last edited or alphabetically. However, I currently have the need to show different subpage to appear randomly so the same list of pages will not be showing up all the time. Is there a way to have subpages to be listed randomly with no order whatsoever? I have tried not putting any "sortby" parameter but the default setting kicks in.

Thank you

Jeroen De Dauw (talkcontribs)

This is not currently possible. It is however a nice idea for the next version.

Wikimanz (talkcontribs)

Thats what I thought. Looking forward for the next version then.

Thanks

Reply to "How to list subpages randomly?"
Sigbert (talkcontribs)

Hi,

I use on all subpages of Mmstat3:Statistik I&II the same call:

<subpages page="Mmstat3:Statistik I&II" format="ol" sortby="lastedit" />

However, it looks different on all (sub)pages:

  • Mmstat3:Statistik I&II/Grundbegriffe der Statistik
1. Wahrscheinlichkeitsrechnung
2. Eindimensionale Häufigkeitsverteilung
3. Grundbegriffe der Statistik 
  • Mmstat3:Statistik I&II/Eindimensionale Häufigkeitsverteilung
1. Wahrscheinlichkeitsrechnung
2. Grundbegriffe der Statistik
3. Eindimensionale Häufigkeitsverteilung 
  • Mmmstat3:Statistik I&II/Wahrscheinlichkeitsrechnung
1. Grundbegriffe der Statistik
2. Eindimensionale Häufigkeitsverteilung
3. Wahrscheinlichkeitsrechnung 
  • Mmstat3:Statistik I&II
1. Grundbegriffe der Statistik
2. Eindimensionale Häufigkeitsverteilung
3. Wahrscheinlichkeitsrechnung

The last one is correct one, ordered by the last edit of the page. Any ideas?

Jeroen De Dauw (talkcontribs)

Results of <subpages> get cached in your page just like any other content.

Reply to "Sort order of sub pages"

Format=list does't produce comma separated results

1
12.167.75.11 (talkcontribs)

Using the current version of SubPageList(0.5) and MW 1.17, the list is returned with dot separating the values. Is this per design and the documentation incorrect, or is the documentation correct and the extension not working according to design?

Reply to "Format=list does't produce comma separated results"
Christharp (talkcontribs)

Hi, first and foremost thanks for all the great extensions. I've found an issue with Extension:Maps and this extension. After much searching (since I had sublist as part of an infobox) I've found that if sublist is used before a map I get a fatal exception. If sublist is used after a map everything works fine. Strangely if I use a map first, then sublist, and then followed by a map everything works fine.

I'm using SubPageList (Version 0.5),Maps (Version 2.0.1), Validator (Version 0.5.1), MediaWiki 1.20.2, PHP 5.4.10 (apache2handler) & MySQL 5.5.28-log.(I also posted this question on the Maps Discussion tab)

Reply to "Maps and subpage list issue"
213.129.230.10 (talkcontribs)

Im looking for a way to display the a subpagelist for the current root page. So if there are foo, foo/bla1 and foo/bla2, no matter on which page i am, there is always a subpage list for foo displayed on the sidebar. does someone very clever know how to do this? :(

-vier

Jeroen De Dauw (talkcontribs)

Use the page parameter to specify which page you want to display subpages for.

Reply to "show in sidebar"