Extension talk:DynamicPageList3

From MediaWiki.org
Jump to navigation Jump to search

Release dates would be useful[edit]

It would be great if on the main page for the plugin along side the version number, it had the release date.

"&" character in pagename causes page not listed in dpl[edit]

I have a DPL3 query to list all subpages within the same namespace and category = name of current page:

|format=,\n* [[%PAGE%|²{SUBPAGENAME:%TITLE%}²]],,

This works as expected, except when the pagename of the current page contains an "&". Then this list is always empty..I assume that the "&" in PAGENAME is interpreted as a logical AND? Is there a way around ?


require_once "$IP/extensions/DynamicPageList3/DynamicPageList3.php"; doesn't reflect the actual naming in the source archive. It's actually named DynamicPageList.php and not DynamicPageList3.php.

I fixed the documentation. Alexia E. Smith (talk) 20:23, 27 May 2015 (UTC)

includeonly,onlyinclude tags[edit]

Is there any way to get DPL to account for these tags when it includes content through a template? --Nad (talk) 19:33, 9 July 2015 (UTC)

Quite possibly. Do you happen to have a working live example of where it is broken? I can not seem to reproduce it exactly as described. Alexia E. Smith (talk) 20:31, 9 July 2015 (UTC)
I just set up an example for you in my public wiki, but it's working perfectly! The problem I'm having is on an intranet so I can't show you, but it doesn't matter now as it must not be DPL3 that's causing the trouble. --Nad (talk) 14:47, 10 July 2015 (UTC)
Check if you have an extra opening or closing includeonly/noinclude/onlyinclude tag somewhere in the template you are working with. I have done that before and Mediawiki's parser does not produce an error. Alexia E. Smith (talk) 20:15, 10 July 2015 (UTC)

DPL not installed on gamepedia.com[edit]

A lot of the manual examples in gamepedia.com aren't making much sense because they use actual DPL statements to show the results of the examples, but DPL isn't installed so the result of the example syntax is the same text as the example itself. --Nad (talk) 14:59, 12 July 2015 (UTC)

Looks like I never actually copied/ported over the examples from the old manual. The examples on the individual documentation pages are intended to be plain text. I will work on porting and/or creating examples. Alexia E. Smith (talk) 16:10, 20 July 2015 (UTC)
This is still a work in progress, but progress is being made. There were some bugs in 3.0.1 that I encountered that were actually preventing the manual from progressing forward. Alexia E. Smith (talk) 20:14, 29 July 2015 (UTC)


HitCounters were removed in 1.25 and moved into an extension. Since installing the extension deletes the relevant tables, which is also scheduled to happen in 1.26 for all installs, reports that use the counters throw database errors. -- Prod (talk) 02:00, 21 July 2015 (UTC)

The new release of Extension:DynamicPageList3 supports the HitCounters extension now and resolves this issue. Alexia E. Smith (talk) 20:14, 29 July 2015 (UTC)
It doesn't seem to be working for me. I got the following error: Unknown column 'hit_counter.page_counter' in 'order clause'. -- Prod (talk) 02:22, 11 August 2015 (UTC)

suppresserrors/debug, undefined variable[edit]

Many thanks for this great re-work! DPL has become so essential to my wiki that I went through the trouble of upgrading to MW 1.24 and lifting PHP to 5.4. I am truly glad to see that this extension is being maintained in good hands.

I am using version 3.0.2 which I cloned via Git IIRC. Two things I noticed:

  1. Instead of "suppresserrors = true" I had to set "debug = false" in addition.
  2. There seems to be a small bug in the code for I am getting "Notice: Undefined variable: where in /var/www/extensions/DynamicPageList/classes/Query.php on line 1816".
