Difference between revisions of "DPL:Bug Reports"

From FollowTheScore
Jump to: navigation, search
(<tt>debug</tt> doesn't work)
m (Protected "DPL:Bug Reports": frozen version of old bug reports [edit=sysop:move=sysop])
 
(83 intermediate revisions by 7 users not shown)
Line 1: Line 1:
Please add new bugs concerning DPL <big> '''at the bottom of this document'''</big>.
+
<center><big>This document is no longer in use. </big>
  If possible create a page in this wiki which demonstrates the bug and refer to that page!
+
[[:Category:Issue|See the list of bug reports ..]]
+
</center>
  '''Old bug reports have been moved to the [[DPL:Bug Reports Archive]]...'''
+
--------------------
 +
 
 +
There may be some bug reports in the following document which
 +
from the respective authors´ point of view still need answer.  
 +
  In such cases please create a Bug report according to the new pattern and copy the text.
 +
 
 +
[[User:Gero|Gero]] 14:12, 29 September 2007 (CEST)
 +
--------------------
 +
  Old bug reports have been moved to the [[DPL:Bug Reports Archive]]...
  
 
__TOC__
 
__TOC__
 
__NEWSECTIONLINK__ <!-- Makes it look like a talk page with + next to 'edit' -->
 
__NEWSECTIONLINK__ <!-- Makes it look like a talk page with + next to 'edit' -->
  
== ordermethod ignored form2 demo (repost) ==
 
  
{{# dpl:
+
==DPL and RSSfeeds clashing==
|category=Untranslated
+
Hi, our wiki uses Xfeeds and DynamicPageList extensions. There seems to be a problem when they are used on the same page though. An error occurs in the magpierss file that causes the formatting of the page to display the error at the top of the page, and then display the rest of the page. The error occurs on line 404 of the magpie file that Xfeeds uses. Is there a way to fix this?
|namespace={{ns:4}}
 
|shownamespace=false
 
|ordermethod=titlewithoutnamespace,firstedit
 
|addeditdate=true
 
|adduser=true
 
|addpagesize=true
 
|mode=userformat
 
|listseparators=¶{¦class="sortable" ¶!Script ¶!Last ¶!By ¶!Size,¶¦-¶¦style="background:#ccffcc;"¦[[%PAGE%|%TITLE%]]¶¦%DATE%¶¦[[Talk:%USER%|%USER%]]¶¦%SIZE%,¶,¶¦}
 
|secseparators=\n¦
 
}}
 
ordermethod is not processed. Bug to be [http://bugzilla.wikipedia.org/show_bug.cgi?id=10858 reported] in bugtracker. [[User:82.255.229.238|82.255.229.238]] 14:30, 9 August 2007 (CEST)
 
  
:The bug fix was included into the latest revision (1.3.3) [[User:Gero|Gero]] 11:13, 17 August 2007 (CEST)
+
== reset=categories doesn't always work with parser function usage ==
  
==Resultsheader with columns==
+
Example: See [[Test reset categories]], which includes part of [[Sudan]] (through a parser extension DPL call) and [[Test matches]] (through a parser function DPL call). Without the reset=categories call, it would inherit all the categories from both articles. With reset=categories, the categories from Sudan are suppressed, but [[:Category:Test]] (which comes from Test matches) is not suppressed. --[[User:Rezyk|Rezyk]] 12:33, 31 August 2007 (CEST)
The %PAGES% gives back <number of pages>/columns instead of <number of pages>. Is this intentional or a bug?
 
  
Page:[[Resultsheaderwithcolumns]]
+
=== Answer ===
 +
I had to do a lot of investigations regarding the "reset" parameter. And unfortunately it still doesn´t work always as expected. Are you a programmer? I could well need some help at that matter ... [[User:Gero|Gero]] 13:41, 31 August 2007 (CEST)
  
:It is a bug and will be resolved. [[User:Gero|Gero]] 21:08, 24 July 2007 (CEST)
+
:Well, I am no expert, but here are my thoughts after looking around in DPL 1.3.8 and MediaWiki 1.9.3:
 +
:Starting from the top level page parsing... <small>(function stack at Parser::parse)</small>
 +
:#First all <nowiki><dpl></nowiki> calls are each processed.
 +
:#:<small>(Parser::parse => Parser::strip => DynamicPageList2)</small>
 +
:##Each call also processes its category tags into mCategories before returning.
 +
:##:<small>(DynamicPageList2 => Parser::recursiveTagParse => Parser::internalParse => Parser::replaceInternalLinks)</small>
 +
:##Each <nowiki>"<dpl>reset=categories</dpl>"</nowiki> empties any mCategories categorization done.
 +
:#Then all <nowiki>{{#dpl:}}</nowiki> calls are each processed.
 +
:#:<small>(Parser::parse => Parser::internalParse => Parser::replaceVariables => Parser::braceSubstitution => wfDynamicPageList4)</small>
 +
:##Each call does ''not'' categorize into mCategories before returning. Any category tags are returned as part of unprocessed text.
 +
:##Each <nowiki>"{{#dpl:reset=categories}}"</nowiki> empties any mCategories categorization done.
 +
:#Then the top level result text as a whole processes its category tags into mCategories.
 +
:#:<small>(Parser::parse => Parser::internalParse => Parser::replaceInternalLinks)</small>
 +
:The error case is step 2.1 spitting out a category tag that dodges 2.2's mechanism (because it is unprocessed text, not in mCategories) and is processed into mCategories in step 3. One way to address this might be to have 2.1 do categorization processing like 1.1 does (have wfDynamicPageList4 apply recursiveTagParse to its result like DynamicPageList2 does). Any <nowiki>"<dpl>reset=categories</dpl>"</nowiki> would still not work against <nowiki>{{#dpl:}}</nowiki> effects, but subsequent <nowiki>"{{#dpl:reset=categories}}"</nowiki> would. Note: if that does work, I wonder if wfDynamicPageList4 should also return with noparse=true (see description of Parser::setFunctionHook).
 +
:A "more clean and thorough" design might be to apply that fix, and also have DynamicPageList2 and wfDynamicPageList4 each record/copy the state of mCategories before calling DynamicPageList and restoring that state (if say, categorize=false) after calling recursiveTagParse. --[[User:Rezyk|Rezyk]] 07:58, 1 September 2007 (CEST)
  
==DPL and Glossary clashing==
+
=== Reply 2 ===
===Question===
+
Thank you for clarifying this. It was a conscious design decision NOT TO call recursiveTagParse at the end of a DPL parser function call as this gives much more freedom to the user. For example today you can define a table outside a DPL call and then invoke DPL just to produce some rows for that table (the table may contain other rows coming from other DPL statements or rows which you wrote manually). If I called ''recursiveTagParse'' this would no longer be possible because the parser would not understand a pipe charater at the beginning of a line as a markup for a table row (because it wouldn´t know that it is inside a table when expanding DPL output).
Using DPL with Glossary seems to result in difficulties in combining categories. Thus previously working combinations of categories result in filtering of output only by the first category, and much larger outputs than intended.
 
  
Curious! Any ideas on a work-around?
+
Do you see a chance to get rid of unwanted category assignments without calling the parser?
===Reply===
 
:What is 'glossary'? Another mediawiki extension? If you want help you need to be more specific. You could upload a well-prepared example. If the glossary extension is needed for that I may be able to install it on this wiki. [[User:Gero|Gero]] 18:05, 22 July 2007 (CEST)
 
  
===Reply===
+
[[User:Gero|Gero]] 11:21, 2 September 2007 (CEST)
Glossary is a Mediawiki extension http://www.mediawiki.org/wiki/Extension:Glossary
 
The following is part of the example Glossary I was using.
 
  
<pre><nowiki>
+
:Hmm..although your explanation made sense and appeared to match observed behavior (parser extension calls recursiveTagParse and does not smoothly embed rows), I could not see why it should be true from the parser code. So I made a test installation of MediaWiki+DPL, and found:
AAP//American Academy of Pediatrics
+
:* Calling recursiveTagParse at the end of DPL parser function processing does ''not'' break table-row-embedding. The recursiveTagParse will not understand the '''"\n|"'''s as wikitable syntax, but will pass them through unaltered in the replacement text for the substitution, and they will be picked up as wikitable syntax during the parsing of the higher level result text (step 3 above).
ABR//auditory brainstem responses
+
:* The reason why DPL parser extension calls cannot manage table-row-embedding (with higher level results) is unrelated to its recursiveTagParse call. It is because parser extension results do not get substituted back in until after the higher level wikitable processing.
ACE//angiotensin-converting enzyme
 
ACPC//Area Child Protection Committee now Local Safeguarding Children's Board
 
ADH//antidiuretic hormone
 
ADHD//attention deficit hyperactivity disorder
 
</nowiki></pre>
 
  
The purpose of Glossary is to show the detailed text (after the //) when the mouse is over the abbreviated text.
+
:I don't see any way to do it without some intermediate parsing/processing at this level (and honestly, I expect that any other way found would have to be a hack that breaks some other design abstraction). Adding a recursiveTagParse call does seem to work well as far I have seen, though.
 +
:--[[User:Rezyk|Rezyk]] 07:47, 3 September 2007 (CEST)
  
I previously had functional queries in DPL. Subsequently, I added Glossary and could get this working. However, when I went back to my pages that used DPL, I found that they had been corrupted producing far more results than usual. This suggested that Glossary was somehow interfering with the DPL logic. I switched Glossary off, as DPL is more useful to me, and found that DPL worked as before.
+
::I've had a fair bit of trouble with wiki-table syntax within templates and parser-functions before and found that sometimes it's best to resort to using html syntax for the tables which doesn't confuse the parser so much. --[[User:Nad|Nad]] 08:03, 3 September 2007 (CEST)
  
== All Chinese messages are wrong in DynamicPageList2.i18n.php==
+
:::Which requires yet more syntax/markup conversion between HTML and MediaWiki, making extensions (like [[mw:Semantic Forms|Semantic Forms]]) even more annoying to use, especially with tables and creating links to pages on the current wiki). Bah... -[[User:Eep²|Eep²]] 12:54, 3 September 2007 (CEST)
Every Chinese character has become "??", not normal Chinese character.[[DPL source as a ZIP archive|The DynamicPageList2.i18n.php in the Zip file here]] also has wrong Chinese characters. See this [http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/DynamicPageList2/DynamicPageList2.i18n.php?view=log page] if you want to get the DynamicPageList2.i18n.php with right Chinese character.--[[User:Roc michael|Roc michael]] 11:42, 4 July 2007 (CEST)
 
  
==DPL and RSSfeeds clashing==
+
::::This is a problem which applies to wikitext tables when used with parser-functions in general and concerns the wiki-parser code not the code of any particular extension implementing them. --[[User:Nad|Nad]] 05:43, 4 September 2007 (CEST)
Hi, our wiki uses Xfeeds and DynamicPageList extensions. There seems to be a problem when they are used on the same page though. An error occurs in the magpierss file that causes the formatting of the page to display the error at the top of the page, and then display the rest of the page. The error occurs on line 404 of the magpie file that Xfeeds uses. Is there a way to fix this?
 
  
==Columns Bug==
+
:::::However, an extension which mindlessly disables wiki markup also has other effects, as I previously mentioned. Duh. -[[User:Eep²|Eep²]] 06:53, 4 September 2007 (CEST)
When I use the columns setting, it breaks the background-colour I have set. If I remove it, the background-colour comes back.<br>
 
Contact me [http://en.marveldatabase.com/User_talk:Jamie here], if you have any further questions.<br>
 
--[http://en.marveldatabase.com/User:Jamie Jamie]
 
  
:Can you demonstrate the effect here or in your wiki? [[User:Gero|Gero]] 05:18, 25 July 2007 (CEST)
+
::::::I would like every-one in this Wiki to treat all others with respect. Building good software requires a lot of energy. We shouldn´t waste energy on an emotional level. Personally, I respect the efforts of Semantic Net Approaches very much. I have been working with databases that represented 'semantic triples' like RDF when even abbreviations like OWL and RDF had not been born. I see a lot of potential in DPL but I also see its limitations. I inherited the code about 10 months ago and did not have the courage to change it fundamentally (although I should have done so). Anyway, if somebody has the courage, here is my challenge and my vision for a ''DPL3'':
 +
::::::* DPL3 should use a well designed language for expressing which kind of information you want. The Semantic World has a lot to offer here.
 +
::::::* DPL3 should have a ''Mapping Layer'' in which the author of a wiki defines how the constructs of that abstract language can be mapped to the pecularities of a special wiki.
 +
::::::* I am not sure if the mapping layer would state rules which are interpreted dynamically whenever a query is executed or whether it would define a set of rules which is used to fill auxiliary tables whenever a document gets updated. All systems I have built in former times (except DPL) have been using such tables.
 +
::::::* output formatting should be completely separate from the query engine (i.e. the query might produce an intermediate XML text)
 +
::::::Let me finally add that my time does definitely not allow to attack a task like ''DPL3''. But I will try to keep up DPL until I see something better coming up.
 +
::::::--[[User:Gero|Gero]] 13:09, 4 September 2007 (CEST)
  
::Sorry about that.
+
::Would it be helpful if I submitted a modification that used recursiveTagParse to handle something like "categorize=false", and was still able to handle wikitable row embedding? --[[User:Rezyk|Rezyk]] 00:55, 6 September 2007 (CEST)
::[http://en.marveldatabase.com/User:Jamie/DPL_Bug Here] ya go. :)
 
::--[http://en.marveldatabase.com/User:Jamie Jamie]
 
  
:::Have you seen [[DPL:Requests_for_new_features_Archive#Global background-color]]? Maybe you have the same problem?
+
== <tt>distinct</tt> ==
:::[[User:Gero|Gero]] 15:30, 27 July 2007 (CEST)
 
  
== When using simple tables in the included page ==
+
<tt>[[distinct]]</tt> (defaults to true) seems to have problems with this query in a template:
  
When using simple tables in the included page, the first to be included looks strange [[Table bug]] and not as the original [[Table Bug 2]]. All the others [[Table Bug 3]] and [[Table Bug 4]] look different but still not right in the DPLed list.
+
<pre><nowiki>
 +
{{#dpl:
 +
category=Games
 +
|linksto={{PAGENAME}}{{!}}{{PAGENAME}}s{{!}}{{PAGENAME}}es{{!}}{{PAGENAME}}ies{{!}}{{PAGENAME}}ing{{!}}{{PAGENAME}}ed{{#if:{{{2}}}|{{!}}{{{2}}}{{!}}{{{2}}}s|}}{{#if:{{{3|}}}|{{!}}{{{3}}}{{!}}{{{3}}}s|}}
 +
|redirects=include
 +
|resultsheader=<h2>Games (%PAGES%)</h2>
 +
|noresultsheader=<h2>Games (0)</h2>''No games have this effect.''
 +
}}
 +
</nowiki></pre>
  
Is this a bug? And if so is there a workaround or anything I can do to avoid that (except of not using simple tables...)?
+
...showing duplicate entries for a [http://www.tnlc.com/wiki/index.php?title=Carnivores_2 game] (that has links to "bubbles" ''and'' "water bubbles" on it) on http://www.tnlc.com/wiki/index.php?title=bubble which has this on it:
Please inform me about your reply:
 
[[User:NaSe1977|NaSe1977]] 13:11, 25 July 2007 (CEST)
 
  
:You may consider it a bug or a feature: DPL does not automatically insert newlines between the articles. That´s the reason why the output looks so strange. I modified your  [[Table bug]] article to show how two additional lines solve the problem.
+
<pre><nowiki>{{effect|liquid bubble|water bubble}}</nowiki></pre>
:[[User:Gero|Gero]] 16:52, 26 July 2007 (CEST)
 
::Thanks a lot, this helped. Strange enough my DPL2 1.2.9 does not seem to know format, do I have to enable it anyhow? (I used mode=userformat' and 'listseparators=...' instead)
 
::[[User:NaSe1977|NaSe1977]] 09:15, 27 July 2007 (CEST)
 
:::You may have downloaded the ZIP file just before I had updated it. Please try again and look for the String "'format'" in the source. [[User:Gero|Gero]] 09:51, 27 July 2007 (CEST)
 
  
== Parser functions and templates in <dlp> versus #dpl ==
+
...which should just show the game once (the first parameter is for a Wikipedia link). -[[User:Eep²|Eep²]] 12:11, 5 September 2007 (CEST)
  
I try to call a parser function from within <nowiki><dpl></nowiki> and <nowiki>#dpl</nowiki> and find that the latter does not work. For example, I have the following
+
:Seems to be a bug, but I am not sure. Can you create a tiny example here in this wiki to show the effect?
<pre>
+
:--[[User:Gero|Gero]] 20:45, 5 September 2007 (CEST)
listseparators=,\n* [[%PAGE%|%TITLE%]] &nbsp; (%CATLIST%)({{HEKtest3|%PAGE%}}) {{#sub:%TITLE%|0|7}}, 
 
</pre>
 
  
using <nowiki><dpl></nowiki> both the #sub function and the HEKtest3 template works as they shall.
+
::Would you rather just be able to view the source of the aformentioned pages? Although I've already given you the relevant code... -[[User:Eep²|Eep²]] 05:44, 6 September 2007 (CEST)
For #dpl, the result of the #sub is just the text TITLE. For the macro HEKtest3 it's even more strange, because if I output the parameter like <nowiki>{{{1}}}}</nowiki> it works fine, but if I use #sub on the parameter within the same template it does not output anything. So it seems the template has the correct value, but can not use it for anything other than simple output.
 
  
Again - this works fine with <nowiki><dpl></nowiki>.
+
:::No. I need to change the code, activate debugging etc. Give an example here and I will look for it. [[User:Gero|Gero]] 19:46, 6 September 2007 (CEST)
  
Could it be the pipe-character that is the problem?
+
::::OK, see [[test distinct]] for a templateless version that still exhibits the bug (and see [[DPL:Discussion#Exclusion_of_Duplicate_Pages]] for an earlier misplaced bug report by an anonymous user from over a month ago, too). -[[User:Eep²|Eep²]] 10:24, 7 September 2007 (CEST)
  
Thanks
+
== <tt>debug</tt> doesn't work ==
H
 
  
:Possibly; try using [[template:!]] or ¦ per [[DPL:Manual - General Usage and Invocation Syntax#Using DPL2 as a parser function]]. -[[User:Eep²|Eep²]] 12:34, 9 August 2007 (CEST)
+
In trying to diagnose why the following query shows the "See also" header even when no results are found, I tried adding <tt>[[debug]]</tt> to it but then all text is removed from a page (and if <tt>debug=3</tt> is at the end, no warning is given about it should be in the beginning either):
  
::Thanks - it helped a little. But:
+
<pre><nowiki>{{#dpl:debug=3|namespace=|titlematch={{PAGENAME}}%|resultsheader=\n<h2>See also</h2>|noresultsheader=<div style=display:none></div>}}</nowiki></pre>
::*<nowiki>{{HEKtest3¦%CATNAMES%}}</nowiki> now works fine. The template is able to use the content of %CATNAMES%
 
::*<nowiki>{{HEKtest3¦%PAGE%}}</nowiki> does not work! It creates an output that contains a '''link''' to the HEKtest3 template with the content of %PAGE% as the dislpay text. Weird!
 
::*<nowiki>{{HEKtest3¦%TITLE%}}</nowiki> caused the same problem as above
 
::*The <nowiki>#sub</nowiki> function does not work with ¦ either (see description of problem above)
 
  
:::Well, if all you want are the page name and title, try using the MediaWiki magic words <tt><nowiki>{{FULLPAGENAME}}</nowiki></tt> (includes namespace) and <tt><nowiki>{{PAGENAME}}</nowiki></tt> (page title only). -[[User:Eep²|Eep²]] 17:50, 10 August 2007 (CEST)
+
<!--
 +
{{#dpl:debug=3|namespace=|titlematch={{PAGENAME}}%|resultsheader=\n<h2>See also</h2>|noresultsheader=<div style=display:none></div>}}
  
::::Thanks, but that only gives me the name of the page I'm on, and not the name of the page retrieved by the <nowiki>#dpl</nowiki> function
+
{{#dpl:debug=3|namespace=|titlematch={{PAGENAME}}%|resultsheader=\n«h2»See also«/h2»|noresultsheader=«div style=display:none»</div»}}
 +
-->
 +
'''Uncomment the hidden queries (with and without "double angle brackets") above in edit mode to see for yourself.'''
  
:::::This problem can be easily solved in the latest revision with ²{...}², see the manual. The idea is that this special markup will be translated to twin curly braces during the iteration over the DPL result set. [[User:Gero|Gero]] 20:49, 15 August 2007 (CEST)
+
Oddly, as a tag, the query doesn't hide the page but doesn't output any debug (or ''any'') info either (should at least complain about <tt><nowiki>{{PAGENAME}}</nowiki></tt> not working inside a tag...:
  
== addpagesize does not correctly report the size of the page ==
+
<pre><nowiki>
 
+
<dpl>
This is a bit pedantic, but its an important 'bug' in my wiki; See the following;
+
debug=3
 
+
namespace=
<pre><dpl>
+
titlematch={{PAGENAME}}%
category = page size test
+
resultsheader=\n<h2>See also</h2>
mode = ordered
+
noresultsheader=<div style=display:none></div>
ordermethod = size
+
</dpl>
order = ascending
+
</nowiki></pre>
addpagesize = true
 
</dpl></pre>
 
  
 +
In trying to get a query that works here, I don't know why this isn't outputting anything either:
 +
<pre><nowiki>
 
<dpl>
 
<dpl>
category = page size test
+
debug=3
mode = ordered
+
namespace=
ordermethod = size
+
titlematch=Test%
order = ascending
+
resultsheader=\n<h2>See also</h2>
addpagesize    = true
+
noresultsheader=<div style=display:none></div>
 
</dpl>
 
</dpl>
 +
</nowiki></pre>
 +
It should show the [http://semeb.com/dpldemo/index.php?search=test&fulltext=Search many articles that start with "Test"]. -[[User:Eep²|Eep²]] 06:22, 8 September 2007 (CEST)
 +
 +
:#Try using '''double angle brackets''' like this  «tt»...«/tt». also around the '''div''' tags. This will postpone tag expansion to the execution time of DPL. This may help.
 +
:#Variables like PAGENAME are not expanded if you use parser tag syntax like &lt;dpl&gt; change the DPL call to curly braces (i.e. parser function syntax)
  
As you can see by clicking above both pages are apparently about the same size, and page 1 is aparently a bit bigger. By looking at the source of the two pages we can see that this is only the case once the included template text has been taken into account. That is why I call "ordermethod = size" and "addpagesize = true" buggy... They should use the apparent size of the 'rendered page', not the size of the source code for that page.
+
::I know about "magic words" not being usable inside parser tags but the main issue is <tt>debug</tt> not working at all (which has nothing to do with double angle brackets--which also have no effect on the query--see above and uncomment the hidden parser ''function'' queries in edit page mode to test for yourself in preview mode)... -Eep
  
I think this could be fixed... It would be a big help for me if it was... http://biodatabase.org/index.php/Sandbox
+
:3. The last query you wrote produces correct debug output on my test wiki but does not do so here. I will have to find out why; if you leave away the debug statement you get the expected output, right?
  
Thanks for the great extension! --[[User:Dmb|Dmb]] 09:32, 10 August 2007 (CEST)
+
::No; hence why I'm even bothering to use <tt>debug</tt> in the first place to find out ''why'' the query isn't giving the expected results as I explained in the first sentence in this section above... -Eep
----
 
--[[User:Dmb|Dmb]] 09:32, 10 August 2007 (CEST)
 
  
=== Reply ===
+
:4. Read the [[DPL:Manual_-_General_Usage_and_Invocation_Syntax|manual chapter]] on syntax. It is extremely important. Maybe you can improve the text in the manual to help others in avoiding mistakes. I did my best to explain. [[User:Gero|Gero]] 12:04, 8 September 2007 (CEST)
Summing up the size of included templates would be quite time consuming. I suggest that you create a DPL query which goes over the "original master date" (The copyrighted articles, I assume) and that you convert the link which DPL presents to the user into a link which points to your own article. Of course this is only possible if your article has a 1:1 correspondence with the master articles and if there is a consistent naming convention so that the name of your article can be algorithmically deduced from the master article´s name. O.k.??
 
<br>[[User:Gero|Gero]] 20:54, 15 August 2007 (CEST)
 
: Yup... but how do I do it??? Cheers, --[[User:87.160.217.187|87.160.217.187]] 20:09, 24 August 2007 (CEST)
 
::Quite simple: use the namespace, categories etc. which apply to your raw data articles, set addpagesize=yes and use 'replaceintitle' to make the transformation of the title. Have a careful look into ther manual ;-). If you really can´t figure out how to do it, create demo pages which reflect the principle structure of your current pages here in this wiki and I´ll show you how to do it. ::::
 
  
== Wrong number of items per column ==
+
::Please re-read my initial bug report... -[[User:Eep²|Eep²]] 12:19, 8 September 2007 (CEST)
  
Hi, I'm dealing with a DPL report that finds 116 articles and place them in 8 columns as specified by the following DPL parser function:
+
:::O.K. I did not read carefully enough.
 +
:::* To me it looks as if the only problem ist that ''debug=3'' always leads to an empty page (which is bad enough ..). ''Debug=3'' works in my private wiki and hopefully does so on yours. At the moment I have no idea why it has that effect here on dpldemo ...
 +
:::Apart from that your first query is o.k. (I replaced PAGENAME by a fixed value) If you use PAGENAME (which is o.k. of course) then you must use the statement ''within a template'' as the very page where the DPL statement itself is located never will be wshown as part of the outpout. This is due to very complicated recursion loop problems and is not likely to change.
  
<pre>
 
{{#dpl:
 
  |titleregexp=^TRB....$
 
  |mode=userformat
 
  |listseparators={{!}} valign="top" style="padding-right:20px;" {{!}},\n* [[%TITLE%]],,
 
  |columns=8
 
  |rowcolformat=style="color:black; background-color:white; text-align:left; vertical-align:top;"
 
  |replaceintitle=/ /,_
 
}}
 
</pre>
 
  
The problem is: I get four columns with 15 items and four columns with 14 items, when the ideal would be 7 columns with 15 items and the last column with whatever is left (11 in this specific case). Is this some kind of off-by-one error in the code? I will try to reproduce it here, with a smaller number of articles: stay tuned!- [[User:Manu3d|Manu3d]] 13:29, 16 August 2007 (CEST)
+
:<tt>debug=3</tt> does not work on my wiki; it results in a blank page as this section's bug report is all about... And, oddly, if I use <tt>debug=4</tt> (see [[test debug]]) I get the SQL query at the page's top (over the logo but under the actions/personal portlets) but the page is otherwise blank (at least in terms of the DPL query and how it should be formatted). -[[User:Eep²|Eep²]] 14:33, 9 September 2007 (CEST)
  
By the way, this is a screenshot of what I see:
 
  
[[Image:DplColumnProblem.jpg]]
+
----
 +
::: If we replace the titlematch by something which does not exist the output is empty as we would expect (there is no difference in the kind of angle brackets we use):
 +
<pre><nowiki>
 +
{{#dpl:namespace=|titlematch=NONEXISTING%|resultsheader=\n<h2>See also</h2>|noresultsheader=<div style=display:none></div>}}
 +
</nowiki></pre>
 +
---
 +
So my conclusion is that the debug=3 is the only remaining problem. Could you check on your wiki if 'debug=3' works there? [[User:Gero|Gero]] 10:25, 9 September 2007 (CEST)
  
(A few minutes later) I managed to reproduce the problem but it seems to point to a conceptual issue. Check out my user [[User:Manu3d|page]]. The problem is that the code tries to spread evenly the results over the maximum number of columns, adapting the number of items per column to put something into each column. Ideally, using "rows=" together with "columns=" estabilishes the number of items each column contains, potentially reducing the number of visible columns from the number estabilished by the user.
+
== ordermethod=category,sort produces duplicates ==
  
Is there a way around this?
+
There are four entries in [[:Category:African Union member states]], but each is repeated up to six times in this DPL call.  distinct=true does not affect the results:
  
Thanks for your help. - [[User:Manu3d|Manu3d]] 13:52, 16 August 2007 (CEST)
+
<nowiki>
 +
{{#dpl:category=African Union member states
 +
|columns=6
 +
|ordermethod=category,sortkey
 +
|distinct=true
 +
}}
 +
</nowiki>
 +
{{#dpl:category=African Union member states
 +
|columns=6
 +
|ordermethod=category,sortkey
 +
|distinct=true
 +
}}
  
===Reply===
+
If the ordermethod is removed, it works fine:
Indeed DPL tries to spread the results evenly over the columns. So far nobody complained about that... Why is it important to have a less well balanced output scheme? [[User:Gero|Gero]] 23:00, 16 August 2007 (CEST)
 
  
:That isn't balanced, Gero. It should be equal column lengths until the very last column. At least make your idea of "balanced" columns optional... Your way seems balanced for horizontal/row lists (as in [[Special:Allpages]]):
+
{{#dpl:category=African Union member states
<pre>
+
|columns=6
1  2  3  4
+
}}
6 7  8
 
9 10 11 12
 
13 14 15 16
 
</pre>
 
  
and not vertical/column lists:
+
[[User:66.83.143.246|66.83.143.246]] 23:49, 11 September 2007 (CEST)
<pre>
 
1 5  9 13
 
2 6 10 14
 
3 7 11 15
 
4 8 12 16
 
</pre>
 
  
-[[User:Eep²|Eep²]] 11:10, 17 August 2007 (CEST)
+
=== Reply ===
 +
I don´t think this is a bug. Each of the countries belongs to several categories and you told DPL to order the articles by category. What should poor DPL do? It tries its best in creating a list for each category and ordering each of that lists by articlename (sortkey). If you use ''headingmode'' you can see that:
  
I agree with Eep², the current way of handling it seems to originate from row-oriented thiking and it's fine for that purpose. But you wouldn't want a row-oriented result looking like this, would you:
+
<nowiki>
 +
{{#dpl:
 +
|category=African Union member states
 +
|ordermethod=category,sortkey
 +
|headingmode=H4
 +
|columns=3
 +
}}
 +
</nowiki>
 +
What do you really want to achieve with your query?
 +
:--[[User:Gero|Gero]] 08:55, 12 September 2007 (CEST)
  
 +
::I would expect it to have the same four entry output as the query without ''ordermethod=category,sortkey'', but with the entries ordered by the category sort order.  This would produce each of the four only once, although I see that the behaviour with ''headingmode'' has a very different result.  What query will result in only the four entries in the category, sorted by their sortkey in the category?  Say if [[Somalia]] was in the category ''Category:African Union member states|Ancient Name'' so that it sorted before [[Cameroon]] in the DPL result.  What I am trying to accomplish is a query that returns instructions in the order that they are to be done, where each instruction is a separate page and in a category with a numerical sort key for their ordering.  If I use ''category=sortkey'', I get an SQL error:
 
<pre>
 
<pre>
1  2  3  4
+
Unknown column 'cl_head.cl_sortkey' in 'field list'
5  6  7  8
+
</pre> -- [[User:66.83.143.246|66.83.143.246]] 13:52, 12 September 2007 (CEST)
9 10 11 12
 
13 14 15
 
16 17 18
 
19 20 21
 
</pre>
 
  
-[[User:Manu3d|Manu3d]] 11:38, 17 August 2007 (CEST)
+
:::Look at [[:Category:Step]]. I tried to build a small example. Can you demonstrate your problem using that example?
 +
:::--[[User:Gero|Gero]] 08:50, 13 September 2007 (CEST)
  
===Decision===
+
::::I see that sorts all of the [[:Category:Plan]] steps before all of the [[:Category:Execute]] steps, but the steps in each category are unordered. What I need is the ability to sort the individual entries in the category by their sortkey rather than alphabetically. For instance, what if the [[Task think]] step must happen before the [[Task buy food]] step?  (Otherwise you just purchase the groceries without planning what to make)  It seems that '''ordermethod=sortkey''' should do it, but this produces an sql error: [[User:66.83.143.246|66.83.143.246]] 17:02, 13 September 2007 (CEST)
O.k., your arguments convinced me. Will be changed in the next version. [[User:Gero|Gero]] 14:38, 17 August 2007 (CEST)
 
  
:Well, you don't have to choose one way over the other, but if you allow both list directions (as an option), the associated balancing should take effect with it. -[[User:Eep²|Eep²]] 15:12, 17 August 2007 (CEST)
+
{{#dpl:
 +
|category=Plan
 +
|ordermethod=sortkey
 +
}}
  
==Question Re: Templates==
+
:::::Indeed there is a bug with the sortkey ordermethod. It works if you write "sortkey,category" as you can see on the [[:Category:Step]] page. But inside the nested query the comma is misunderstood. Therefore you must call a separate Template. Not beautiful, but o.k. as a work-around, I think.
This isn't really a bug, but I wanted ask about this. If I have a template called 'Awards' and the template took too fields 'Award' and 'Date' where Award is a name of an award from a specific list and date is the date its awarded, can I use DPL to get a list of all pages using the 'Awards' template with 'Five Year Award' in the Award field?
+
:::::--[[User:Gero|Gero]] 18:53, 13 September 2007 (CEST)
-Thanks. 18:21, 18 August 2007 (CEST)
 
  
===Answer===
+
== <tt>[[titlematch]]</tt> rendering ==
You should be able to do this with uses=Template:Award, include={Awards}.dpl and includematch=/Five Year Award/ ; see the manual for details. There are [[Test includematch|examples for similar applications of DPL]] on this website. Your template Awards.dpl should contain code that produces a table row in your result. [[User:Gero|Gero]] 20:41, 18 August 2007 (CEST)
 
  
 +
I'm having trouble getting this query to render correctly in [[MediaWiki:Noexactmatch]]. If I render it as:
  
==The bug of Template:Catlist? ==
+
<pre><nowiki>{{#dpl:namespace=|titlematch=%$1%|noresultsheader=none}}</nowiki></pre>
When I import the [[Template:Catlist]], it became what is shown below; [[Image:Catlist_error_msg_001.png|center|350px]]
 
  
Could anyone give me a hand? please! {{nosigr|06:36, August 21, 2007|Roc michael}}
+
...it gives "none" for every page, even if the page actually ''has'' pages that use "$1" (the searched-for string). So then I tried it as a parser tag:
  
::Do you have [[mw:Simple Forms|Simple Forms]] and [[Call]] installed per [[DPL:Catlist]]? -[[User:Eep²|Eep²]] 09:08, 25 August 2007 (CEST)
+
<pre>
 +
<nowiki>
 +
<dpl>namespace=
 +
titlematch=%$1%
 +
noresultsheader=none
 +
</dpl>
 +
</nowiki>
 +
</pre>
  
:::Thank you, Eep²! Please see [[DPL:Bug Reports#The bug(s) is/are nothing about DPL|The bug(s) is/are nothing about DPL]].
+
But then I just get "UNIQ8b04b9c2c32d65b-dpl-00000004-QINU"... -[[User:Eep²|Eep²]] 14:17, 13 September 2007 (CEST)
  
=== environment setting ===
+
:Why don´t you try
*MediaWiki: 1.10.0
+
:<pre><nowiki>{{#dpl:namespace=|titlematch=%{{{1}}}%|noresultsheader=none}}</nowiki></pre>
*PHP: 5.1.6 (apache2handler)
+
:[[User:Gero|Gero]] 18:39, 13 September 2007 (CEST)
*MySQL: 5.0.24a-community-nt-log
 
* Parser hooks
 
*# CategoryTree
 
*# CharInsert
 
*# Cite
 
*# CreateBox (version 1.5)
 
*# CSS (version 1.0.0, 2007-06-15)
 
*# CurrentUsers (version 1.0.2, 2007-07-26)
 
*# DPLforum (version 3.2)
 
*# DynamicPageList2 (version 1.3.1)
 
*# Inputbox
 
*# LabeledSectionTransclusion
 
*# NiceCategoryList
 
*# ParserFunctions
 
*# RegexParserFunctions (version 0.1)
 
*# Semantic Forms (version 0.5)
 
*# Semantic MediaWiki (version 0.7)
 
*# Simple Forms (version 0.3.4, 2007-08-03)
 
*# SimpleTable
 
*# StackFunctions (version 0.6)
 
*# StringFunctions (version 1.9.3)
 
*# SyntaxHighlight
 
*# Variables
 
*# Winter (Wiki INTERpreter) (version 2.0.2)
 
=== Reply===
 
Open the Catlist article and remove one leading '{' from the #dpl statement. Thus you will see the input which is sent to DPL. Then check the argument of the namespace parameter. You seem to have user defined namespaces. Make sure that they start with numbers of 100 and greater (as recommended). [[User:Gero|Gero]] 16:24, 21 August 2007 (CEST)
 
  
====Different results====
+
::Because it's not a template and <tt>$1</tt> is what the MediaWiki page is already configured to accept as the input (search) string... I tried adding the braces but then I get this error:
Thank you, Gero!
+
:::<b>Warning</b>:  array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object in <b>../wiki/includes/Parser.php</b> on line <b>3316</b>.
 +
::-[[User:Eep²|Eep²]] 06:10, 14 September 2007 (CEST)
  
After your instructions, I'v found that some different results, but I still don't know what're the reasons.
+
::Still need help with this... -[[User:Eep²|Eep²]] 23:23, 18 September 2007 (CEST)
The statements like bellows:  
 
<nowiki> {{#dpl: namespace=Category | format = ,\n*%TITLE%,, }}</nowiki>
 
and
 
<nowiki> {{#dpl: namespace=Template | format=,\n*%TITLE%,, }}</nowiki>
 
Could cause the results
 
%DPL-1.3.1-??: ??? 'namespace' ??: 'Category'! ??: namespace= ???? (?) | Attribute | Attribute_talk | RD | RD_talk | Relation | Relation_talk....?
 
and
 
%DPL-1.3.1-??: ??? 'namespace' ??: 'Template'! ??: namespace= ???? (?) | Attribute | Attribute_talk | RD | RD_talk | Relation | Relation_talk....?
 
But in this site thay don't make this results? I notice that the version of between this site and mime are different. Is it the reason.
 
Please help me! --[[User:Roc michael|Roc michael]] 00:51, 22 August 2007 (CEST)
 
====The bug(s) is/are nothing about DPL====
 
After several my testing I found the bug(s) I met is/are nothing about DPL. The reason of the bug(s) is/are that I've ruined my testwiki by changing charset of [http://www.mediawiki.org/wiki/Manual_talk:LocalSettings.php#Shuld_I_save_Localsetting.php_as_utf8_encoding_.3F Localsetting.php] to utf8 and ansi again and again.
 
  
Whan I changed the charset of [http://www.mediawiki.org/wiki/Manual_talk:LocalSettings.php#Shuld_I_save_Localsetting.php_as_utf8_encoding_.3F Localsetting.php], my wiki-system will become unstable and some arguments of DPL can't work.
+
::: I do not understand what the "$" should do. What do you mean by 'search string'? I see no functionality in mediawiki which would try to replace a $ character within a document by some value ...
 +
::: [[User:Gero|Gero]] 19:00, 19 September 2007 (CEST)
  
Thank Gero and others. You are very kind.--[[User:Roc michael|Roc michael]] 14:42, 22 August 2007 (CEST)
+
::::If you look at [[MediaWiki:Noexactmatch]] you will see it uses "$1" as a variable for the search string (the text string that was entered into the search field). This is common throughout [[Special:Allmessages|MediaWiki system messages]]... -[[User:Eep²|Eep²]] 05:27, 20 September 2007 (CEST)
  
== SQL error with uses= and linksfrom= ==
+
=== Reply ===
 +
Now I understand. The $-replacement is a very special mechanism which only applies to MediaWiki messages. Changing the default message in a way that it presents similar pages to the editor is a very nice idea!
 +
* The following dpl statement does the job:
 +
<pre><nowiki>
 +
'''There is no page titled "$1".''' You can [[:$1|create this page]].
 +
<dpl>
 +
debug=1
 +
resultsheader=&nbsp; &nbsp; ''There are some pages similar to '$1':''\n
 +
titlematch=%$1%
 +
</dpl>
 +
</nowiki></pre>
 +
* I installed it here, so you can watch it live if you e.g. enter "Nig" in the searchbox.
 +
* Could you test in your wiki and publish a statement in the FAQ here as others might want to adopt it?
 +
[[User:Gero|Gero]] 12:37, 20 September 2007 (CEST)
  
1.3.2 had this bugfix:
+
:Doesn't work; I still get "UNIQ5f1c6b5250d04dee-dpl-00000002-QINU" with just
;Bugfix with SQL error:ambiguous 'page_name' in SQL statement fixed (appeared when namespace= and linksfrom= were used together)
 
I believe there is a similar bug with 'page_id' in the SQL statement which appears when uses= and linksfrom= are used together. I put an example on [[Test linksfrom]], which now errors: ''MySQL returned error "1052: Column 'page_id' in where clause is ambiguous (localhost)"''. It appears that uses= adds a reference to page_id which should be something like `page`.page_id instead.
 
  
=== Answer ===
+
<pre>
Thank you for reporting that error. If you find a problem with a DPL statement, please add 'debug=4' as first parameter. This will echo the SQL statement even if it is buggy. Otherwise calling an article with such a DPL statement will reuslt in an empty page so that the user has no idea what went wrong.
+
<dpl>
:Indeed there are some other parameter combinations (only with linksfrom) which cause the same error, for example revision+linksfrom. Will be repaired. [[User:Gero|Gero]] 09:06, 24 August 2007 (CEST)
+
debug=1
 +
titlematch=%$1%
 +
</dpl>
 +
</pre>
  
== Direct subcategory feature broken by spaces? ==
+
:-[[User:Eep²|Eep²]] 13:16, 20 September 2007 (CEST)
  
I added this example to [[Test category hierarchy‎]]. "category=*African Country" appears to not descend any subcategories, but "category=*African_Country" works correctly. {{nosigr|18:43, August 23, 2007|64.186.172.226}}
+
::You will have to get help from elsewhere. It works here in the DPLDEMO wiki and the UNIQ...stuff does not come from DPL. [[User:Gero|Gero]] 13:39, 20 September 2007 (CEST)
  
:Yes. The bug will be corrected soon. [[User:Gero|Gero]] 14:40, 26 August 2007 (CEST)
+
:::I've checked elsewhere but the results imply the bug is from earlier MediaWiki/DPL versions:
  
==Deleted pages show up on Special:Wantedpages==
+
:::* [[mw:Extensions_FAQ#.22NaodW....22_or_.22UNIQ....22]]
I have a query that pulls back a list of pages in a category called "Spec Work Required".  I've had two matching articles that proved to be unnecessary and were deleted.  They no longer show on the page with the query, but when I look at the special page, "Wanted Pages", they appear.
+
:::* http://meta.wikimedia.org/wiki/QINU_fix
 +
:::* http://meta.wikimedia.org/wiki/DynamicPageList2/Improvements_and_Changes#Hack_v0.5
 +
:::* [[mw:Extension:LifeMarks]] has a blurb about a bug caused by a double-call of <tt>parse()</tt>, rendering other extensions into UNIQ tags
  
I restored one of them, removed the categories, saved the change, and deleted the article again, and it still appears on the Wanted Pages list.
+
:::(You might want to add the "meta" interwiki link, too.) -[[User:Eep²|Eep²]] 13:51, 20 September 2007 (CEST)
  
The wiki where this is going on is a private one where my software development team is spec'ing a fairly large software application, so I can't share the pages with anyone at this time.  In order to try to demonstrate the problem further, I created [[The Deleted Republic]] on this site.  I don't seem to have rights to delete that page, though, so I can't complete the bug test.
+
== <tt>[[linksto]]</tt> including links in included template ==
  
To complete it, someone with adequate rights would have to delete [[The Deleted Republic]], check to see that it has in fact been removed from the [[Example 1#Country List|country list]], then check [[:Special:Wantedpages|Wanted Pages]] to see if the article appears.  If it does, then I'd say the bug is verified.
+
I have a [http://www.tnlc.com/wiki/index.php?title=Template:game game template] which has links to various pages that shows which games (that use template:game) link to them (such as [http://www.tnlc.com/wiki/index.php?title=ride ride] which uses [http://www.tnlc.com/wiki/index.php?title=Template:action template:action]). However, now each page will show ''every'' game that uses template:game--even if the actual game's text does not have an actual link to the page. This seems like a bug to me... -[[User:Eep²|Eep²]] 14:05, 14 September 2007 (CEST)
  
At this point, this is not a critical bug as my team is pretty careful about checking our Wanted Pages list to make sure we're not referring to lots of specs that don't exist, but I'm thinking about incorporating this extension into another wiki site where it could be much more problematic.
+
:OK, I figured it out on my own (again, while editing [[C#Combine queries and use a nested query for redirect tracking]], which I still think needs to be better explained and implemented into DPL without requiring nested queries and yet another template to do a redirect list that MediaWiki does natively...see [[DPL:Discussion#Redirects to include pages that link to them?]] for more info). I had to use <tt>[[reset]]</tt> and put <tt><nowiki>{{#dpl:reset=links}}</nowiki></tt> after the DPL statement in the game template. -[[User:Eep²|Eep²]] 08:00, 15 September 2007 (CEST)
  
--[[User:Aaron Overton|Aaron Overton]] 20:26, 25 August 2007 (CEST)
+
:OK, ''not'' resolved. Sheesh...now ''no'' links to ''anything'' on a game which uses template:game is showing up on other pages. What the hell? Only existing links in the ''template'' should not cause games with the ''template'' to show up in lists--while still allowing links in template ''parameter fields'' to still show the game in lists. -[[User:Eep²|Eep²]] 08:07, 15 September 2007 (CEST)
  
===Answer===
+
::And even if I <tt><nowiki>{{#if:}}</nowiki></tt> each row to only show filled-in template fields in the table, then my <tt>rowspan</tt>s get screwed up. :/ -[[User:Eep²|Eep²]] 10:11, 15 September 2007 (CEST)
Hello Aaron, I tried to follow the procedure outlined above. After deleting "The Deleted Republic" it still shows on the WantedPages -- but because this very article refers to it ;-)). I suggest that you try in your wiki the following:
 
* delete an article which is part of a DPL result
 
* execute runJobs.php (in the maintenance directory) OR wait for an hour OR open the article containing the query and saving it without changes.
 
* Each of these steps should have the effect that the reference from the query page becomes deleted from the database. At least the last method works in my local wiki.
 
  
You could also add a final DPL statement with '''reset=all''' (see the manual for details!) to the article containing your query. Then the database will never contain backward links from the query page to the article page. In that case it should be enough to just delete the article.
+
:::Trying to correct this, I decided to try a full HTML table in the template. Unfortunately, this causes my [http://www.tnlc.com/wiki/index.php?title=Comparison_table comparison table] DPL queries that <tt>[[uses]]=Template:game</tt> to yield no results too. Seems DPL has a problem finding template fields inside parser functions... :/ -[[User:Eep²|Eep²]] 15:50, 15 September 2007 (CEST)
  
Could you please check all of the above and report here briefly if it works as described? It would be nice if you could add an entry to the FAQ article afterwards ... [[User:Gero|Gero]] 14:26, 26 August 2007 (CEST)
+
::::The problem with too many links showing up and the negative effect of reset=all unfortunately exists. The links which one DPL query creates are seen by the other one and lead to kind of an avalanche effect. I do not have a solution for this at the moment. You could try to generate links which use the ''Call'' extension to point to the referenced page instead of directly linking to them. That should work. [[User:Gero|Gero]] 18:22, 16 September 2007 (CEST)
  
===Reply===
+
== linksfrom with 'some other option' causes SQL errors  ==
Well, heck.  I went back and followed my own directions on my own wiki and wasn't getting the same results.  I found myself wondering if it was the hour delay - I didn't wait an hour after adding the test page.
 
  
However, I did navigate to the deleted page and check its "What links here" link and the DPL query page did in fact show up on that list.  So I don't appear to be crazy, at least in this one small regard.
+
Below is the DPL that kills the page (in pre for obvious reasons).
  
I tried your suggestion of opening the DPL query page in edit mode and saving it again. That did clear whatever was cached connecting the deleted article to its categories, thus making the article still appear in some way linked to the DPL query page. I trust that your other methods would work similarly. So it appears not so much to be a DPL bug, but something I guess I could call a "quirk" based on the interaction between MediaWiki and DPL. That makes it pretty darn minor, but I will go ahead and add something to your FAQ page.
+
I am trying to find out which combination of options exactly causes the error... [[linksfrom]] alone or combined with [[category]] and [[userfomat]] and [[listseparators]] seems fine... must be one of the addXXX parameters... (I can confirm removing the addXXX allows the DPL to run... it just fails to return any useful data because you need the addXXX's to get results!). But what is up with this page! click the edit button next to the above title! --[[User:Dmb|Dmb]] 15:46, 18 September 2007 (CEST)
--[[User:Aaron Overton|Aaron Overton]] 20:54, 2 September 2007 (CEST)
 
  
== Creating an annual calendar ==
+
<PRE>
When I try to creat an anual calendar with the commands of
+
{{#dpl:
 
+
  |category      = Country
<nowiki>{{CalendarSingle|year=2007|month=01|show_year=no|basepage=Events:}}</nowiki>
+
  |linksfrom      = Main_Page
...
+
  |count          = 10
<nowiki>{{CalendarSingle|year=2007|month=12|show_year=no|basepage=Events:}}</nowiki>
+
  |mode          = userformat
 
+
  |addauthor      = true
I get an error - See [[DPL:Bug Reports/Annual calendar]]
+
  |addpagesize    = true
 
+
  |addpagecounter = true
Strange, it does work on this wiki. Doesnt work on mine, I can't even post the wikitext. [http://wikimaas.org/Sandbox/DPL_calendar_bug]
+
  |addfirstcategorydate = true
 
+
  |userdateformat      = d-m-Y
-- 14:50, 26 August 2007 (CEST)
+
  |listseparators =
 
+
    {¦ class="sortable"
:Maybe you should download the latest DPL version and check if your templates are the same as in this wiki, [[User:Gero|Gero]] 15:30, 26 August 2007 (CEST)
+
      \n!
 
+
      \n! Date
== wfDynamicPageListSPloadMessages ==
+
      \n! Name
 
+
      \n! Author
DPL works fine on my wiki, but if I try to go to [[Special:Specialpages]], I get the following:
+
      \n! Views
 
+
      \n! Size
<pre>Internal error
+
    \-,
 
+
      \n¦ align="right" ¦ %NR%
Invalid NULL return from broken hook wfDynamicPageListSPloadMessages
+
      \n¦ align="right" ¦ %DATE%
 
+
      \n¦ align="left" ¦ [[%PAGE%]]
Backtrace:
+
      \n¦ align="left"  ¦ [[User:%USER%¦%USER%]]
 
+
      \n¦ align="right" ¦ %COUNT%
#0 F:\edit\includes\MessageCache.php(677): wfRunHooks('LoadAllMessages')
+
      \n¦ align="right" ¦ %SIZE% B,
#1 F:\edit\includes\SpecialSpecialpages.php(13): MessageCache::loadAllMessages()
+
    \n¦-\n,
#2 F:\edit\includes\SpecialPage.php(653): wfSpecialSpecialpages(NULL, Object(UnlistedSpecialPage))
+
    ¦}
#3 F:\edit\includes\SpecialPage.php(459): SpecialPage->execute(NULL)
 
#4 F:\edit\includes\Wiki.php(203): SpecialPage::executePath(Object(Title))
 
#5 F:\edit\includes\Wiki.php(45): MediaWiki->initializeSpecialCases(Object(Title), Object(OutputPage), Object(WebRequest))
 
#6 F:\edit\index.php(89): MediaWiki->initialize(Object(Title), Object(OutputPage), Object(User), Object(WebRequest))
 
#7 {main}
 
</pre>
 
 
 
I know it's DPL throwing the error because it only happens when DPL is enabled, and it happens when DPL is enabled and the rest of my extensions are disabled.
 
 
 
I just downloaded the latest source for DPL today, and it didn't fix it. Any ideas? [[User:Jonathan Kovaciny|Jonathan Kovaciny]] 20:22, 27 August 2007 (CEST)
 
 
 
=== Reply ===
 
Please check the function which is hooked to 'LoadAllMessages' (wfDynamicPageListSPloadMessages()) and add "return true;" at the end. This may help. You could also comment out the line where ''wfDynamicPageListSPloadMessages'' is registered (in file DynamicPageListSP). You could also comment out the line in DynamicPageList2.php with the "require_once" statement for the special page. Anyway, the next version of DPL will no longer have a Special Page as the DPL GUI is a better alternative. So don´t bother with the special page. [[User:Gero|Gero]] 07:48, 28 August 2007 (CEST)
 
 
 
:That template can't handle multiple namespaces, categories, or even articles ([[DPL_talk:Catlist|as I mentioned to you almost a month ago]]); it's not ready to replace the special page. -[[User:Eep²|Eep²]] 09:23, 28 August 2007 (CEST)
 
 
 
:I commented out line 19 (<code>$wgHooks['LoadAllMessages'][] = 'wfDynamicPageListSPloadMessages';</code>) and it seems to work now. But what does this line do? -- [[User:Jonathan Kovaciny|Jonathan Kovaciny]] 16:15, 28 August 2007 (CEST)
 
 
 
== <tt>%PAGES%</tt> not working ==
 
 
 
<pre><nowiki>
 
{{#dpl:namespace=Template
 
|mode=category
 
|ordermethod=titlewithoutnamespace
 
|shownamespace=no
 
|rowcolformat=width=100%
 
|resultsheader=<h2>Templates (%PAGES%)</h2>
 
}}
 
</nowiki></pre>
 
 
 
<!--
 
{{#dpl:namespace=Template
 
|mode=category
 
|ordermethod=titlewithoutnamespace
 
|shownamespace=no
 
|rowcolformat=width=100%
 
|resultsheader=<h2>Templates (%PAGES%)</h2>
 
 
}}
 
}}
-->
+
</PRE>
Just shows "Templates (0)" instead of actual # of articles/pages (templates) found... Also, the column heights are not all equal except for the rightmost one, as stated in a recent update release notes. -[[User:Eep²|Eep²]] 23:17, 29 August 2007 (CEST)
 
:Indeed there is a bug in %PAGES% when used together with mode=category. Will be fixed in the next release. [[User:Gero|Gero]] 09:17, 30 August 2007 (CEST)
 
 
 
== Transcluded parameter truncated ==
 
  
Transcluding a single template parameter sometimes does not get the full parameter. Example: See the Nigunda Test entry at [[Test section inclusion#include a single template parameter]]. The retrieved value is terminated prematurely (right before the pipe). I believe the scope of the bug is just when a pipe is used within square brackets in a parameter. --[[User:Rezyk|Rezyk]] 12:03, 31 August 2007 (CEST)
+
Hmm... it seems to 'die' in a much more friendly way on your site than it does mine! Below is the debugging output that I got from your site...
  
=== Answer ===
+
The DPL extension produced a SQL statement which lead to a Database error.
Thank you for reporting. There is a bug in the parser (it simply ignores hyperlinks and gets fooled by pipe characters inside hyperlinks). Has been corrected. [[User:Gero|Gero]] 13:37, 31 August 2007 (CEST)
+
The reason may be an internal error of DPL or an error which you made,
 +
especially when using DPL options like titleregexp.
 +
Query text is:
 +
SELECT DISTINCT `page`.page_namespace as page_namespace, `page`.page_title as page_title, pagesrc.page_title as sel_title, pagesrc.page_namespace as sel_ns, REPLACE(REPLACE(CONCAT( IF(`page`.page_namespace=0, , CONCAT(CASE `page`.page_namespace WHEN 1 THEN 'Talk' WHEN 2 THEN 'User' WHEN 3 THEN 'User_talk' WHEN 4 THEN 'Dpldemo' WHEN 5 THEN 'Dpldemo_talk' WHEN 6 THEN 'Image' WHEN 7 THEN 'Image_talk' WHEN 8 THEN 'MediaWiki' WHEN 9 THEN 'MediaWiki_talk' WHEN 10 THEN 'Template' WHEN 11 THEN 'Template_talk' WHEN 12 THEN 'Help' WHEN 13 THEN 'Help_talk' WHEN 14 THEN 'Category' WHEN 15 THEN 'Category_talk' WHEN 100 THEN 'Type' WHEN 101 THEN 'Type_talk' WHEN 102 THEN 'Test' WHEN 103 THEN 'Test_talk' WHEN 104 THEN 'DPL' WHEN 105 THEN 'DPL_talk' WHEN 106 THEN 'Wgraph' WHEN 107 THEN 'Wgraph_talk' END, ':')), `page`.page_title), '_', ' '),'♣','⣣') as sortkey, page_counter, page_len, rev_user, rev_user_text, DATE_FORMAT(cl0.cl_timestamp, '%Y%m%d%H%i%s') AS cl_timestamp FROM `revision` AS rev, `pagelinks` as plf, `page`as pagesrc, `page` INNER JOIN `categorylinks` AS cl0 ON `page`.page_id=cl0.cl_from AND (cl0.cl_to='Country') WHERE 1=1 AND `page`.page_is_redirect=0 AND `page`.page_id=rev.rev_page AND rev.rev_timestamp=( SELECT MIN(rev_aux.rev_timestamp) FROM `revision` AS rev_aux WHERE rev_aux.rev_page=rev.rev_page ) AND `page`.page_namespace = plf.pl_namespace AND `page`.page_title = plf.pl_title AND pagesrc.page_id=plf.pl_from AND ((plf.pl_from=1)) ORDER BY sortkey ASC LIMIT 10
  
== reset=categories doesn't always work with parser function usage ==
+
Error message is:
 +
Column 'page_counter' in field list is ambiguous (localhost)
  
Example: See [[Test reset categories]], which includes part of [[Sudan]] (through a parser extension DPL call) and [[Test matches]] (through a parser function DPL call). Without the reset=categories call, it would inherit all the categories from both articles. With reset=categories, the categories from Sudan are suppressed, but [[:Category:Test]] (which comes from Test matches) is not suppressed. --[[User:Rezyk|Rezyk]] 12:33, 31 August 2007 (CEST)
+
Good luck! --[[User:Dmb|Dmb]] 15:41, 18 September 2007 (CEST)
  
 
=== Answer ===
 
=== Answer ===
I had to do a lot of investigations regarding the "reset" parameter. And unfortunately it still doesn´t work always as expected. Are you a programmer? I could well need some help at that matter ... [[User:Gero|Gero]] 13:41, 31 August 2007 (CEST)
+
Thanks for your analysis! Indeed the latest DPL version uses some exception handling to bring up such problems in a way which makes my life easier ;-). The cause was an internal design change which happened two months ago. The error occurs whenever you use one of ''pagecounter, pagelen or page_touched'' in a certain constellation. The bug fix was not so complicated and you will find it in the next release.
 +
[[User:Gero|Gero]] 16:10, 18 September 2007 (CEST)
  
:Well, I am no expert, but here are my thoughts after looking around in DPL 1.3.8 and MediaWiki 1.9.3:
+
: Cool!--[[User:Dmb|Dmb]] 18:39, 18 September 2007 (CEST)
:Starting from the top level page parsing... <small>(function stack at Parser::parse)</small>
 
:#First all <nowiki><dpl></nowiki> calls are each processed.
 
:#:<small>(Parser::parse => Parser::strip => DynamicPageList2)</small>
 
:##Each call also processes its category tags into mCategories before returning.
 
:##:<small>(DynamicPageList2 => Parser::recursiveTagParse => Parser::internalParse => Parser::replaceInternalLinks)</small>
 
:##Each <nowiki>"<dpl>reset=categories</dpl>"</nowiki> empties any mCategories categorization done.
 
:#Then all <nowiki>{{#dpl:}}</nowiki> calls are each processed.
 
:#:<small>(Parser::parse => Parser::internalParse => Parser::replaceVariables => Parser::braceSubstitution => wfDynamicPageList4)</small>
 
:##Each call does ''not'' categorize into mCategories before returning. Any category tags are returned as part of unprocessed text.
 
:##Each <nowiki>"{{#dpl:reset=categories}}"</nowiki> empties any mCategories categorization done.
 
:#Then the top level result text as a whole processes its category tags into mCategories.
 
:#:<small>(Parser::parse => Parser::internalParse => Parser::replaceInternalLinks)</small>
 
:The error case is step 2.1 spitting out a category tag that dodges 2.2's mechanism (because it is unprocessed text, not in mCategories) and is processed into mCategories in step 3. One way to address this might be to have 2.1 do categorization processing like 1.1 does (have wfDynamicPageList4 apply recursiveTagParse to its result like DynamicPageList2 does). Any <nowiki>"<dpl>reset=categories</dpl>"</nowiki> would still not work against <nowiki>{{#dpl:}}</nowiki> effects, but subsequent <nowiki>"{{#dpl:reset=categories}}"</nowiki> would. Note: if that does work, I wonder if wfDynamicPageList4 should also return with noparse=true (see description of Parser::setFunctionHook).
 
:A "more clean and thorough" design might be to apply that fix, and also have DynamicPageList2 and wfDynamicPageList4 each record/copy the state of mCategories before calling DynamicPageList and restoring that state (if say, categorize=false) after calling recursiveTagParse. --[[User:Rezyk|Rezyk]] 07:58, 1 September 2007 (CEST)
 
  
=== Reply 2 ===
+
==Upgrading from 1.1.0 to 1.4.1 causes addcategories=true to break==
Thank you for clarifying this. It was a conscious design decision NOT TO call recursiveTagParse at the end of a DPL parser function call as this gives much more freedom to the user. For example today you can define a table outside a DPL call and then invoke DPL just to produce some rows for that table (the table may contain other rows coming from other DPL statements or rows which you wrote manually). If I called ''recursiveTagParse'' this would no longer be possible because the parser would not understand a pipe charater at the beginning of a line as a markup for a table row (because it wouldn´t know that it is inside a table when expanding DPL output).
+
I've been running with 1.1.0 turned on for some time so I thought I'd give 1.4.1 a go. When I turn it on the following code:
 +
<pre>
 +
<DPL>
 +
category=Songs
 +
notcategory=Song Templates
 +
addcategories=true
 +
</DPL>
 +
</pre>
 +
Gives me:
 +
<pre>
 +
The DPL extension produced a SQL statement which lead to a Database error.
 +
The reason may be an internal error of DPL or an error which you made,
 +
especially when using DPL options like titleregexp.
 +
Query text is:
 +
SELECT DISTINCT `mw_page`.page_namespace as page_namespace, `mw_page`.page_title as page_title, REPLACE(REPLACE(CONCAT( IF(`mw_page`.page_namespace=0, , CONCAT(CASE `mw_page`.page_namespace WHEN 1 THEN 'Talk' WHEN 2 THEN 'User' WHEN 3 THEN 'User_talk' WHEN 4 THEN 'WMD' WHEN 5 THEN 'WMD_talk' WHEN 6 THEN 'Image' WHEN 7 THEN 'Image_talk' WHEN 8 THEN 'MediaWiki' WHEN 9 THEN 'MediaWiki_talk' WHEN 10 THEN 'Template' WHEN 11 THEN 'Template_talk' WHEN 12 THEN 'Help' WHEN 13 THEN 'Help_talk' WHEN 14 THEN 'Category' WHEN 15 THEN 'Category_talk' END, ':')), `mw_page`.page_title), '_', ' '),'','') as sortkey, GROUP_CONCAT(DISTINCT cl_gc.cl_to ORDER BY cl_gc.cl_to ASC SEPARATOR ' | ') AS cats FROM `mw_page` LEFT OUTER JOIN (`mw_categorylinks` AS cl_gc) ON (page_id=cl_gc.cl_from) INNER JOIN `mw_categorylinks` AS cl0 ON `mw_page`.page_id=cl0.cl_from AND (cl0.cl_to='Songs') LEFT OUTER JOIN `mw_categorylinks` AS cl1 ON `mw_page`.page_id=cl1.cl_from AND cl1.cl_to='Song_Templates' WHERE 1=1 AND cl1.cl_to IS NULL AND `mw_page`.page_is_redirect=0 GROUP BY page.page_id ORDER BY sortkey ASC LIMIT 500
  
Do you see a chance to get rid of unwanted category assignments without calling the parser?
+
Error message is:
 +
Unknown column 'page.page_id' in 'group statement' (localhost)
 +
</pre>
  
[[User:Gero|Gero]] 11:21, 2 September 2007 (CEST)
+
For some extra help I just compared the SQL when running with 1.1.0. They're rather similar except for the GROUP BY command at the end:
 +
<pre>
 +
..... GROUP BY page_id ORDER BY sortkey ASC LIMIT 500
 +
</pre>
 +
And with 1.4.1
 +
<pre>
 +
..... GROUP BY page.page_id ORDER BY sortkey ASC LIMIT 500
 +
</pre>
  
:Hmm..although your explanation made sense and appeared to match observed behavior (parser extension calls recursiveTagParse and does not smoothly embed rows), I could not see why it should be true from the parser code. So I made a test installation of MediaWiki+DPL, and found:
+
What's with the extra page.page_id?
:* Calling recursiveTagParse at the end of DPL parser function processing does ''not'' break table-row-embedding. The recursiveTagParse will not understand the '''"\n|"'''s as wikitable syntax, but will pass them through unaltered in the replacement text for the substitution, and they will be picked up as wikitable syntax during the parsing of the higher level result text (step 3 above).
 
:* The reason why DPL parser extension calls cannot manage table-row-embedding (with higher level results) is unrelated to its recursiveTagParse call. It is because parser extension results do not get substituted back in until after the higher level wikitable processing.
 
  
:I don't see any way to do it without some intermediate parsing/processing at this level (and honestly, I expect that any other way found would have to be a hack that breaks some other design abstraction). Adding a recursiveTagParse call does seem to work well as far I have seen, though.
+
Help gratefully accepted! BTW I'm running on:
:--[[User:Rezyk|Rezyk]] 07:47, 3 September 2007 (CEST)
 
  
::I've had a fair bit of trouble with wiki-table syntax within templates and parser-functions before and found that sometimes it's best to resort to using html syntax for the tables which doesn't confuse the parser so much. --[[User:Nad|Nad]] 08:03, 3 September 2007 (CEST)
+
    * MediaWiki: 1.10.0
 +
    * PHP: 5.2.1 (cgi)
 +
    * MySQL: 5.0.27-standard
  
:::Which requires yet more syntax/markup conversion between HTML and MediaWiki, making extensions (like [[mw:Semantic Forms|Semantic Forms]]) even more annoying to use, especially with tables and creating links to pages on the current wiki). Bah... -[[User:Eep²|Eep²]] 12:54, 3 September 2007 (CEST)
 
  
::::This is a problem which applies to wikitext tables when used with parser-functions in general and concerns the wiki-parser code not the code of any particular extension implementing them. --[[User:Nad|Nad]] 05:43, 4 September 2007 (CEST)
+
:[[User:Brianoflondon|Brianoflondon]] 10:55, 19 September 2007 (CEST)
  
:::::However, an extension which mindlessly disables wiki markup also has other effects, as I previously mentioned. Duh. -[[User:Eep²|Eep²]] 06:53, 4 September 2007 (CEST)
+
=== Reply ===
  
::::::I would like every-one in this Wiki to treat all others with respect. Building good software requires a lot of energy. We shouldn´t waste energy on an emotional level. Personally, I respect the efforts of Semantic Net Approaches very much. I have been working with databases that represented 'semantic triples' like RDF when even abbreviations like OWL and RDF had not been born. I see a lot of potential in DPL but I also see its limitations. I inherited the code about 10 months ago and did not have the courage to change it fundamentally (although I should have done so). Anyway, if somebody has the courage, here is my challenge and my vision for a ''DPL3'':
+
This error has been reported by another user as well. It is already fixed in my developer´s version and the fix will be part of the next release (which will be published somewhen next week). The reason is that the GROUP statement does not respect the database table name prefix (mw_ in your case).
::::::* DPL3 should use a well designed language for expressing which kind of information you want. The Semantic World has a lot to offer here.
+
:[[User:Gero|Gero]] 19:07, 19 September 2007 (CEST)
::::::* DPL3 should have a ''Mapping Layer'' in which the author of a wiki defines how the constructs of that abstract language can be mapped to the pecularities of a special wiki.
 
::::::* I am not sure if the mapping layer would state rules which are interpreted dynamically whenever a query is executed or whether it would define a set of rules which is used to fill auxiliary tables whenever a document gets updated. All systems I have built in former times (except DPL) have been using such tables.
 
::::::* output formatting should be completely separate from the query engine (i.e. the query might produce an intermediate XML text)
 
::::::Let me finally add that my time does definitely not allow to attack a task like ''DPL3''. But I will try to keep up DPL until I see something better coming up.
 
::::::--[[User:Gero|Gero]] 13:09, 4 September 2007 (CEST)
 
  
::Would it be helpful if I submitted a modification that used recursiveTagParse to handle something like "categorize=false", and was still able to handle wikitable row embedding? --[[User:Rezyk|Rezyk]] 00:55, 6 September 2007 (CEST)
+
==== Thanks ====
 +
:Thanks! Thought it was something I was doing... I'll stick with 1.1.0 till then.
 +
:19:29, 19 September 2007 (CEST)
  
== <tt>distinct</tt> ==
+
== query no longer working ==
  
<tt>[[distinct]]</tt> (defaults to true) seems to have problems with this query in a template:
+
I don't know why this query isn't working anymore:
  
<pre><nowiki>
+
<pre>
 
{{#dpl:
 
{{#dpl:
category=Games
+
category=games
|linksto={{PAGENAME}}{{!}}{{PAGENAME}}s{{!}}{{PAGENAME}}es{{!}}{{PAGENAME}}ies{{!}}{{PAGENAME}}ing{{!}}{{PAGENAME}}ed{{#if:{{{2}}}|{{!}}{{{2}}}{{!}}{{{2}}}s|}}{{#if:{{{3|}}}|{{!}}{{{3}}}{{!}}{{{3}}}s|}}
+
|linksto={{PAGENAME}}{{!}}{{PAGENAME}}s{{!}}{{PAGENAME}}es{{!}}{{PAGENAME}}ies{{!}}{{PAGENAME}}ing{{!}}{{PAGENAME}}ed
 +
{{#if:{{{1|}}}|{{!}}{{{1}}}{{!}}{{{1}}}s{{!}}{{{1}}}es{{!}}{{{1}}}ies{{!}}{{{1}}}ing{{!}}{{{1}}}ed|}}
 +
{{#if:{{{2|}}}|{{!}}{{{2}}}{{!}}{{{2}}}s{{!}}{{{2}}}es{{!}}{{{2}}}ies{{!}}{{{2}}}ing{{!}}{{{2}}}ed|}}
 +
{{#if:{{{3|}}}|{{!}}{{{3}}}{{!}}{{{3}}}s{{!}}{{{3}}}es{{!}}{{{3}}}ies{{!}}{{{3}}}ing{{!}}{{{3}}}ed|}}
 +
|uses=Template:game
 +
|notnamespace=Template
 +
|notnamespace=Form
 
|redirects=include
 
|redirects=include
 +
|distinct=strict
 
|resultsheader=<h2>Games (%PAGES%)</h2>
 
|resultsheader=<h2>Games (%PAGES%)</h2>
|noresultsheader=<h2>Games (0)</h2>''No games have this effect.''
+
|noresultsheader<h2>Games (0)</h2>''No games have this action yet.''
 
}}
 
}}
</nowiki></pre>
+
</pre>
 
 
...showing duplicate entries for a [http://www.tnlc.com/wiki/index.php?title=Carnivores_2 game] (that has links to "bubbles" ''and'' "water bubbles" on it) on http://www.tnlc.com/wiki/index.php?title=bubble which has this on it:
 
 
 
<pre><nowiki>{{effect|liquid bubble|water bubble}}</nowiki></pre>
 
  
...which should just show the game once (the first parameter is for a Wikipedia link). -[[User:Eep²|Eep²]] 12:11, 5 September 2007 (CEST)
+
Called from [http://www.tnlc.com/wiki/index.php?title=template:action template:action], this query used to list [http://www.tnlc.com/wiki/index.php?title=Half-Life%C2%B2 Half-Life²] since it has a link to <tt><nowiki>[[locks]]</nowiki></tt> in it, uses [http://www.tnlc.com/wiki/index.php?title=Template:game Template:game], and is not in the "Template" and/or "Form" namespaces (is in "(Main)") and "locks" is a redirect to "lock". However, if I remove <tt>|uses=Template:game</tt> the game will show up, but I don't understand why since the game ''does'' use template:game... -[[User:Eep²|Eep²]] 14:08, 19 September 2007 (CEST)
  
:Seems to be a bug, but I am not sure. Can you create a tiny example here in this wiki to show the effect?
+
:This sounds a little bit complicated. Currently I am working on a mechanism which tries to get rid of unwanted backlinks created by DPL queries. As this is VERY complicated and might have an influence on the behaviour you described I suggest that you check again with version 1.4.2 (somewhen next week). If you then still feel there is a problem I would need an example here in this wiki, as much stripped down as possible! [[User:Gero|Gero]] 19:16, 19 September 2007 (CEST)
:--[[User:Gero|Gero]] 20:45, 5 September 2007 (CEST)
 
  
::Would you rather just be able to view the source of the aformentioned pages? Although I've already given you the relevant code... -[[User:Eep²|Eep²]] 05:44, 6 September 2007 (CEST)
+
::Unwanted backlinks? I want my DPL backlinks! (i.e. for "Article x" -> "what links here" = "DPL report page y"). I find this feature very useful and was planning to build features of my site around this behavior... Is that what you are going to remove? --[[User:Dmb|Dmb]] 20:58, 19 September 2007 (CEST)
  
:::No. I need to change the code, activate debugging etc. Give an example here and I will look for it. [[User:Gero|Gero]] 19:46, 6 September 2007 (CEST)
+
::It's not complicated. I'm just trying to get pages in the "games" category that use the "game" template to show up--but even that doesn't work. Again, if I remove the "uses" line, the query works fine but I need to restrict the results to only pages that actually ''use'' this specific template... -[[User:Eep²|Eep²]] 05:27, 20 September 2007 (CEST)
  
::::OK, see [[test distinct]] for a templateless version that still exhibits the bug (and see [[DPL:Discussion#Exclusion_of_Duplicate_Pages]] for an earlier misplaced bug report by an anonymous user from over a month ago, too). -[[User:Eep²|Eep²]] 10:24, 7 September 2007 (CEST)
+
== Fatal Parser error. ==
 +
I've recently updated the extension from version 0.7.7 and am now getting a fatal php error:
  
== <tt>debug</tt> doesn't work ==
+
Call to undefined method Parser::recursiveTagParse() in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\lib\wiki\extensions\DynamicPageList\DynamicPageList2.php on line 728
  
In trying to diagnose why the following query shows the "See also" header even when no results are found, I tried adding <tt>[[debug]]</tt> to it but then all text is removed from a page (and if <tt>debug=3</tt> is at the end, no warning is given about it should be in the beginning either):
+
Any ideas?
  
<pre><nowiki>{{#dpl:debug=3|namespace=|titlematch={{PAGENAME}}%|resultsheader=\n<h2>See also</h2>|noresultsheader=<div style=display:none></div>}}</nowiki></pre>
+
:Your MediaWiki installation is too old. The recursiveTagParse() method is available in the newer versions of MW but not in older ones. You should consider to update your mediawiki installation. [[User:Gero|Gero]] 23:59, 26 September 2007 (CEST)
 
 
<!--
 
{{#dpl:debug=3|namespace=|titlematch={{PAGENAME}}%|resultsheader=\n<h2>See also</h2>|noresultsheader=<div style=display:none></div>}}
 
-->
 
Uncomment the hidden query to see for yourself.
 
 
 
Oddly, as a tag, the query doesn't hide the page but doesn't output any debug (or ''any'') info either (should at least complain about <tt><nowiki>{{PAGENAME}}</nowiki></tt> not working inside a tag...:
 
 
 
<pre><nowiki>
 
<dpl>
 
debug=3
 
namespace=
 
titlematch={{PAGENAME}}%
 
resultsheader=\n<h2>See also</h2>
 
noresultsheader=<div style=display:none></div>
 
</dpl>
 
</nowiki></pre>
 
 
 
In trying to get a query that works here, I don't know why this isn't outputting anything either:
 
<pre><nowiki>
 
<dpl>
 
debug=3
 
namespace=
 
titlematch=Test%
 
resultsheader=\n<h2>See also</h2>
 
noresultsheader=<div style=display:none></div>
 
</dpl>
 
</nowiki></pre>
 
It should show the [http://semeb.com/dpldemo/index.php?search=test&fulltext=Search many articles that start with "Test"]. -[[User:Eep²|Eep²]] 06:22, 8 September 2007 (CEST)
 
 
 
:#Try using '''double angle brackets''' like this  «tt»...«/tt». also around the '''div''' tags. This will postpone tag expansion to the execution time of DPL. This may help.
 
:#Variables like PAGENAME are not expanded if you use parser tag syntax like &lt;dpl&gt; change the DPL call to curly braces (i.e. parser function syntax)
 
:#The last query you wrote produces correct debug output on my test wiki but does not do so here. I will have to find out why; if you leave away the debug statement you get the expected output, right?
 
:#Read the [[DPL:Manual_-_General_Usage_and_Invocation_Syntax|manual chapter]] on syntax. It is extremely important. Maybe you can improve the text in the manual to help others in avoiding mistakes. I did my best to explain. [[User:Gero|Gero]] 12:04, 8 September 2007 (CEST)
 

Latest revision as of 14:13, 29 September 2007

This document is no longer in use.
See the list of bug reports ..

There may be some bug reports in the following document which 
from the respective authors´ point of view still need answer. 
In such cases please create a Bug report according to the new pattern and copy the text. 

Gero 14:12, 29 September 2007 (CEST)


Old bug reports have been moved to the DPL:Bug Reports Archive...


DPL and RSSfeeds clashing

Hi, our wiki uses Xfeeds and DynamicPageList extensions. There seems to be a problem when they are used on the same page though. An error occurs in the magpierss file that causes the formatting of the page to display the error at the top of the page, and then display the rest of the page. The error occurs on line 404 of the magpie file that Xfeeds uses. Is there a way to fix this?

reset=categories doesn't always work with parser function usage

Example: See Test reset categories, which includes part of Sudan (through a parser extension DPL call) and Test matches (through a parser function DPL call). Without the reset=categories call, it would inherit all the categories from both articles. With reset=categories, the categories from Sudan are suppressed, but Category:Test (which comes from Test matches) is not suppressed. --Rezyk 12:33, 31 August 2007 (CEST)

Answer

I had to do a lot of investigations regarding the "reset" parameter. And unfortunately it still doesn´t work always as expected. Are you a programmer? I could well need some help at that matter ... Gero 13:41, 31 August 2007 (CEST)

Well, I am no expert, but here are my thoughts after looking around in DPL 1.3.8 and MediaWiki 1.9.3:
Starting from the top level page parsing... (function stack at Parser::parse)
  1. First all <dpl> calls are each processed.
    (Parser::parse => Parser::strip => DynamicPageList2)
    1. Each call also processes its category tags into mCategories before returning.
      (DynamicPageList2 => Parser::recursiveTagParse => Parser::internalParse => Parser::replaceInternalLinks)
    2. Each "<dpl>reset=categories</dpl>" empties any mCategories categorization done.
  2. Then all {{#dpl:}} calls are each processed.
    (Parser::parse => Parser::internalParse => Parser::replaceVariables => Parser::braceSubstitution => wfDynamicPageList4)
    1. Each call does not categorize into mCategories before returning. Any category tags are returned as part of unprocessed text.
    2. Each "{{#dpl:reset=categories}}" empties any mCategories categorization done.
  3. Then the top level result text as a whole processes its category tags into mCategories.
    (Parser::parse => Parser::internalParse => Parser::replaceInternalLinks)
The error case is step 2.1 spitting out a category tag that dodges 2.2's mechanism (because it is unprocessed text, not in mCategories) and is processed into mCategories in step 3. One way to address this might be to have 2.1 do categorization processing like 1.1 does (have wfDynamicPageList4 apply recursiveTagParse to its result like DynamicPageList2 does). Any "<dpl>reset=categories</dpl>" would still not work against {{#dpl:}} effects, but subsequent "{{#dpl:reset=categories}}" would. Note: if that does work, I wonder if wfDynamicPageList4 should also return with noparse=true (see description of Parser::setFunctionHook).
A "more clean and thorough" design might be to apply that fix, and also have DynamicPageList2 and wfDynamicPageList4 each record/copy the state of mCategories before calling DynamicPageList and restoring that state (if say, categorize=false) after calling recursiveTagParse. --Rezyk 07:58, 1 September 2007 (CEST)

Reply 2

Thank you for clarifying this. It was a conscious design decision NOT TO call recursiveTagParse at the end of a DPL parser function call as this gives much more freedom to the user. For example today you can define a table outside a DPL call and then invoke DPL just to produce some rows for that table (the table may contain other rows coming from other DPL statements or rows which you wrote manually). If I called recursiveTagParse this would no longer be possible because the parser would not understand a pipe charater at the beginning of a line as a markup for a table row (because it wouldn´t know that it is inside a table when expanding DPL output).

Do you see a chance to get rid of unwanted category assignments without calling the parser?

Gero 11:21, 2 September 2007 (CEST)

Hmm..although your explanation made sense and appeared to match observed behavior (parser extension calls recursiveTagParse and does not smoothly embed rows), I could not see why it should be true from the parser code. So I made a test installation of MediaWiki+DPL, and found:
  • Calling recursiveTagParse at the end of DPL parser function processing does not break table-row-embedding. The recursiveTagParse will not understand the "\n|"s as wikitable syntax, but will pass them through unaltered in the replacement text for the substitution, and they will be picked up as wikitable syntax during the parsing of the higher level result text (step 3 above).
  • The reason why DPL parser extension calls cannot manage table-row-embedding (with higher level results) is unrelated to its recursiveTagParse call. It is because parser extension results do not get substituted back in until after the higher level wikitable processing.
I don't see any way to do it without some intermediate parsing/processing at this level (and honestly, I expect that any other way found would have to be a hack that breaks some other design abstraction). Adding a recursiveTagParse call does seem to work well as far I have seen, though.
--Rezyk 07:47, 3 September 2007 (CEST)
I've had a fair bit of trouble with wiki-table syntax within templates and parser-functions before and found that sometimes it's best to resort to using html syntax for the tables which doesn't confuse the parser so much. --Nad 08:03, 3 September 2007 (CEST)
Which requires yet more syntax/markup conversion between HTML and MediaWiki, making extensions (like Semantic Forms) even more annoying to use, especially with tables and creating links to pages on the current wiki). Bah... -Eep² 12:54, 3 September 2007 (CEST)
This is a problem which applies to wikitext tables when used with parser-functions in general and concerns the wiki-parser code not the code of any particular extension implementing them. --Nad 05:43, 4 September 2007 (CEST)
However, an extension which mindlessly disables wiki markup also has other effects, as I previously mentioned. Duh. -Eep² 06:53, 4 September 2007 (CEST)
I would like every-one in this Wiki to treat all others with respect. Building good software requires a lot of energy. We shouldn´t waste energy on an emotional level. Personally, I respect the efforts of Semantic Net Approaches very much. I have been working with databases that represented 'semantic triples' like RDF when even abbreviations like OWL and RDF had not been born. I see a lot of potential in DPL but I also see its limitations. I inherited the code about 10 months ago and did not have the courage to change it fundamentally (although I should have done so). Anyway, if somebody has the courage, here is my challenge and my vision for a DPL3:
  • DPL3 should use a well designed language for expressing which kind of information you want. The Semantic World has a lot to offer here.
  • DPL3 should have a Mapping Layer in which the author of a wiki defines how the constructs of that abstract language can be mapped to the pecularities of a special wiki.
  • I am not sure if the mapping layer would state rules which are interpreted dynamically whenever a query is executed or whether it would define a set of rules which is used to fill auxiliary tables whenever a document gets updated. All systems I have built in former times (except DPL) have been using such tables.
  • output formatting should be completely separate from the query engine (i.e. the query might produce an intermediate XML text)
Let me finally add that my time does definitely not allow to attack a task like DPL3. But I will try to keep up DPL until I see something better coming up.
--Gero 13:09, 4 September 2007 (CEST)
Would it be helpful if I submitted a modification that used recursiveTagParse to handle something like "categorize=false", and was still able to handle wikitable row embedding? --Rezyk 00:55, 6 September 2007 (CEST)

distinct

distinct (defaults to true) seems to have problems with this query in a template:

{{#dpl:
category=Games
|linksto={{PAGENAME}}{{!}}{{PAGENAME}}s{{!}}{{PAGENAME}}es{{!}}{{PAGENAME}}ies{{!}}{{PAGENAME}}ing{{!}}{{PAGENAME}}ed{{#if:{{{2}}}|{{!}}{{{2}}}{{!}}{{{2}}}s|}}{{#if:{{{3|}}}|{{!}}{{{3}}}{{!}}{{{3}}}s|}}
|redirects=include
|resultsheader=<h2>Games (%PAGES%)</h2>
|noresultsheader=<h2>Games (0)</h2>''No games have this effect.''
}}

...showing duplicate entries for a game (that has links to "bubbles" and "water bubbles" on it) on http://www.tnlc.com/wiki/index.php?title=bubble which has this on it:

{{effect|liquid bubble|water bubble}}

...which should just show the game once (the first parameter is for a Wikipedia link). -Eep² 12:11, 5 September 2007 (CEST)

Seems to be a bug, but I am not sure. Can you create a tiny example here in this wiki to show the effect?
--Gero 20:45, 5 September 2007 (CEST)
Would you rather just be able to view the source of the aformentioned pages? Although I've already given you the relevant code... -Eep² 05:44, 6 September 2007 (CEST)
No. I need to change the code, activate debugging etc. Give an example here and I will look for it. Gero 19:46, 6 September 2007 (CEST)
OK, see test distinct for a templateless version that still exhibits the bug (and see DPL:Discussion#Exclusion_of_Duplicate_Pages for an earlier misplaced bug report by an anonymous user from over a month ago, too). -Eep² 10:24, 7 September 2007 (CEST)

debug doesn't work

In trying to diagnose why the following query shows the "See also" header even when no results are found, I tried adding debug to it but then all text is removed from a page (and if debug=3 is at the end, no warning is given about it should be in the beginning either):

{{#dpl:debug=3|namespace=|titlematch={{PAGENAME}}%|resultsheader=\n<h2>See also</h2>|noresultsheader=<div style=display:none></div>}}

Uncomment the hidden queries (with and without "double angle brackets") above in edit mode to see for yourself.

Oddly, as a tag, the query doesn't hide the page but doesn't output any debug (or any) info either (should at least complain about {{PAGENAME}} not working inside a tag...:

<dpl>
debug=3
namespace=
titlematch={{PAGENAME}}%
resultsheader=\n<h2>See also</h2>
noresultsheader=<div style=display:none></div>
</dpl>

In trying to get a query that works here, I don't know why this isn't outputting anything either:

<dpl>
debug=3
namespace=
titlematch=Test%
resultsheader=\n<h2>See also</h2>
noresultsheader=<div style=display:none></div>
</dpl>

It should show the many articles that start with "Test". -Eep² 06:22, 8 September 2007 (CEST)

  1. Try using double angle brackets like this «tt»...«/tt». also around the div tags. This will postpone tag expansion to the execution time of DPL. This may help.
  2. Variables like PAGENAME are not expanded if you use parser tag syntax like <dpl> change the DPL call to curly braces (i.e. parser function syntax)
I know about "magic words" not being usable inside parser tags but the main issue is debug not working at all (which has nothing to do with double angle brackets--which also have no effect on the query--see above and uncomment the hidden parser function queries in edit page mode to test for yourself in preview mode)... -Eep
3. The last query you wrote produces correct debug output on my test wiki but does not do so here. I will have to find out why; if you leave away the debug statement you get the expected output, right?
No; hence why I'm even bothering to use debug in the first place to find out why the query isn't giving the expected results as I explained in the first sentence in this section above... -Eep
4. Read the manual chapter on syntax. It is extremely important. Maybe you can improve the text in the manual to help others in avoiding mistakes. I did my best to explain. Gero 12:04, 8 September 2007 (CEST)
Please re-read my initial bug report... -Eep² 12:19, 8 September 2007 (CEST)
O.K. I did not read carefully enough.
  • To me it looks as if the only problem ist that debug=3 always leads to an empty page (which is bad enough ..). Debug=3 works in my private wiki and hopefully does so on yours. At the moment I have no idea why it has that effect here on dpldemo ...
Apart from that your first query is o.k. (I replaced PAGENAME by a fixed value) If you use PAGENAME (which is o.k. of course) then you must use the statement within a template as the very page where the DPL statement itself is located never will be wshown as part of the outpout. This is due to very complicated recursion loop problems and is not likely to change.


debug=3 does not work on my wiki; it results in a blank page as this section's bug report is all about... And, oddly, if I use debug=4 (see test debug) I get the SQL query at the page's top (over the logo but under the actions/personal portlets) but the page is otherwise blank (at least in terms of the DPL query and how it should be formatted). -Eep² 14:33, 9 September 2007 (CEST)



If we replace the titlematch by something which does not exist the output is empty as we would expect (there is no difference in the kind of angle brackets we use):
{{#dpl:namespace=|titlematch=NONEXISTING%|resultsheader=\n<h2>See also</h2>|noresultsheader=<div style=display:none></div>}}

--- So my conclusion is that the debug=3 is the only remaining problem. Could you check on your wiki if 'debug=3' works there? Gero 10:25, 9 September 2007 (CEST)

ordermethod=category,sort produces duplicates

There are four entries in Category:African Union member states, but each is repeated up to six times in this DPL call. distinct=true does not affect the results:

{{#dpl:category=African Union member states |columns=6 |ordermethod=category,sortkey |distinct=true }}


If the ordermethod is removed, it works fine:


      66.83.143.246 23:49, 11 September 2007 (CEST)

      Reply

      I don´t think this is a bug. Each of the countries belongs to several categories and you told DPL to order the articles by category. What should poor DPL do? It tries its best in creating a list for each category and ordering each of that lists by articlename (sortkey). If you use headingmode you can see that:

      {{#dpl: |category=African Union member states |ordermethod=category,sortkey |headingmode=H4 |columns=3 }} What do you really want to achieve with your query?

      --Gero 08:55, 12 September 2007 (CEST)
      I would expect it to have the same four entry output as the query without ordermethod=category,sortkey, but with the entries ordered by the category sort order. This would produce each of the four only once, although I see that the behaviour with headingmode has a very different result. What query will result in only the four entries in the category, sorted by their sortkey in the category? Say if Somalia was in the category Category:African Union member states|Ancient Name so that it sorted before Cameroon in the DPL result. What I am trying to accomplish is a query that returns instructions in the order that they are to be done, where each instruction is a separate page and in a category with a numerical sort key for their ordering. If I use category=sortkey, I get an SQL error:
      Unknown column 'cl_head.cl_sortkey' in 'field list'
      
      -- 66.83.143.246 13:52, 12 September 2007 (CEST)
      Look at Category:Step. I tried to build a small example. Can you demonstrate your problem using that example?
      --Gero 08:50, 13 September 2007 (CEST)
      I see that sorts all of the Category:Plan steps before all of the Category:Execute steps, but the steps in each category are unordered. What I need is the ability to sort the individual entries in the category by their sortkey rather than alphabetically. For instance, what if the Task think step must happen before the Task buy food step? (Otherwise you just purchase the groceries without planning what to make) It seems that ordermethod=sortkey should do it, but this produces an sql error: 66.83.143.246 17:02, 13 September 2007 (CEST)
      Indeed there is a bug with the sortkey ordermethod. It works if you write "sortkey,category" as you can see on the Category:Step page. But inside the nested query the comma is misunderstood. Therefore you must call a separate Template. Not beautiful, but o.k. as a work-around, I think.
      --Gero 18:53, 13 September 2007 (CEST)

      titlematch rendering

      I'm having trouble getting this query to render correctly in MediaWiki:Noexactmatch. If I render it as:

      {{#dpl:namespace=|titlematch=%$1%|noresultsheader=none}}

      ...it gives "none" for every page, even if the page actually has pages that use "$1" (the searched-for string). So then I tried it as a parser tag:

      
      <dpl>namespace=
      titlematch=%$1%
      noresultsheader=none
      </dpl>
      
      

      But then I just get "UNIQ8b04b9c2c32d65b-dpl-00000004-QINU"... -Eep² 14:17, 13 September 2007 (CEST)

      Why don´t you try
      {{#dpl:namespace=|titlematch=%{{{1}}}%|noresultsheader=none}}
      Gero 18:39, 13 September 2007 (CEST)
      Because it's not a template and $1 is what the MediaWiki page is already configured to accept as the input (search) string... I tried adding the braces but then I get this error:
      Warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object in ../wiki/includes/Parser.php on line 3316.
      -Eep² 06:10, 14 September 2007 (CEST)
      Still need help with this... -Eep² 23:23, 18 September 2007 (CEST)
      I do not understand what the "$" should do. What do you mean by 'search string'? I see no functionality in mediawiki which would try to replace a $ character within a document by some value ...
      Gero 19:00, 19 September 2007 (CEST)
      If you look at MediaWiki:Noexactmatch you will see it uses "$1" as a variable for the search string (the text string that was entered into the search field). This is common throughout MediaWiki system messages... -Eep² 05:27, 20 September 2007 (CEST)

      Reply

      Now I understand. The $-replacement is a very special mechanism which only applies to MediaWiki messages. Changing the default message in a way that it presents similar pages to the editor is a very nice idea!

      • The following dpl statement does the job:
       '''There is no page titled "$1".''' You can [[:$1|create this page]].
       <dpl>
       debug=1
       resultsheader=    ''There are some pages similar to '$1':''\n
       titlematch=%$1%
       </dpl>
      
      • I installed it here, so you can watch it live if you e.g. enter "Nig" in the searchbox.
      • Could you test in your wiki and publish a statement in the FAQ here as others might want to adopt it?

      Gero 12:37, 20 September 2007 (CEST)

      Doesn't work; I still get "UNIQ5f1c6b5250d04dee-dpl-00000002-QINU" with just
      <dpl>
      debug=1
      titlematch=%$1%
      </dpl>
      
      -Eep² 13:16, 20 September 2007 (CEST)
      You will have to get help from elsewhere. It works here in the DPLDEMO wiki and the UNIQ...stuff does not come from DPL. Gero 13:39, 20 September 2007 (CEST)
      I've checked elsewhere but the results imply the bug is from earlier MediaWiki/DPL versions:
      (You might want to add the "meta" interwiki link, too.) -Eep² 13:51, 20 September 2007 (CEST)

      linksto including links in included template

      I have a game template which has links to various pages that shows which games (that use template:game) link to them (such as ride which uses template:action). However, now each page will show every game that uses template:game--even if the actual game's text does not have an actual link to the page. This seems like a bug to me... -Eep² 14:05, 14 September 2007 (CEST)

      OK, I figured it out on my own (again, while editing C#Combine queries and use a nested query for redirect tracking, which I still think needs to be better explained and implemented into DPL without requiring nested queries and yet another template to do a redirect list that MediaWiki does natively...see DPL:Discussion#Redirects to include pages that link to them? for more info). I had to use reset and put {{#dpl:reset=links}} after the DPL statement in the game template. -Eep² 08:00, 15 September 2007 (CEST)
      OK, not resolved. Sheesh...now no links to anything on a game which uses template:game is showing up on other pages. What the hell? Only existing links in the template should not cause games with the template to show up in lists--while still allowing links in template parameter fields to still show the game in lists. -Eep² 08:07, 15 September 2007 (CEST)
      And even if I {{#if:}} each row to only show filled-in template fields in the table, then my rowspans get screwed up. :/ -Eep² 10:11, 15 September 2007 (CEST)
      Trying to correct this, I decided to try a full HTML table in the template. Unfortunately, this causes my comparison table DPL queries that uses=Template:game to yield no results too. Seems DPL has a problem finding template fields inside parser functions... :/ -Eep² 15:50, 15 September 2007 (CEST)
      The problem with too many links showing up and the negative effect of reset=all unfortunately exists. The links which one DPL query creates are seen by the other one and lead to kind of an avalanche effect. I do not have a solution for this at the moment. You could try to generate links which use the Call extension to point to the referenced page instead of directly linking to them. That should work. Gero 18:22, 16 September 2007 (CEST)

      linksfrom with 'some other option' causes SQL errors

      Below is the DPL that kills the page (in pre for obvious reasons).

      I am trying to find out which combination of options exactly causes the error... linksfrom alone or combined with category and userfomat and listseparators seems fine... must be one of the addXXX parameters... (I can confirm removing the addXXX allows the DPL to run... it just fails to return any useful data because you need the addXXX's to get results!). But what is up with this page! click the edit button next to the above title! --Dmb 15:46, 18 September 2007 (CEST)

      {{#dpl:
        |category       = Country
        |linksfrom      = Main_Page
        |count          = 10
        |mode           = userformat
        |addauthor      = true
        |addpagesize    = true
        |addpagecounter = true
        |addfirstcategorydate = true
        |userdateformat       = d-m-Y
        |listseparators = 
          {¦ class="sortable"
            \n! 
            \n! Date
            \n! Name
            \n! Author
            \n! Views
            \n! Size
          \n¦-,
            \n¦ align="right" ¦ %NR%
            \n¦ align="right" ¦ %DATE%
            \n¦ align="left"  ¦ [[%PAGE%]]
            \n¦ align="left"  ¦ [[User:%USER%¦%USER%]]
            \n¦ align="right" ¦ %COUNT%
            \n¦ align="right" ¦ %SIZE% B,
          \n¦-\n,
          ¦}
      }}
      

      Hmm... it seems to 'die' in a much more friendly way on your site than it does mine! Below is the debugging output that I got from your site...

      The DPL extension produced a SQL statement which lead to a Database error. The reason may be an internal error of DPL or an error which you made, especially when using DPL options like titleregexp. Query text is: SELECT DISTINCT `page`.page_namespace as page_namespace, `page`.page_title as page_title, pagesrc.page_title as sel_title, pagesrc.page_namespace as sel_ns, REPLACE(REPLACE(CONCAT( IF(`page`.page_namespace=0, , CONCAT(CASE `page`.page_namespace WHEN 1 THEN 'Talk' WHEN 2 THEN 'User' WHEN 3 THEN 'User_talk' WHEN 4 THEN 'Dpldemo' WHEN 5 THEN 'Dpldemo_talk' WHEN 6 THEN 'Image' WHEN 7 THEN 'Image_talk' WHEN 8 THEN 'MediaWiki' WHEN 9 THEN 'MediaWiki_talk' WHEN 10 THEN 'Template' WHEN 11 THEN 'Template_talk' WHEN 12 THEN 'Help' WHEN 13 THEN 'Help_talk' WHEN 14 THEN 'Category' WHEN 15 THEN 'Category_talk' WHEN 100 THEN 'Type' WHEN 101 THEN 'Type_talk' WHEN 102 THEN 'Test' WHEN 103 THEN 'Test_talk' WHEN 104 THEN 'DPL' WHEN 105 THEN 'DPL_talk' WHEN 106 THEN 'Wgraph' WHEN 107 THEN 'Wgraph_talk' END, ':')), `page`.page_title), '_', ' '),'♣','⣣') as sortkey, page_counter, page_len, rev_user, rev_user_text, DATE_FORMAT(cl0.cl_timestamp, '%Y%m%d%H%i%s') AS cl_timestamp FROM `revision` AS rev, `pagelinks` as plf, `page`as pagesrc, `page` INNER JOIN `categorylinks` AS cl0 ON `page`.page_id=cl0.cl_from AND (cl0.cl_to='Country') WHERE 1=1 AND `page`.page_is_redirect=0 AND `page`.page_id=rev.rev_page AND rev.rev_timestamp=( SELECT MIN(rev_aux.rev_timestamp) FROM `revision` AS rev_aux WHERE rev_aux.rev_page=rev.rev_page ) AND `page`.page_namespace = plf.pl_namespace AND `page`.page_title = plf.pl_title AND pagesrc.page_id=plf.pl_from AND ((plf.pl_from=1)) ORDER BY sortkey ASC LIMIT 10

      Error message is: Column 'page_counter' in field list is ambiguous (localhost)

      Good luck! --Dmb 15:41, 18 September 2007 (CEST)

      Answer

      Thanks for your analysis! Indeed the latest DPL version uses some exception handling to bring up such problems in a way which makes my life easier ;-). The cause was an internal design change which happened two months ago. The error occurs whenever you use one of pagecounter, pagelen or page_touched in a certain constellation. The bug fix was not so complicated and you will find it in the next release. Gero 16:10, 18 September 2007 (CEST)

      Cool!--Dmb 18:39, 18 September 2007 (CEST)

      Upgrading from 1.1.0 to 1.4.1 causes addcategories=true to break

      I've been running with 1.1.0 turned on for some time so I thought I'd give 1.4.1 a go. When I turn it on the following code:

      <DPL>
      category=Songs
      notcategory=Song Templates
      addcategories=true
      </DPL>
      

      Gives me:

      The DPL extension produced a SQL statement which lead to a Database error.
      The reason may be an internal error of DPL or an error which you made,
      especially when using DPL options like titleregexp.
      Query text is:
      SELECT DISTINCT `mw_page`.page_namespace as page_namespace, `mw_page`.page_title as page_title, REPLACE(REPLACE(CONCAT( IF(`mw_page`.page_namespace=0, , CONCAT(CASE `mw_page`.page_namespace WHEN 1 THEN 'Talk' WHEN 2 THEN 'User' WHEN 3 THEN 'User_talk' WHEN 4 THEN 'WMD' WHEN 5 THEN 'WMD_talk' WHEN 6 THEN 'Image' WHEN 7 THEN 'Image_talk' WHEN 8 THEN 'MediaWiki' WHEN 9 THEN 'MediaWiki_talk' WHEN 10 THEN 'Template' WHEN 11 THEN 'Template_talk' WHEN 12 THEN 'Help' WHEN 13 THEN 'Help_talk' WHEN 14 THEN 'Category' WHEN 15 THEN 'Category_talk' END, ':')), `mw_page`.page_title), '_', ' '),'♣','⣣') as sortkey, GROUP_CONCAT(DISTINCT cl_gc.cl_to ORDER BY cl_gc.cl_to ASC SEPARATOR ' | ') AS cats FROM `mw_page` LEFT OUTER JOIN (`mw_categorylinks` AS cl_gc) ON (page_id=cl_gc.cl_from) INNER JOIN `mw_categorylinks` AS cl0 ON `mw_page`.page_id=cl0.cl_from AND (cl0.cl_to='Songs') LEFT OUTER JOIN `mw_categorylinks` AS cl1 ON `mw_page`.page_id=cl1.cl_from AND cl1.cl_to='Song_Templates' WHERE 1=1 AND cl1.cl_to IS NULL AND `mw_page`.page_is_redirect=0 GROUP BY page.page_id ORDER BY sortkey ASC LIMIT 500
      
      Error message is:
      Unknown column 'page.page_id' in 'group statement' (localhost)
      

      For some extra help I just compared the SQL when running with 1.1.0. They're rather similar except for the GROUP BY command at the end:

      ..... GROUP BY page_id ORDER BY sortkey ASC LIMIT 500
      

      And with 1.4.1

      ..... GROUP BY page.page_id ORDER BY sortkey ASC LIMIT 500
      

      What's with the extra page.page_id?

      Help gratefully accepted! BTW I'm running on:

         * MediaWiki: 1.10.0
         * PHP: 5.2.1 (cgi)
         * MySQL: 5.0.27-standard 
      


      Brianoflondon 10:55, 19 September 2007 (CEST)

      Reply

      This error has been reported by another user as well. It is already fixed in my developer´s version and the fix will be part of the next release (which will be published somewhen next week). The reason is that the GROUP statement does not respect the database table name prefix (mw_ in your case).

      Gero 19:07, 19 September 2007 (CEST)

      Thanks

      Thanks! Thought it was something I was doing... I'll stick with 1.1.0 till then.
      19:29, 19 September 2007 (CEST)

      query no longer working

      I don't know why this query isn't working anymore:

      {{#dpl:
      category=games
      |linksto={{PAGENAME}}{{!}}{{PAGENAME}}s{{!}}{{PAGENAME}}es{{!}}{{PAGENAME}}ies{{!}}{{PAGENAME}}ing{{!}}{{PAGENAME}}ed
      {{#if:{{{1|}}}|{{!}}{{{1}}}{{!}}{{{1}}}s{{!}}{{{1}}}es{{!}}{{{1}}}ies{{!}}{{{1}}}ing{{!}}{{{1}}}ed|}}
      {{#if:{{{2|}}}|{{!}}{{{2}}}{{!}}{{{2}}}s{{!}}{{{2}}}es{{!}}{{{2}}}ies{{!}}{{{2}}}ing{{!}}{{{2}}}ed|}}
      {{#if:{{{3|}}}|{{!}}{{{3}}}{{!}}{{{3}}}s{{!}}{{{3}}}es{{!}}{{{3}}}ies{{!}}{{{3}}}ing{{!}}{{{3}}}ed|}}
      |uses=Template:game
      |notnamespace=Template
      |notnamespace=Form
      |redirects=include
      |distinct=strict
      |resultsheader=<h2>Games (%PAGES%)</h2>
      |noresultsheader<h2>Games (0)</h2>''No games have this action yet.''
      }}
      

      Called from template:action, this query used to list Half-Life² since it has a link to [[locks]] in it, uses Template:game, and is not in the "Template" and/or "Form" namespaces (is in "(Main)") and "locks" is a redirect to "lock". However, if I remove |uses=Template:game the game will show up, but I don't understand why since the game does use template:game... -Eep² 14:08, 19 September 2007 (CEST)

      This sounds a little bit complicated. Currently I am working on a mechanism which tries to get rid of unwanted backlinks created by DPL queries. As this is VERY complicated and might have an influence on the behaviour you described I suggest that you check again with version 1.4.2 (somewhen next week). If you then still feel there is a problem I would need an example here in this wiki, as much stripped down as possible! Gero 19:16, 19 September 2007 (CEST)
      Unwanted backlinks? I want my DPL backlinks! (i.e. for "Article x" -> "what links here" = "DPL report page y"). I find this feature very useful and was planning to build features of my site around this behavior... Is that what you are going to remove? --Dmb 20:58, 19 September 2007 (CEST)
      It's not complicated. I'm just trying to get pages in the "games" category that use the "game" template to show up--but even that doesn't work. Again, if I remove the "uses" line, the query works fine but I need to restrict the results to only pages that actually use this specific template... -Eep² 05:27, 20 September 2007 (CEST)

      Fatal Parser error.

      I've recently updated the extension from version 0.7.7 and am now getting a fatal php error:

      Call to undefined method Parser::recursiveTagParse() in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\lib\wiki\extensions\DynamicPageList\DynamicPageList2.php on line 728

      Any ideas?

      Your MediaWiki installation is too old. The recursiveTagParse() method is available in the newer versions of MW but not in older ones. You should consider to update your mediawiki installation. Gero 23:59, 26 September 2007 (CEST)