Difference between revisions of "Issue:Output nothing if using include in parser function version of DPL within template"
From FollowTheScore
Line 30: | Line 30: | ||
== Reply == | == Reply == | ||
− | I guess that you | + | I guess that you have a problem with the regexp. |
− | The following example works correctly as you can see: | + | The following example works correctly (here, using MW 1.13) as you can see: |
<pre><nowiki>{{test get chapter|fictitious country|.*}}</nowiki></pre> | <pre><nowiki>{{test get chapter|fictitious country|.*}}</nowiki></pre> | ||
{{test get chapter|fictitious country|.*}} | {{test get chapter|fictitious country|.*}} |
Revision as of 13:58, 22 October 2008
Description: | Output nothing if using include in parser function version of DPL within template |
Extension / Version: | DPL / 1.7.4 |
Type / Status: | Bug / open |
Problem
When I use parser function version of DPL within a template, the "include" function will make the whole wiki page output nothing (i.e., empty HTML), and there seems no error in MediaWiki's debug log. I use it like this:
{{#dpl: |category={{{1}}} |include=#SomeSection |titleregexp={{{2}}} |format=,<h2>'''[[%PAGE%|%PAGE%]]'''</h2> }}
- If I use debug=5, I can see the non-parsed Wiki text output correctly.
- If I use it individually (not within the template and replace those variable), it also works correctly.
- If I remove "include", it works.
- Since I have to pass parameters, I can only use the parser function version.
My MediaWiki version: 1.13.0. Is there any clue I can investigate further? Thanks!
Ericyu 09:36, 22 October 2008 (UTC)
Reply
I guess that you have a problem with the regexp.
The following example works correctly (here, using MW 1.13) as you can see:
{{test get chapter|fictitious country|.*}}
#1 = fictitious country #2 = .*
{{#dpl: |category={{{1}}} |include=#Religion |titleregexp={{{2}}} |format=,<h2>'''[[%PAGE%|%PAGE%]]'''</h2> }}
DPL Example 007 main page 1
Nigunda
some facts about religious groups in Nigunda; some other facts about religious groups in Nigunda;Nigunda Test
some facts about religious groups in Nigunda; some other facts about religious groups in Nigunda Test;Somango
some facts about religion in Somango