I am looking into suppresserrors/debug issue. However, the PHP notices are fixed as of: https://github.com/Alexia/DynamicPageList/commit/3b8c52336cde5c444e7cd21d675d1dc802b681c0 Alexia E. Smith (talk) 15:23, 31 July 2015 (UTC)
Took a few minutes to figure out, but the issue with suppresserrors is that it is deprecated. Setting noresultsheader to a blank space will have the same effect of suppressing errors for queries. Alexia E. Smith (talk) 15:43, 31 July 2015 (UTC)
Many thanks for your quick response! In my original request I forgot to mention that the wiki page about suppresserrors mentions debug but that is a red link. It would be great if that could reference could be completed. Cheers! --Sm8ps (talk) 19:29, 31 July 2015 (UTC)
I just went though and fixed several on that page. Thanks! Alexia E. Smith (talk) 19:47, 31 July 2015 (UTC)

Internal using DPL3[edit]

I tried this with DPL3 {{#dpl: |category = Africa |ordermethod = counter |order = descending |addpagecounter = true |count = 5 }} I'm getting internal error [2eb5afba] /index.php?title=PM_Toolkit&action=submit MWException from line 496 of /var/www/mediawiki/mw/extensions/DynamicPageList/classes/Query.php: DPL\Query::addJoin: Attempted to overwrite existing join clause.


  1. 0 /var/www/mediawiki/mw/extensions/DynamicPageList/classes/Query.php(736): DPL\Query->addJoin(string, array)
  2. 1 /var/www/mediawiki/mw/extensions/DynamicPageList/classes/Query.php(168): DPL\Query->_addpagecounter(boolean)
  3. 2 /var/www/mediawiki/mw/extensions/DynamicPageList/classes/Parse.php(221): DPL\Query->buildAndSelect(boolean)
  4. 3 /var/www/mediawiki/mw/extensions/DynamicPageList/DynamicPageList.hooks.php(302): DPL\Parse->parse(string, Parser, NULL, NULL, boolean)
  5. 4 [internal function]: DynamicPageListHooks::dplParserFunction(Parser, string, string, string, string, string, string)
  6. 5 /var/www/mediawiki/mw/includes/parser/Parser.php(3771): call_user_func_array(array, array)
  7. 6 /var/www/mediawiki/mw/includes/parser/Parser.php(3505): Parser->callParserFunction(PPFrame_DOM, string, array)
  8. 7 /var/www/mediawiki/mw/includes/parser/Preprocessor_DOM.php(1169): Parser->braceSubstitution(array, PPFrame_DOM)
  9. 8 /var/www/mediawiki/mw/includes/parser/Parser.php(3322): PPFrame_DOM->expand(PPNode_DOM, integer)
  10. 9 /var/www/mediawiki/mw/includes/parser/Parser.php(1231): Parser->replaceVariables(string)
  11. 10 /var/www/mediawiki/mw/includes/parser/Parser.php(434): Parser->internalParse(string)
  12. 11 /var/www/mediawiki/mw/includes/content/WikitextContent.php(333): Parser->parse(string, Title, ParserOptions, boolean, boolean, NULL)
  13. 12 /var/www/mediawiki/mw/includes/content/AbstractContent.php(497): WikitextContent->fillParserOutput(Title, NULL, ParserOptions, boolean, ParserOutput)
  14. 13 /var/www/mediawiki/mw/includes/page/WikiPage.php(2131): AbstractContent->getParserOutput(Title, NULL, ParserOptions)
  15. 14 /var/www/mediawiki/mw/includes/page/WikiPage.php(1757): WikiPage->prepareContentForEdit(WikitextContent, NULL, User, string)
  16. 15 [internal function]: WikiPage->doEditContent(WikitextContent, string, integer, boolean, NULL, string)
  17. 16 /var/www/mediawiki/mw/includes/page/Article.php(2016): call_user_func_array(array, array)
  18. 17 /var/www/mediawiki/mw/includes/EditPage.php(1921): Article->__call(string, array)
  19. 18 /var/www/mediawiki/mw/includes/EditPage.php(1921): Article->doEditContent(WikitextContent, string, integer, boolean, NULL, string)
  20. 19 /var/www/mediawiki/mw/includes/EditPage.php(1305): EditPage->internalAttemptSave(array, boolean)
  21. 20 /var/www/mediawiki/mw/includes/EditPage.php(539): EditPage->attemptSave(array)
  22. 21 /var/www/mediawiki/mw/includes/actions/EditAction.php(56): EditPage->edit()
  23. 22 /var/www/mediawiki/mw/includes/actions/SubmitAction.php(40): EditAction->show()
  24. 23 /var/www/mediawiki/mw/includes/MediaWiki.php(395): SubmitAction->show()
  25. 24 /var/www/mediawiki/mw/includes/MediaWiki.php(273): MediaWiki->performAction(Article, Title)
  26. 25 /var/www/mediawiki/mw/includes/MediaWiki.php(566): MediaWiki->performRequest()
  27. 26 /var/www/mediawiki/mw/includes/MediaWiki.php(414): MediaWiki->main()
  28. 27 /var/www/mediawiki/mw/index.php(41): MediaWiki->run()
  29. 28 {main}

When I run php update I get this

PHP Parse error: syntax error, unexpected '[' in /var/www/mediawiki/mw/extensions/DynamicPageList/DynamicPageList.php on line 21

If you are running less than PHP version 5.4 you will need to upgrade. Alexia E. Smith (talk) 18:27, 19 October 2015 (UTC)
MediaWiki 1.25.3, PHP 5.4.40, MySQL 5.6.19-log -- 19 October 2015 Phil Legault
I get these errors
Fatal error: Call to undefined function DPL\mb_strtoupper() in /var/www/mediawiki/mw/extensions/DynamicPageList/classes/Parse.php on line 658
I ran into this same mb_strtoupper() problem. You need the mbstring php extension. On Ubuntu I had to install php7.0-mbstring package

Parent category listing only articles of ordermethod=firstedit[edit]

When I add the parent category it list only sub-categories and not pages. How do I get it to select the pages for the sub-categories and not the subcategories?

Can you put in the DPL tag with all the parameters you are using here? Thanks! Alexia E. Smith (talk) 14:23, 29 October 2015 (UTC)

dplcache parameter[edit]

When is going to be introduced a replacemenet for the 'dplcache' parameter? Or is there already one? The documentation on gamepedia says that it's being worked on. Is there a release date or... ? 14:22, 15 November 2015 (UTC)

Whoops, that should have been removed from the documentation. The dplcache parameter was added in DPL2 and I removed it when creating DPL3. The cache functionality is now fully handled by MediaWiki's built in cache system and there is no need for it anymore. Alexia E. Smith (talk) 17:35, 15 November 2015 (UTC)
Hmm, then how can I make it so whatever it's displaying (images in my case) changes only once per day and not every time I reload the page? I am using both |allowcachedresults=true and |cacheperiod=864000. 13:48, 16 November 2015 (UTC)
Allowcachedresults=true is the default. Caching is is explicitly turned on and has to be disabled(set to false) in DPL3 so it is not needed to specify the allowcachedresults parameters. This is opposite of DPL2. The usage of cacheperiod is still correct, but you have an extra zero for the number of seconds. Otherwise the default is one hour. Alexia E. Smith (talk) 15:07, 16 November 2015 (UTC)
Welp, I have removed both the extra zero and the unnecessary parameter, but it's still showing a different image each time the page is reloaded. Is there a tag that makes it change the image only once per day? Also, does this separator ¦ separate titles both in 'notcategory' and 'nottitlematch'? 16:29, 16 November 2015 (UTC)

So, will you answer me? 17:05, 27 November 2015 (UTC)

Setting $allowUnlimitedResults=true makes no change of count limit of 500[edit]

I want to count the number of members in a category by using


The category contains more than 500 members, so I set $wgDplSettings['allowUnlimitedResults']=true; in LocalSettings, but I only got 500 again.

Setting $wgDplSettings['maxResultCount']=10000; and $wgDplSettings['allowUnlimitedResults']=false; in LocalSettings... the same 500.

Setting $wgDplSettings['allowUnlimitedResults']=true; in LocalSettings and the parameter "count=" in the #dpl-command above... the same 500.

I got the correct count by editing ParametersData.php the value for 'count' 'default'=500' in a higher value say 10000.

The two DplSettings above left to standard ("false" and "500" respectively). I'm using the latest DPL-version 3.0.9 and MediaWiki 1.25.3.

Can someone please check this. Thanks. Karsten 11:13, 6 April 2016 (UTC)

I'm running into the same problem. $wgDplSettings['maxResultCount']=5000, but I still only am getting 500 results when I should be getting 801. Brianfreud (talk) 04:44, 11 September 2016 (UTC) Brian

How to sort items alphabetically?[edit]

How do I set the list to sort the results alphabetically? This page and the manual is pretty confusing.

i was also trying to do the same, and unfortunately did not work out how to do so until i found a page about sorting on a completely different manual at semeb.com. so i added some examples to a page in the the original gamepedia.com manual.
Tetriminos (talk) 12:20, 17 September 2016 (UTC)

Installation, update.php must be executed (?)[edit]

  • my DPL output always contained a red link to Template:Extension_DPL, I had to execute php maintenance/update.php to generate Template:Extension_DPL
  • Is this a normal case? A hint in the documentation would be useful... --Escalator~enwikibooks (talk) 13:11, 2 May 2016 (UTC)

How to output last modified articles with ordermethod=lastedit ?[edit]

The example from the manual http://help.gamepedia.com/DPL:Example_-_Select_by_Recently_Changed


does not work for me, tried both |order=descending and |order=ascending, still getting the oldest articles only. --Escalator~enwikibooks (talk) 12:17, 9 May 2016 (UTC)

Conflict b/w Extension:Lockdown and Extension:DynamicPageList3[edit]

Hi all, there seems to be a conflict between Lockdown and DPL3 in cases where you have custom namespaces defined that are locked. In such cases DPL neglects selection of all pages that reside in locked namespaces. Though in LocalSettings.php

Example: let Secure be a custom name space that has been locked down for everyone except sysop. Sysop executes following dpl code:


This renders message: Extension:DynamicPageList (DPL), version 3.0.7: Warning: No results. though Secure has several pages.

Any ideas?

thanks, wolf --Stoettner (talk) 13:57, 16 June 2016 (UTC)

Same problem here. I tried to make this work, but it seems that if you set any explicit permission (doesn't matter to which group) in a namespace, DPL just stops showing any results. Alexia told me that it could be the problem that the extension fetches those resutls with a different set of permissions. But it doesn't seem to be any known group.
Anyone has an idea how to fix this?
Regards, Aploe --Aploe (talk) 09:25, 10 September 2018 (UTC)

Switching from previous version[edit]

The wiki MoBaDaten.Info ist still runing with the DynamicPageList (third-party) extension. The introducing note of the DynamicPageList3 extension promises fully backwards compatibility. If I want to switch from that “ancient” version to this revised version, I only have to do the following steps:

  1. Upload of the DynamicPageList3 extension into the extension folder
  2. Change of the require_once statement in LocalSettings.php (wiki is still running with Mediawiki 1.23)
  3. Yes Done without any unpleasent surprises afterwards …???

--Wgkderdicke (talk) 13:56, 23 June 2016 (UTC)

List is not going to update?[edit]

I installed DPL3 for lastedit list in main page. But I got a problem that list will not refresh by itself.

The list content will keep as no change since I edited it. Refresh, logout, close window is not going to change anything.

Anytime I edit the settings in LocalSettings.php or edit the code, then list will update. Any possible reason?

Here's my code:

category = ABC
addeditdate = true
ordermethod = lastedit
order = descending
count = 10

Additional question:

1. When I set namespace = 0, which should display content from main space. But I got this error:

Extension:DynamicPageList (DPL), version 3.0.9: 警告: 錯誤的 '$0' 參數: 'namespace'! 正在使用預設值: '0'。 說明: $0= $3。

2. When I tried to use firstedit as ordermethod, the result is totally the same with lastedit. Is it a bug? How to fix it?

Thanks for reply! --JHK (talk) 02:09, 18 August 2016 (UTC)

I'm having the same problem. Also, according to gamepedia there should be a randomseed parameter, but when I use it it just says the parameter does not exist... 01:48, 7 October 2016 (UTC)

From the code comments: //mt_srand() seeding was removed due to PHP 5.2.1 and above no longer generating the same sequence for the same seed. (And confirmed by the PHP manual page for mt_srand). -- 23:09, 29 April 2018 (UTC)

Descending for firstedit is not working[edit]

I'm using Mediawiki 1.27.

I found it seems like descending is not working for firstedit.

When firstedit is set as ordermethod, ascending and descending will get the same result(sort by ascending).

How to fix it? --JHK (talk) 17:14, 28 October 2016 (UTC)

No one has the same problem?? --JHK (talk) 02:32, 3 November 2016 (UTC)

Display list of headings within a page[edit]

Is it possible to get a list of pages, and show their headings only, not the actually contents? I read the documentation and didn't seem to find anything of sort.... 14:35, 16 April 2017 (UTC)

"shownav" style ("next 100") navigation bar for list generated by DPL[edit]

I would like to use DPL to generate a list of recently changed pages. List can run into 100s of entries. I would like to put a navigation bar like the one that is automatically generated by Special:NewPages. Generate links like (Newest) (Newer 100) (Older 100) (Oldest). Clicking on these links, DPL should generate a list of relevant set of pages. Can this be done? Can you show me how? Size of list is not predetermined.

How do you exclude lastedits when the edit was done by bot?[edit]

We have a DPL query which shows the date/time of the last edit on all our Talk pages, a link of the person who last edited the talk page, a link to the corresponding main page and the value of the (SMW) property Editor on the corresponding main page. We recently had bot activity (from extension:MassEditRegex) that made updates to the talk pages and now all these last edits from bot are listed. So I want to 'not see' any edits from bot, similar to hiding updates from bot on Recent Changes. I was looking at something like using notmodifiedby=bot, but that doesn't give the desired result. Any ideas?

This is the query:

|format=¶{¦ class="wikitable sortable"
    ¶!Talk page of
    ¶¦-¶¦%DATE% ¶¦[[User:%USER%]] ¶¦[[%PAGE%|%TITLE%]] ¶¦ ²{#show: %TITLE%¦?Editor}²,,¶¦}

Example output:

When Who Talk page of Editor
2017-04-18 23:47:58 Bodifee, Peter R-ALG-O.10.02 Frank Ruessink
2017-04-18 23:47:58 Bodifee, Peter ISO/IEC 13249-3

Thanks! PeterBodifee (talk) 22:56, 21 April 2017 (UTC)

MediaWiki 1.29 + Cite + DPL3[edit]

I've updated to the latest versions of each, and got this error. -- Prod (talk) 23:04, 16 July 2017 (UTC)

Fatal error: Cannot access private property Cite::$mGroupCnt in extensions/DynamicPageList/classes/DynamicPageList.php on line 84
Same here. I had previously also tested DPL (March 2017 update) with MediaWiki v1.28.2 and Extension:Cite (for MediaWiki v1.29). It threw out the same fatal error. (GitHub issue) --AhmadF.Cheema (talk) 16:13, 18 July 2017 (UTC)
I also tried upgrading 1.27 to 1.29 today. All my other (far too long) list of Extensions are up to date. Not sure if Extension:Cite is causing the issue but I get the same message as above. --Brian of London (talk) 10:42, 19 July 2017 (UTC)
It's definitely a known incompatibility of DynamicPageList3 with Cite, see the GitHub issue. Apparently, will have to wait until some developer finds the time to fix the issue. --AhmadF.Cheema (talk) 00:27, 21 July 2017 (UTC)
I can confirm, as well, that I encounter the same issue after upgrading to 1.29. Disabling Cite allows DPL to work. │Star-Warden│ 16:06, 22 July 2017 (UTC)
Issue resolved in Aug 2, 2017 commits. --AhmadF.Cheema (talk) 20:30, 3 August 2017 (UTC)

DPL: "**" will add all DIRECT subcategories of that category DB ERROR[edit]

When adding the asterisk to a category in the DPL parser function to add search in subcategories I always get an error:

A database query error has occurred. This may indicate a bug in the software. Fatal exception of type "Wikimedia\Rdbms\DBQueryError"

The code can be as simple as :

{{#dpl: category= **{{PAGENAME}} }}

Any hint of why this might be and how to solve it? Or how to search in subcategories of the current one?


It can easily be bypassed by calling DPL recursively:

{{#dpl: category= {{#dpl: category= {{#dpl: category= {{{1}}} }} }} }}

Gallery tag stops the processing of Format special symbols[edit]

The example in the documentation:


|namespace = Image

|format = <gallery>,%PAGE%\n,,</gallery>


DOES NOT work and it just produces a Gallery with ONE "photo" reading ,%PAGE%\n,, like in:



|namespace = Image

|format = <gallery>




</gallery> }}

DOES work producing a Gallery with three photos.

In the test I have done, it seems that as soon as DPL encounters the



Not updating[edit]

I use a two stage deployment, where I add content locally, then I do a local export and remote import on my live site.

Many pages are basically a dynamic index of either links to other pages or content fragments from them, based on their category tags. (Let's call it semi-structured wiki content, with lots of transclusion).

Everything works great locally, or on my hosted site, if I edit them manually. But if I do an export locally, and import on my hosted site, it breaks.

The export/import brings in all the content changes (with categories). But DPL3 query (index pages) will not get that any of those articles have changed. So the DPL query shows no results: "Extension:DynamicPageList (DPL), version 3.1.3: Warning: No results" -- even though I just important many articles with the proper tags.

The imported pages all look fine. And shows up in the category page as being properly tagged. And if I touch them (edit + save), it will work. It just wont show up via DPL3, unless I manually go into any of the articles, and edit anything and save. I waited days to see if it's some cache issue -- but nope. They remain stale until I manually edit each one.

Basically, it feels like something is cached (and not getting updated on import), or the import isn't bringing something in that let's DPL know that it is tagged.

But I'm stumped as to what is missing on the normal export/import behavior. Or even a work-around. Anyone have any hints/ideas?

Countable Error on MW 1.31[edit]

v 1.31 new install

i'm getting the error below. Also reported to Gamepedia.

Warning: count(): Parameter must be an array or an object that implements Countable in extensions/DynamicPageList/classes/DynamicPageList.php on line 443

and several other lines.

Also getting:

Warning: Cannot modify header information - headers already sent by (output started at /home/gunsywtx/public_html/extensions/DynamicPageList/classes/DynamicPageList.php:443) in /home/gunsywtx/public_html/includes/WebResponse.php on line 46

on several lines.

Johnywhy (talk) 07:25, 25 June 2018 (UTC)

Issues with listattr and headingmode[edit]

When headingmode=ordered or unordered then listattr only works if mode=ordered or unordered. headingmode=H2, H3, and H4 all do not work, returning Extension:DynamicPageList (DPL), version 3.2.1: Warning: Skipping bad option 'H2' for parameter 'headingmode'. 02:10, 3 August 2018 (UTC)

Shortstory without image-Photos[edit]

Hi, I'm using this, to show lastedited 3 articles from alle category. But i need to show me the shortstory just without image from article (just text). Is that possible?

order= descending
format   =,\n*[[%PAGE%|'''%TITLE%''']],,


I've also put this on Github.

1. I'd like to be able to use DPL in parser function mode but have reset=categories behave as it would in parser extension mode (see below). Would this be possible?

From: https://help.gamepedia.com/DPL:Parameters:_Other_Parameters#reset -- In parser extension mode (DPL tag like ): reset=categories will ignore categories of included contents but keep 'own' categories like 'Q Cat'. In parser fuction mode ({{#DPL:....}}): reset=categories will ignore all categories

2. When I use eliminate=categories in parser function mode (not tried parser extension mode) I get this error: "Extension:DynamicPageList (DPL), version 3.1.1: Warning: Skipping bad option 'categories' for parameter 'eliminate'." What can I do to fix this?

Thanks, Jonathan3 (talk) 20:56, 4 November 2018 (UTC)

Using DPL with images[edit]

order= descending
format   =,\n*[[File:%IMAGE%]],[[%PAGE%|'''%TITLE%''']],,

What i got is just the image name (examplexyz.jpg) How can i implement that as image? I tried that with the File Syntax but it doesn't work. Any ideas ?