Extension talk:DynamicPageList3

Change Some Code

edit

I try to change some code in query.php in order to include the extension Extension:Approved Revs and not flaggedRevs so I would change the function _stablepages in order to have the page from the table approved_revs. So in the query.php I change the function for something like this.

<syntaxhighlightang="php" line="1" start="1925">

private function _stablepages( $option ) {

if ( !$this->parametersProcessed['qualitypages'] ) {

if($option=='yes'){//paramètre de défault include

$this->addJoin(

'approved_revs',

[

'LEFT JOIN',

'page.page_id=approved_revs.page_id'

]

);

}

}

</syntaxhighlight>

I know that I don't check for files and only for pages. But I have an error that I don't understand : Extension:DynamicPageList (DPL), version 3.3.8: ⧼dpl_log_23⧽ so I shear where the error is set and I find it in logger at lines 40 to 67 but I still don't know the error. So I try to print the query with debug=6 but he doesn't print the query...

So if someone has a hint to print the quarry or where is my error I take this, thank you. Nicolas senechal (talk) 10:15, 20 June 2022 (UTC) Hello again, so I found how to don't have error but it's like it don't do the request... but debug=6 don't print the query so I don't know, how I can fix that or how I can print the query? Nicolas senechal (talk) 12:52, 23 June 2022 (UTC) Hello again I did it, the querry was wrong with some try it was just an where condition so finlly I have this.Reply

private function _stablepages( $option ) { if ( $this->parameters->getParameter('stablepages')) { //Ajout NISE nicolas sénéchal 20/06/22 changement d'extention pour approved revs, les page aprouver sont enregistrer dans la table approved_revs (attention ne prend pas en compte les fichier $tableAlias = "appr"; $this->addTable( 'approved_revs', $tableAlias ); $this->addJoin( $tableAlias, [ 'LEFT JOIN', "{$this->tableNames['page']}.page_id={$tableAlias}.page_id" ] ); $this->addWhere( [ "{$tableAlias}.page_id IS NOT NULL" ] ); }

I don't put other condition I just went to put stablepages=only in my dlp so normaly it just print page was approved. Nicolas senechal (talk) 08:51, 24 June 2022 (UTC)Reply

I got a full implementation working: see below!
Thank you, Nicolas! Blckms (talk) 16:54, 10 October 2022 (UTC)Reply

Pages using DynamicPageList parser function

edit

How do I get this automatic category to be removed?

This was answered further down this page
#Category:_Pages_using_DynamicPageList_parser_function_not_wanted
MLRodrigue (talk) 08:49, 8 March 2022 (UTC)Reply

Includematch returns too many results

edit

I want to see a list of wiki pages in a particular category that use a particular template and match a regex (basically look for the name Johnny in the template) within that template.

{{#dpl:
|category = AP
|namespace = Minutes
|titlematch = Document%
|include  = {AP2}
|includematch = ,/name\s*=\s*Johnny/s
}}

I get a list of results that match the regex, but not only for pages that use template AP2. Instead, a list of all pages that match the regex is produced. The pages that don't include the template, are listed asː

Minutes:Documentation/2020-10-28 Template:AP2.default

(with TemplateːAP2.default being a redlink)

How do I get a list that only includes pages that actually use template AP2? --MLRodrigue (talk) 14:38, 28 October 2020 (UTC)Reply


Hi,

i think you need this:

|uses = Template:AP2

This should work:

{{#dpl:
|category = AP
|namespace = Minutes
|uses = Template:AP2
|titlematch = Document%
|include  = {AP2}
|includematch = ,/name\s*=\s*Johnny/s
}}


Yukii (talk) 12:39, 30 October 2020 (UTC)Reply

Can't get basic table to show properly, please help

edit

Hi, I'm trying to create a simple 2-column table, using a template named parameter (PaperYear) as column 2. I've tried:

{{#dpl:
|category    =Papers
|include     ={Papers}:PaperYear
|table       =class=sortable,Article,Year
}}

I get this as a result (it brings the right data, but it does not look like a table at all, plus it shows all that backend stuff...):

Template:Extension DPL{|class=sortable !Article !Year |- |Growing fresh fruits and vegetables in an urban landscape: A geospatial assessment of ground level and rooftop urban agriculture potential in Boston, USA |2017 |- |Paper2 |2018 |}

Could anyone point what I'm missing/doing wrong? Many thanks!
Update: sorted! See the block that worked well pasted below. I was missing a few lines (which I copied from DPL:FAQ page, from the post "I try to generate table formatting with DPL but it looks weird - to hell with the syntax!"). It looks like a proper wikitable now :)

<dpl>
  category=Papers
  includepage={Papers}:PaperYear
  mode=userformat
  listseparators=\n{|class="wikitable sortable"\n!Title\n!Year,\n|-\n|[[%PAGE%]],,\n|}
  secseparators=\n|\n,
</dpl>

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:

{{#dpl:
|noresultsheader= 
|category={{PAGENAME}}
|namespace={{NAMESPACE}}
|allowcachedresults=false
|format=,\n* [[%PAGE%|²{SUBPAGENAME:%TITLE%}²]],,
|ordermethod=titlewithoutnamespace
}}

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 ?

Installation

edit

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)Reply

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)Reply

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)Reply
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)Reply
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)Reply
Can confirm on the latest version of the extension (version 3.3.3) that it doesn't respect noinclude tags, which is strange, it should be able to do this. There is currently no way to do it so Labeled Section Transclusion needs to be used if we need this behavior. There are no extra opening or closing tags in our tests. TiltedCerebellum (talk) 18:57, 18 June 2020 (UTC)Reply

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)Reply

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)Reply
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)Reply

HitCounters

edit

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)Reply

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)Reply
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)Reply

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)Reply
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)Reply
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)Reply
I just went though and fixed several on that page. Thanks! Alexia E. Smith (talk) 19:47, 31 July 2015 (UTC)Reply

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.

Backtrace:

  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)Reply
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)Reply

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...  ? 188.24.73.36 14:22, 15 November 2015 (UTC)Reply

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)Reply
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. 188.24.73.36 13:48, 16 November 2015 (UTC)Reply
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)Reply
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'? 188.24.73.36 16:29, 16 November 2015 (UTC)Reply

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

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

{{#dpl:category=MyCat|noresultsfooter=0|resultsheader=%PAGES%|mode=userformat}}.

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 192.53.103.119 11:13, 6 April 2016 (UTC)Reply

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) BrianReply
Hello from 2019 and v3.3.2, same problem, same ParametersData.php workaround as Karsten. -75.164.212.78 03:54, 3 November 2019 (UTC)Reply
Well, actually I want to switch from DPL third party to DPL3 here. But the results are nailed to 500 if there are more results. I also fiddled around with the 'maxResultCount' and 'allowUnlimitedResults' setting. So far nothing helps here. --Wgkderdicke (talk) 22:21, 25 November 2019 (UTC)Reply
Same problem here. MW 1.35.2 and DPL3.3.4. --103.145.73.75 00:51, 10 June 2021 (UTC)Reply

This should now be fixed. Universal Omega (talk) 20:51, 23 March 2022 (UTC)Reply

Did you fix this problem in 1_35?
Thank you! Issiegainsley (talk) 18:30, 24 May 2022 (UTC)Reply

Same problem with MW 1.40.0 and DPL3.5.2 --Sphynkx (talk) 09:05, 17 October 2024 (UTC)Reply

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)Reply

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)Reply
Same happened here with MW 1.34.0 and DynamicPageList3 3.3.3. After running maintenance/update.php the red link was still there and when accessing the same it said "This page was automatically created. It serves as an anchor page for all invocations of Extension:DynamicPageList (DPL)." -- now that the Template exists, the red link is indeed gone. -- Ckujau (talk) 10:15, 30 January 2020 (UTC)Reply

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

{{#dpl:
namespace=DPL
|addeditdate=true
|ordermethod=lastedit
|order=descending
|count=10
}}

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)Reply

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:

<dpl>
namespace=Secure
lastrevisionbefore="20161231"
ordermethod=lastedit
</dpl>

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)Reply

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)Reply
Actually, in 2023 it's still the case. I've got the same issue in 1.39.3 185.183.93.241 16:03, 7 May 2023 (UTC)Reply

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.   Done without any unpleasant surprises afterwards …???

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

It turns out that there are indeed unpleasant surprises afterwards:
  1. The dplcache function ist not part of DPL3 and therefore an error occured if this funtion is used. This is the petty evil. Since this function seems to be obsolet because of changes in Mediawiki itself, one has only to remove the regarding parts from all dpl function calls.
  2. The second surprise is the worse one. It appears that the settings around the result count, namely maxResultCount and allowUnlimitedResults, are useless, if one needs more results than the default 500. They do not work. One can set this values to true and/or more than 500 and the result is always 500, if there are actually more results.
So the second surprise makes this extension unusable for me at the moment.--Wgkderdicke (talk) 15:16, 26 November 2019 (UTC)Reply

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:

<DPL>
category = ABC
addeditdate = true
ordermethod = lastedit
order = descending
count = 10
</DPL>

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)Reply


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...118.212.157.16 01:48, 7 October 2016 (UTC)Reply

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)Reply

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

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.... 118.212.156.216 14:35, 16 April 2017 (UTC)Reply

"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:

{{#dpl: 
|namespace=Talk
|ordermethod=lastedit
|order=descending
|addeditdate=true
|adduser=true
|format=¶{¦ class="wikitable sortable"
    ¶!When
    ¶!Who
    ¶!Talk page of
    ¶!Editor,
    ¶¦-¶¦%DATE% ¶¦[[User:%USER%]] ¶¦[[%PAGE%|%TITLE%]] ¶¦ ²{#show: %TITLE%¦?Editor}²,,¶¦}
  |secseparators=¶¦
}}

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)Reply

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)Reply

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)Reply
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)Reply
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)Reply
I can confirm, as well, that I encounter the same issue after upgrading to 1.29. Disabling Cite allows DPL to work. │Star-Warden16:06, 22 July 2017 (UTC)Reply
Issue resolved in Aug 2, 2017 commits. --AhmadF.Cheema (talk) 20:30, 3 August 2017 (UTC)Reply

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?

Thanks,


It can easily be bypassed by calling DPL recursively:

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

edit

The example in the documentation:

{{#dpl:

|namespace = Image

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

}}

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

Whereas:

{{#dpl:

|namespace = Image

|format = <gallery>

File:Gorrion.jpeg

File:Passer-montanus.jpg

File:Milano.jpeg

</gallery> }}


DOES work producing a Gallery with three photos.

In the test I have done, it seems that as soon as DPL encounters the <gallery> tag it stops processing as symbols the following characters so there is no way to pass to the Gallery the resulting list of pages.

As it is in the documentation... did it ever work in previous versions?

Any workaround available for this great functionality?

YES: The workaround is as simple as using the Escape characters of DPL. The following code works:

{{#dpl:

|namespace = Image

|format = «gallery»,%PAGE%\n,,«/gallery»

}}

I have corrected the mistake in the documentation.

runtime error with MW 1.29 (Cite extension conflict)

edit

The code in DPL.php near line 80 tries to access private variables from the Cite extension to avoid that citations get lost that were made before DPL is called. The php interpreter does not allow such kind of access and you will get an error message which blocks the whole wiki installation. As a quick work around you can disable the workaround. In the long run the conflict should be solved via API calls to Cite.php (if this is possible). Algorithmix (talk) 20:46, 3 August 2017 (UTC)Reply

original documentation is available again

edit

I (Algorithmix aka Gero) am the author of the original manual (and of large code portions of DPL). Unfortunately the website with the manual was down for some time due to a PHP version change. I migrated the manual to another server (the old link to http://semeb.com/dpldemo still works) and upgraded the MW version to a more recent one.

User accounts that were valid for the original website should still work.

I noticed that there is a (partial) copy of the manual at "gamepedia". In case the version at gamepedia contains some updates/corrections: How should we proceed?

Algorithmix (talk) 20:55, 3 August 2017 (UTC)Reply

  • DPL3 is intended to be a full fork of DPL2 including the documentation as there are minor differences with some of the parameter functionality. I actually would like to move the documentation on the Gamepedia Help Wiki to the Github project. I just have not had personal free time to do it. Alexia E. Smith (talk) 23:11, 3 August 2017 (UTC)Reply

ordercollation has no effect

edit

According to this page (https://help.gamepedia.com/DPL:Parameters:_Controlling_Output_Order) I set ordercollation=latin1_german_ci to have a non-case-sensitive ordering of my results, but the list is still ordered by case (uppercase first, lowercase second). What am I doing wrong?

List the page itself

edit

When I add a category based search (e.g. category = A) on an page B, that is also in category A, then page B is not listed in the results. I think this is for the most cases very helpful, but I need page B listed. Is there an option for doing that?

Help Documentation down

edit
Unable to access documentation
[5fd0d9ef859aa1642d6c2676] /DPL:Parameters:_Other_Parameters RedisException from line 141 of /home/hydra/public_html/includes/libs/redis/RedisConnRef.php: READONLY You can't write against a read only slave.
Backtrace:
  1. 0 /home/hydra/public_html/includes/libs/redis/RedisConnRef.php(141): Redis->del(string)
  2. 1 /home/hydra/public_html/includes/libs/redis/RedisConnRef.php(124): RedisConnRef->tryCall(string, array)
  3. 2 /home/hydra/public_html/extensions/CategorySkins/classes/CategorySkin.php(95): RedisConnRef->__call(string, array)
  4. 3 /home/hydra/public_html/includes/Setup.php(827): CategorySkin::injectModules()
  5. 4 /home/hydra/public_html/includes/WebStart.php(147): require_once(string)
  6. 5 /home/hydra/public_html/index.php(40): require(string)
  7. 6 {main}

Pages that Transclude a Page?

edit

How to get a list of pages that transclude a page?

This would be similar to

{{Special:WhatLinksHere/MyPage|hidelinks=1|hideredirs=1}}
ANSWER:
{{#dpl: |uses = Tag:Banana }}

Johnywhy (talk) 12:57, 5 June 2018 (UTC)Reply

Suppress HTML, and Preserve Format, in Transcluded DPL?

edit

The following DPL displays correctly on it's own page:

{{#dpl: linksto=Banana|columns=6}}

But, when transcluded to another page, the format is lost, and raw HTML is displayed:

|valign=top|

How to fix?

[Solved] includematch: How to suppress display of matched parameters?

edit

I'm trying to match

{{Tag|Anteater}}

Regarding https://help.gamepedia.com/DPL:Parameters:_Criteria_for_Page_Selection#includematch, and https://help.gamepedia.com/DPL:Parameters:_Controlling_Output_Volume#include

The DPL statement

    {{#dpl: 
        |uses=Template:Tag
        |includematch=/Anteater/
        |include={Tag}:1
    }}

returns the expected page list:

ScrapAnteater 
Scrap3Anteater

Problem is, it also displays the parameter "Anteater" after every page-name.

How to show only the pagenames,and suppress display of matched parameters, while still matching the parameters?

Johnywhy (talk) 08:42, 5 June 2018 (UTC)Reply

Solved. use #dplreplace to remove the matching text put there by the include statement. Use the format statement only to append an arbitrary delimiter character before the output of the include statement, to ensure dplreplace doesn't accidentally affect any page-names (in case any page names contain the same string). The format statement isn't normally required-- page-names will get listed in the output by default. I use · as delimiter, but it can be any character you want. Note The format statement isn't normally required-- page-names will get listed in the output by default. The format parameter by itself it's insufficient to remove the matching text, because the matching text is added to the output (by the include statement) after the output of the format statement. The format statement has no effect on the output of the include statement.
{{#dplreplace:

{{#dpl: 
    |uses = Template:Tag
    |format = ,\n* %PAGE%·,,
    |includematch = /Anteater/
    |include = {Tag}:1
}}

|·Anteater}}

Johnywhy (talk) 13:09, 5 June 2018 (UTC)Reply


edit

I'm trying to use build in Mediawiki Gallery to generate a blog-like homepage with DPL3. I don't get what i have done wrong. Do you have an idea ?

{{#dpl:
|namespace=
|format   = <gallery mode="packed-overlay">,¶Image:%PAGE%.jpg|[[%PAGE%]],,</gallery>
}}

Regards

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)Reply

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'.50.93.222.15 02:10, 3 August 2018 (UTC)Reply

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?

<dpl>
ordermethod=lastedit
order= descending
namespace=
count=3
format   =,\n*[[%PAGE%|'''%TITLE%''']],,
include=%0[450]
allowcachedresults=true
</dpl>

Regards

Reset and eliminate

edit

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)Reply

Using DPL with images

edit
<dpl>
category=News
ordermethod=categoryadd,firstedit
order= descending
namespace=
count=9
format   =,\n*[[File:%IMAGE%]],[[%PAGE%|'''%TITLE%''']],,
include={News}:image,%0[450]
allowcachedresults=true
</dpl>

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 ?

Warning: preg_match_all(): Compilation failed: recursive call could loop indefinitely

edit

MediaWiki | 1.31.6 Semantic MediaWiki | 3.1.4 PHP | 7.2.24 (apache2handler) DynamicPageList3 3.3.3 (2019-04-03)

Warning: preg_match_all(): Compilation failed: recursive call could loop indefinitely at offset 20 in /app/mediawiki/extensions/SemanticMediaWiki/src/Parser/LinksEncoder.php on line 173

Warning: Invalid argument supplied for foreach() in /app/mediawiki/extensions/SemanticMediaWiki/src/Parser/LinksEncoder.php on line 182

same error. my homepage showing the error 3 times, I went through all my extensions and I found that extension DynamicPageList3 3.3.3 (2019-04-03) disabled and 2 of the instances of the error went away.

Differently named surrogate + using DPL %TITLE% with the #sub parser function

edit

Differently Named Surrogate issue

edit

I'm trying to figure out how to use a template name completely different from the original template. So I have Template:CountryInfo, then Template:CountryInfo.dpl as one surrogate this works when using includepage={CountryInfo}.dpl, then in that template I specify the template parameters I want to use and it all works great. If I go by the documentation, I should be able to use a surrogate that is named differently ({CountryStats}) than the template it draws from by using the other syntax {CountryInfo¦CountryStats}. Except that it includes the entire contents of the CountryInfo page ignoring the template variables set in CountryStats.dpl, why?

The documentation states:

There is an alternate syntax to specify a surrogate template. It has the advantage that the surrogate template may reside in a different namespace than the original template. Also, the surrogate template's name can be completely different from the original template name: {template¦surrogate template}. For example, you may specify something like {my template¦Help:Substitution for my template}.

This correctly outputs the template parameter values specified in the CountryInfo.dpl template:

{{#dpl:
|category=Countries
|includepage={CountryInfo}.dpl
|mode		    = userformat
|listseparators    = \n{{{!}}class="wikitable sortable" style="padding:0px;" \n{{!}}-\n!Title1 \n!Title2,\n{{!}}-,\n{{!}}-\n{{!}}-,\n{{!}}}
|secseparators	    = \n{{!}},,\n{{!}},
|multisecseparators= ,\n{{!}}-\n{{!}}\n{{!}}
}}

This incorrectly outputs the entire page contents of CountryInfo instead of those specified the CountryStats.dpl template

{{#dpl:
|category=Countries
|includepage={CountryInfo¦CountryStats}.dpl
|mode		    = userformat
|listseparators    = \n{{{!}}class="wikitable sortable" style="padding:0px;" \n{{!}}-\n!Title1 \n!Title2,\n{{!}}-,\n{{!}}-\n{{!}}-,\n{{!}}}
|secseparators	    = \n{{!}},,\n{{!}},
|multisecseparators= ,\n{{!}}-\n{{!}}\n{{!}}
}}

#Sub parser function to trim %TITLE%

edit

I'm also trying to use the parser function #sub to trim a page title, but instead it trims the built-in variable reference and displays that output.

So for example: In a dpl surrogate template

{{#sub:%TITLE%|-6}}

Results in:

TITLE%

How can the results of a dpl query be used with parser string functions? I tried setting %PAGE% as a variable and then trimming that but it just outputs the full page title untrimmed by #sub :(

Something broken in my DPL

edit

Why is this post getting deleted?

This simple setup

{{#dpl:
 |category    = Ideell förening
 |addauthor   = true
}}


Gives me this:

  • Sockengille . . [[User:|]]
  • St/Domstol 202/06 . . [[User:|]]
  • Pakistan Association . . [[User:|]]
  • Yoruba Summit Förening . . [[User:|]]
  • Yezidiska Kulturföreningen Dasin I Arlöv . . [[User:|]]

Ass you can see, the author is not showing and instead i get this [[User:|]]

 MediaWiki	1.34.1
 PHP	7.3.18-1+ubuntu16.04.1+deb.sury.org+1 (apache2handler)
 MySQL	5.7.30-0ubuntu0.16.04.1
 ICU	65.1
 Lua	5.1.5
 DynamicPageList3	3.3.3

Diagnostikon (talk) 09:46, 9 June 2020 (UTC)Reply

It works fine on my wikis. The only time it shows something like you describe is when the user in question no longer exists (i.e., I deleted the user with a maintenance script), the user page in question doesn't exist etc. Also might be helpful to specify where the issue can be seen. Have you tried using the debug features to view the output? TiltedCerebellum (talk) 02:38, 11 June 2020 (UTC)Reply
Diagnostikon, I'm having the same problem. We have a query that lists all talk pages changed in the last year, and who made the last edit. The query still works fine for talk pages last changed before January (when my wiki was updated to v1.33), but talk pages changed after this date no longer bring the last editor's name. I guess there's been a database change somewhere and DPL is not aware of the new location of this info. Capmo (talk) 05:58, 9 December 2020 (UTC)Reply

Using "Count" parameter with "allowUnlimitedResults" = True

edit

I think that raises an error: I could not understand the error, it was something like that: "Warning, Parameter $0 is Wrong !count, Using default {number}, Help: $0=$3".

Tried to use |debug={0 to 5}, without any helpful information given from it.

Anyway, The actual 'error' (or it was designed?) as i see from the source code is that: https://gitlab.com/hydrawiki/extensions/DynamicPageList/-/blob/9cf1cb6866755be567c917e1ed328e8f9a386f35/classes/Parameters.php Line 622, "_count". Looks like ignoring the count parameter if this "allowUnlimitedResults" is defined, Why?

This has now been fixed. Universal Omega (talk) 20:45, 23 March 2022 (UTC)Reply

How to do parser functions on %PAGE%? in surrogate

edit

Is there any way to use parser functions on variables inside of a surrogate?

I'm trying to trim letters of the end of a page name in a surrogate template and it only trims the variable name itself. I've tried a few different ways to convert it to a regular string... I just can't seem to wrap my head around it. Is there any way to convert a variable to a string for operations to be completed on it?

<dpl>
  category=Events
  linksto = Article Title
  includepage={Events}.table
  mode = userformat
  allowcachedresults = true
  listseparators = ¶{|class="wikitable sortable no-padding" ¶|- ¶!Event ¶!Year ¶!Month ¶!Day ¶!Type ¶!Prize ¶!notes,¶|-, ¶|- ¶|-,¶|}
  secseparators = ¶|,,¶|,
  multisecseparators = ,¶|-¶|¶|
</dpl>

And in the Events.table surrogate template:

<!-- Attempt 1 -->{{#dplvar:set|pageName|%PAGE%}}{{#sub:{{#dplvar: pageName }}|-9|2}}
<!-- Attempt 2 -->{{#dplvar:set|pageName|{{#rel2abs: %PAGE% }} }}{{#sub:{{#dplvar: pageName }}|-9|2}}
<!-- Attempt 3 -->{{#dplvar:set|pageName|{{#titleparts: %PAGE% }} }}{{#sub:{{#dplvar: pageName }}|-9|2}}

TiltedCerebellum (talk) 02:51, 1 August 2020 (UTC)Reply

Database error when using linksfrom and notlinksfrom at the same time

edit
[83d36244c493dded5faa776f] 2020-09-22 23:15:26: Fatal exception of type "Wikimedia\Rdbms\DBQueryError"

I get that when I do this:

{{#dpl:category=Species|linksfrom=Week 25/Ecosystem|notlinksfrom=Week 26/Ecosystem}}

They work as intended when used separately. I want to be able to do them at the same time. Is this a bug, and is there a workaround? Disgustedorite (talk) 23:25, 22 September 2020 (UTC)Reply

DynamicPageList3 does not follow the Actor Migration

edit

I am starting a migration to Mediawiki 1.35 of my wiki, and some DPL requests are now causing a database error when extracting user information. It seems the Actor migration was not taken into account in the latest versions. DPL3 still tries to get rev.rev_user and rev.rev_user_text fields which do not exist anymore. Is there a plan to correct this ? There was a bug open in gitlab one year ago but no evolution ...

I have the same problem and am currently looking at switching to DPL2 (DPL third-party). No idea if that's a solution yet but I guess I'll find out. We need 1.35 for the built-in php VE that no longer requires node parsoid... and 1.35 is the current version, our 1.33 is outdated and soon to be unsupported so we have no choice but try to some other stuff to get something working. We need DPL functionality, hopefully dpl2 is 1.35 compliant where DPL3 isn't. It's a bummer. TiltedCerebellum (talk) 23:31, 9 November 2020 (UTC)Reply
Nope, same problem in DPL2 unfortunately. Database full of errors regarding this. TiltedCerebellum (talk) 08:47, 13 November 2020 (UTC)Reply
I have MW 1.34.4 and it works all right (despite some PHP notices, which might have been there with earlier MW versions too, I don't know) so you could step up to that while waiting for DPL3 to work with 1.35 Jonathan3 (talk) 11:58, 20 November 2020 (UTC)Reply
There is the new bugreport 4867 on their Gitlab Repo hydrawiki/DynamicPagelist (sorry, can't add any external links) from two weeks ago which requests compatability with the actor schema. However, no reaction yet. Ljuhrich (talk) 23:07, 24 November 2020 (UTC)Reply
https://gitlab.com/hydrawiki/extensions/DynamicPageList/-/issues/4867 (I can add external links, since I'm an established user). * Pppery * it has begun 02:05, 25 November 2020 (UTC)Reply
Same problem also in Issue 4865 – "Select based on revision date": None of these work … MW 1.33.2 with php 7.2.32 and dpl 3.3.3. (Same result in MW 1.34.0)".
One administrator tweaked the DPL3 code to take care of this, but (on testing MW 1.35) asked "how many subtle problems may exist like the one mentioned [below]?"
Another administrator discovered that %User% still worked, but only on records that had been created before we installed MW 1.33 (from 1.32), and then we discovered that migration from "User" to "Actor" was happening in phases, apparently with each version of MW. Apparently migration included with MW 1.33 was on records created after its installation. This raises several questions, Do we need to install all updates, one after the other, to get complete migration? Are things complicated enough, or do you want more? Bcjohnston (talk) 23:46, 9 December 2020 (UTC)Reply

Category: Pages using DynamicPageList parser function not wanted

edit

I have DPL on every page through templates, and I do not want the pages added to the category "Pages using DynamicPageList parser function", as even after adding HIDDENCAT it clutters other things. How can I prevent it being populated? Vicarage (talk) 14:26, 31 October 2020 (UTC)Reply

Surround the category with noinclude tags:
<noinclude>[[Category:...]]</noinclude> -Jomegat (not logged in, sorry)
I don't understand that answer. Ever since commit 152a1b2 ("DPL3 with 1.35 support") every page where DynamicPageList3 is active gets added to the (non-existing) category:Pages using DynamicPageList parser function category. How can I stop that? I don't have any [[Category:...]] elements set, so I don't understand what a <noinclude> tag would accomplish here. Is there a tunable to disable that new behaviour? Please help. -- Evilninja (talk) 19:55, 6 April 2021 (UTC)Reply
This is a late reply, but since I just had the same issue. Here is how to resolve this. See also:
Help:Tracking categories
<quote>What category to use is determined by the tracking category's system message, that is, a page in MediaWiki namespace. If the message is a single hyphen-minus (-), then the tracking category is disabled.</quote>
  1. Go to page Special:TrackingCategories in your wiki
  2. Click on dpl-parserfunc-tracking-category in the column Message name
  3. Replace the text Pages using DynamicPageList parser function not wanted with a dash ("-"). The category will no longer be displayed on your wiki pages. MLRodrigue (talk) 12:06, 3 March 2022 (UTC)Reply

Please add compatibility with 1.35

edit

Please, please, please add compatibility with MediaWiki 1.35.

Potential bug in line 1319 of classes\Parameters.php

edit

foreach ($reset as $value => $key) { needs to be changed to foreach ($eliminate as $value => $key) {. This is probably why it never worked for me! On a new server I started getting the errors:

PHP Warning: Invalid argument supplied for foreach() in /....../extensions/DynamicPageList/classes/Parameters.php on line 1319 PHP Notice: Undefined variable: reset in /....../extensions/DynamicPageList/classes/Parameters.php on line 1319

Jonathan3 (talk) 21:22, 16 November 2020 (UTC)Reply

I believe this should be fixed. Universal Omega (talk) 20:51, 23 March 2022 (UTC)Reply

Potential bug at lines 278 and 280 of classes/Article.php

edit

Whenever I ran a query including the lastrevisionbefore parameter my apache error log got clogged up with lots of the following:

... PHP Notice:  Undefined index: rev_user_text in .../extensions/DynamicPageList/classes/Article.php on line 278, referer: ...
... PHP Notice:  Undefined index: rev_comment in .../extensions/DynamicPageList/classes/Article.php on line 280, referer: ...

To fix this I added ?? NULL to the relevant lines:

$article->mUser     = $row['rev_user_text'] ?? NULL;
$article->mDate     = $row['rev_timestamp'];
$article->mComment  = $row['rev_comment'] ?? NULL;

I'm using DPL3 3.3.2 (b67e4e9). Jonathan3 (talk) 22:54, 10 December 2020 (UTC)Reply

This is related to the Actor migration (for rev_user_text) and related database work (for rev_comment). It sounds like your wiki is running MediaWiki 1.35, meaning you're likely to keep running into these and similar issues with this extension; see the other recent comments here for an indication. ディノ千?!☎ Dinoguy1000 05:21, 11 December 2020 (UTC)Reply
I’m on 1.34.4 but have upgraded php version. Maybe earlier php versions ignore it and later versions just stop working. Also I wasn’t checking the logs previously. I’ve avoided upgrading to 1.35 because of potential compatibility problems, including with DPL3. Thanks for the link. I’ll keep an eye on this. Jonathan3 (talk) 08:27, 11 December 2020 (UTC)Reply

This should be fixed. Universal Omega (talk) 20:50, 23 March 2022 (UTC)Reply

Is DPL ready for MW 1.35 yet?

edit

There are quite a few recent fixes at https://github.com/Universal-Omega/DynamicPageList3/commits/ and I wonder whether I should upgrade to MW1.35 yet...

Thanks! Jonathan3 (talk) 00:33, 18 January 2021 (UTC)Reply

I just tried to get https://github.com/Universal-Omega/DynamicPageList3/ , which claims to support 1.35 and has a pending merge request to be merged in, to work with an old wiki that has <DPL> tags. The documentation doesn't say you need to do anything beyond installing the extension in order to make <DPL> tags work. The extension replaces them and their contents with nothing at all. Changing the tags to something else doesn't help. Some error_log statements indicate that <DPL> elements are being recognized, but not their contents. At that point I gave up. Rp (talk) 16:10, 15 February 2021 (UTC)Reply

Two invocations of DPL on the same page

edit

I have a page where I need to have two DPL listings showing different category combinations on the same page. It worked on DplThirdParty, but the second invocation returns on empty set on DPL3. I know the syntax is OK for the second invocation, because if I remove the first one the second one appears just fine. Any help would be appreciated. --Jomegat (talk) 03:44, 22 January 2021 (UTC)Reply

Found it. The DPL was being invoked from a template that lacked a #vardefine. --Jomegat (talk) 21:25, 29 January 2021 (UTC)Reply

MW 1.36

edit

I am having issues with this extension after having upgraded to MW 1.36. Is there and expected ETA to have it working with 1.36? — Preceding unsigned comment added by Hpyjoy (talkcontribs) 12:50, 3 June 2021 (UTC)Reply

Works over here. What kind of issues exactly? -- Evilninja (talk)

When there is no "Subpages", an error occurs.

Template:Subpages:

{{#dpl:
titlematch={{{1|{{PAGENAME}}}}}/%
|nottitlematch={{{1|{{PAGENAME}}}}}/%/%{{!}}%Consolidated
|notuses=Template:Draft
|ordermethod=title
|replaceintitle=/.*\/([^\/]*)/,$1
|shownamespace=false
|noresultsheader=''No subpages''
|allowcachedresults=false
}}

Any page using this template has the normal template "Subpages" text:

I did not have this issue on 1.35. — Preceding unsigned comment added by Hpyjoy (talkcontribs) 15:33, 7 June 2021 (UTC)Reply

What error do you get? Universal Omega (talk) 20:45, 23 March 2022 (UTC)Reply

Support Pagination or Show More Results?

edit

I'm showing backlinks on pages, and I want to for example limit the results to the first 10 backlinks, and if there are more, to show a link to show the rest of them, or else have pagination links (next 10, prev 10). I can't quite see how to do this with the scroll and count parameters as documented on the gamepedia site. How can I only show a link to all or more results if the results > count? Thanks for any help.

And by the way, here is my backlinks code, which also shows backlinks to redirects to a page:

{{#dpl:
linksto={{FULLPAGENAME}}{{!}}{{#dpl:linksto={{FULLPAGENAME}}|ignorecase=true|redirects=only|mode=userformat|listseparators=,{{!}}%PAGE%,,}}
|ordermethod = lastedit
|order       = descending
|ignorecase=true
|distinct=strict
}}

--Edtechdev (talk) 13:17, 10 June 2021 (UTC)Reply

DPL3 doesn't seem to play nice with comma-separated template values in "tablerow" fields

edit

No matter how much I've attempted it so far in my first few hours of trying it, |tablerow doesn't seem to accept comma-separated values fetched from the templates it's referencing. As a demonstration of what I'm trying to do on my newly-(re)launched creative-venture wiki:

  • Suppose I'm fetching, with DPL3, a template field that has Page1, Page2 supplied for it (with |include={Template}:Title as the definition).
  • If I do {{#arraymap:Page1, Page2|,|*|[[*]]}} (with PageForms), then the links will render correctly as Page1, Page2...
  • outside the {{#dpl:}} field, where it renders the whole thing as Page1, Page2 (|tablerow=²{#arraymap:%%¦,¦*¦[[*]]}²). Not even the tips I tried out some time ago--&amp#44;, \x2c, or some other sort--could split it out. Attempting {{#arraymap:Page1, Page2| |*|[[*]]}} (without the comma) outputs many one-character links, which I don't want either.

Unfortunately, with not much I've found on the matter, think I'll have to go for semicolon separators instead until the issue gets resolved. To @Universal Omega: Do you know what's happening here? --Slgrandson (talk) 07:22, 9 July 2021 (UTC)Reply

@Slgrandson: That’s because , is a separator in the |tablerow= parameter[1], and thus needs to be escaped. — ExE Boss (talk) 13:35, 12 July 2021 (UTC)Reply
@ExE Boss: Like this: \& #44;? (Remove the space to get the result.) --Slgrandson (talk) 15:49, 12 July 2021 (UTC)Reply
@Slgrandson: &#44; will cause it to be escaped from {{#arraymap:...}} as well. One way to do this correctly is, I believe, to create {{comma}} with <onlyinclude>,</onlyinclude> as the content, and use it like: |tablerow=²{#arraymap:%%¦²{comma}²¦*¦[[*]]}². — ExE Boss (talk) 16:20, 12 July 2021 (UTC)Reply
@ExE Boss: Tried it minutes ago--actually worked. Thanks for your help! But...there's another (unrelated) problem I've got with DPL3, which I'll delve into in a subsequent section. --Slgrandson (talk) 09:56, 17 July 2021 (UTC)Reply

A couple of new issues (plus another longstanding one)

edit

To @Universal Omega: /@Paladox: /@ExE Boss:

It's been over a week since I deployed DPL3 on my already-(re)launched creative-venture wiki. When it works wells as it should, it does work well. But when it doesn't...well...

  1. Earlier during the overnight shift today, as I was importing/converting material from my earlier Referata sites, I ultimately hit a brick wall. By all rights, for instance, the DPL3 call
    {{#arraymap:{{#dpl:namespace=Character |linksto=Species:Guadeloupe raccoon|format=,%TITLE%~}} |~|*|{{Character|*}}|\s•\s}}
    should output a list of all characters from my forthcoming book series who are Guadeloupe raccoons (Procyon lotor minor). As it stands at press time, the list consists of Albert, Gertha, Marguerite, Samson, Vincent...
    and Violet, who is actually supposed to be a ring-tailed cat (Bassariscus astutus), but who nonetheless appears through a mention of her sweetheart's species (Sam is a Guadeloupe raccoon) thanks to the {{Character}} tag. This led to an attempt to cancel it out with |includematch=, resulting in:
    {{#arraymap:{{#dpl:namespace=Character |linksto=Species:Guadeloupe raccoon|include={Taxobox}:Species |includematch=/\¦\s*Species\s*=Guadeloupe raccoon/|format=,%TITLE%~}} |~|*|{{Character|*}}|\s•\s}}
    ...which had no effect. Per RuneScape Wiki's guide (and despite what I once assumed from FollowTheScore's manual), |includematch= "does not filter the list of pages", the catalyst for a future patch idea: Filter pages based strictly on matched page text. Either it's a hitherto undiscovered/untested bug, or it's already in DPL3's DNA.
    This is one of those moments that makes me really miss Referata and its key selling point, Semantic MediaWiki, even more. (Keep in mind that Miraheze, where I've now moved, has been hesitant to introduce SMW for years, and it remains on their long-term backburner at this writing thanks to recent compatibility issues with MW 1.36.)
  2. In some DPL-powered templates at my new site, a {{DEFAULTSORT:}} tag and/or |Sort key= field is present for categorising purposes. On normal category pages, the titles sort correctly (e.g. "The Advertising Record", "Main Title", "The Star-Spangled Banner" to give an example from the track listings therefrom)...but at "Pages using DynamicPageList parser function", it's a whole different story. DPL3, apparently, does not obey/respect/honour the declared sorting requirements for whatever reason, making "Main Title" precede the page names starting with "The". Is there a native workaround, or is there another way out?
  3. Not to mention DPL3's maximum results limit is still 500 (last I or anyone checked), which might prove limiting on larger and/or more established wikis. Is there a way (or are there future plans) to raise it to something like 1,000 or 2,000?

Sadly, I feel DPL3 itself is more or less underrated (despite its nominal usefulness): The original developers have seemingly abandoned it in recent years; the guides I've found online are severely outdated, insubstantial/complex, or both (and no wonder I had to do something about it); and don't get anyone started on last year's actor migration issues (already discussed elsewhere here).

P.S. This talk page is getting really long. Shouldn't we start archiving it or something? --Slgrandson (talk) 21:58, 17 July 2021 (UTC)Reply

1) Try with ²{Character|*}²
2) Will take a look at that
3) $wgDplSettings['maxResultCount'] or $wgDplSettings['allowUnlimitedResults'] both of which have recently been fixed.
Universal Omega (talk) 20:42, 23 March 2022 (UTC)Reply

Seems that DPL3 sorting (in its present state) doesn't fare well with umlauts (or Unicode) either

edit

Once again, from the front lines of my recently-(re)launched creative-venture wiki...

For the Tovasala Dictionary's revival, I managed to port over and recode the "Nearby" scroller from its original home at Referata. (Tovasala, a constructed language [conlang] in the works since late 2016, is one of the pet projects with a new home on my wiki. In dictionary entries, "Nearby" shows the previous five [up] and next five [down] words from a given position; then and now, an Irish dictionary site provided the inspiration.)

With this feature, all seemed to be going well...until the entries for äffuind (ending up at) and äffuindar (to end up at) suddenly started showing up on pages not even with the same first letter. Using this debugging syntax on Special:ExpandTemplates, centred around nèke (cat):

{{#dpl:category=Tovasala words|title<=nèke|ordermethod=sortkey|order=descending|count=10}}
----
{{#dpl:category=Tovasala words|title>=nèke|ordermethod=sortkey|order=ascending|count=10}}

gives the following mixed result of an output at this writing. (The trouble spots are bolded for emphasis, and the "Entry:" prefix refers to a custom dictionary-specific namespace.)

  • Entry:mẽrvèle
  • Entry:mẽrveleuzi
  • Entry:nalar
  • Entry:nalbivar
  • Entry:neklé
  • Entry:nend
  • Entry:nivèle
  • Entry:nivelune
  • Entry:nochème
  • Entry:nochemi

  • Entry:äffuind
  • Entry:äffuindar
  • Entry:oanile
  • Entry:oaniloudrar
  • Entry:oaniloudravlurat
  • Entry:oashène
  • Entry:oashenile
  • Entry:oudrar
  • Entry:pangure
  • Entry:pexolte

And by logic, nèke shouldn't even be between nochemi (night) and äffuind(ar)/oanile (his) in the first place, but instead between nalbivar (not to be) and neklé (the cat). (After pexolte [bunchberry plant; from Nuxalk], the next two words should be pexoltune [a bunchberry plant] and pued [then; Sp. pues].)

The umlaut problem was encountered by another DPL user earlier this year. As "gruniversal" stated at the time,

According to https://help.gamepedia.com/Extension:DPL3/Parameters:_Controlling_output_order the parameter ordercollation=latin1_german_ci should sort the listing after german[sic] collation but it does not seem to change the listing at all.

Reply one month later, from @Universal Omega:

Hello, I unfortunately am unable to find the cause of this issue. The only option I can think of is you setting $wgDBTableOptions = 'ENGINE=InnoDB, DEFAULT CHARSET=utf8'; in LocalSettings.php, then running update.php. However this action can be dangerous, and possibly cause fatal or potential data loss in rare circumstances. Its[sic] not a recommended course of action, but the only one I can currently think of. I apologise.

Although, of course, I did everything right...

What with that, my own previous filings, last November's "Actor migration" crisis, and the original developers now apparently absent, I think DPL3 ought to have far more attention thanks to this and several other matters lately. (Once again, I'm missing the glory days of Referata and SMW for this.) To @ExE Boss: /@Paladox: Do you know what's even happening in the code that's preventing the proper sorting?

Perhaps in the next few days, I'll try to come up with a workaround based on the CategoryTree or some other means.

Also: How about we start archiving this talk page by next month? --Slgrandson (talk) 23:59, 7 August 2021 (UTC)Reply

Duplicates in page results

edit

Hi, we have issues with duplicate results in our queries, on a wiki called Nonciclopedia, on Miraheze, which uses MW 1.36. Is the problem on our end or it an issues with DPL3 and MediaWiki 1.36?--109.117.184.142 06:11, 4 October 2021 (UTC)Reply

Update:It seems that what happens is that the extension sees every revision of a page as a single separate results, this can be seen by making it sort by edit dates and having it show such edit dates. Can this be fixed?--109.117.184.142 06:18, 4 October 2021 (UTC)Reply
Can you please provide an example page or dpl parameters you are using? Universal Omega (talk) 16:05, 24 March 2022 (UTC)Reply

parser function doesn't parse wiki text while tag does

edit

I want to create a hierarchical list of pages, so subpages are indented (using two ** or more)

The following works as expected, creating a list of pages with subpages indented (BTW, using ordermethod=title gives an exception)

<dpl>
format=,{{#invoke:Helpers|subpage_bullets|page=%PAGE%}} ,<br />
ordermethod=titlewithoutnamespace
namespace=
</dpl>

But the following does not, the list is rendered as text:

{{#dpl:
format=,\n{{#invoke:Helpers|subpage_bullets|page=%PAGE% }} ,,
| ordermethod=titlewithoutnamespace
| namespace=
}}

Bullets are rendered, but subpages are not identified as such by subpage_bullets so they are not indented

subpage_bullets is defined as:

local p = {} --p stands for package

function p.subpage_bullets( frame )
	local page = frame.args.page
	local parts = mw.text.split( page, "/", true )
    return string.rep("*", #parts) .. " [[" .. page .. "|" ..  parts[#parts] .. "]]"
end

return p

One of the things I want to do is to use the output of DPL with the TreeAndMenu extension, and I think I need the parser function form for that.

Try using ²{#invoke...}² Universal Omega (talk) 20:53, 23 March 2022 (UTC)Reply

Another two bugs to report on

edit

Once again, paging @Universal Omega: /@Paladox: /@ExE Boss: Along with anyone else showing the barest modicum of interest these days in (maintaining/fixing) this underrated tool.

  • DPL3's current version tends to throw an unexplained "Extension:DynamicPageList (DPL), version 3.3.7: ⧼dpl_log_24⧽" error whenever "lastrevisionbefore" or "firstrevisionsince" is in use, regardless of further settings. (In contrast to counterparts "allrevisionsbefore" and "allrevisionssince", which both actually work.) Reproduced by this contributor at Special:ExpandTemplates on his personal Miraheze site; reported this late October (in German) at the GW2Wiki.
  • Among DPL3's "format" variables are "%REVISION%" and "%EDITSUMMARY%", which FTS states are only available for revision-based queries. "%REVISION%" shows the ID in question just fine, but "%EDITSUMMARY%" (which should be a great asset in theory/practice) is AWOL for some reason.

And if there are several others, I will more than likely report on them once I come across them. See above for my earlier (unresolved) filings. --Slgrandson (talk) 21:10, 1 December 2021 (UTC)Reply

The first issue mentioned here should now be fixed. As for %EDITSUMMARY%, that's currently known to be non-functional at the moment, but I'm trying to work on a fix for that. Universal Omega (talk) 20:48, 23 March 2022 (UTC)Reply

Last bug for now (re: "titleregexp")

edit

Once again, paging @Universal Omega: [1]/@Paladox: /@ExE Boss: Along with anyone else showing the barest modicum of interest these days in (maintaining/fixing) this underrated tool.

As stated at Miraheze Phabricator last holiday season, DPL3's "Unicode/UTF-8 support leaves much to be desired--especially when titleregexp comes into play." As proof, specimen code from this contributor's creative-venture wiki involving entries from--you guessed it--the Tovasala Dictionary:

{{#dpl:category=Tovasala words|titleregexp=^s[uü]o}}

...which ideally should match all words beginning with suo and süo, but whose output instead leaves out the latter set and displays suode (one), suole (road), suodarde (one million), and suokende (unicorn) instead. (Whereas the desired output should also include süottemi [first], achieved by the workaround {{#dpl:category=Tovasala words|titleregexp=^suo{{!}}^süo}}.)

And that's it for the bug reports here until I come across another; talk page archives to follow any month soon. As before, see above for my earlier (unresolved) filings. --Slgrandson (talk) 22:31, 12 February 2022 (UTC)Reply

If possible, do you mind creating your issue here so I may better track it and investigate? Universal Omega (talk) 16:04, 24 March 2022 (UTC)Reply
  1. Away from Miraheze duties till May; I'll ask their team on the circumstances.

Actually, you could try /^s[uü]o/u for regex. Universal Omega (talk) 17:03, 24 March 2022 (UTC)Reply

Tried that minutes ago. Nothing shows up.
(TIL, by the way: /u provides Unicode support in regex.) --Slgrandson (talk) 12:20, 25 March 2022 (UTC)Reply

Hit Counter and Dynamic Page List 3

edit

I have found there there is a error when installing the Hit Counter and Dynamic Page List. Is there something I can do to run these extensions together?

Thank you,

Margaret 199.247.32.224 17:49, 23 February 2022 (UTC)Reply

What error do you get? Universal Omega (talk) 20:57, 23 March 2022 (UTC)Reply

dpl.default - why?

edit

Sometimes if i do thinks like that:

{{#dpl:
| dplcache = Rezepte-{{FULLPAGENAME}}-1
| category = {{FULLPAGENAME}}
| includepage = {Infobox Rezepte} notizbuch dpl
| uses = Template:Infobox Rezepte
| namespace     = 
| format      =,,\n
| suppresserrors=true
}}

I have in the output redlinks to sites like "Template:Infobox Rezepte notizbuch dpl.default".

How do these dpl.default links appear and what can I do about them? Yukii (talk) 19:36, 22 March 2022 (UTC)Reply

Please try | includepage = {Infobox Rezepte}:notizbuch:dpl
If your goal is to show those 2 parameters, if it isnt I am not duee what you are trying to achieve, could you please explain that? Universal Omega (talk) 16:02, 24 March 2022 (UTC)Reply

Not honoring local system format (or MediaWiki configured format) for date

edit

I have setup my installation to use the Danish locale. It is shown as such in my user settings.

No matter what I do, DPL3 insists on using the US language for month names. EVEN THOUGH MediaWiki shows this (a correctly Danish formatted (short form) date:

I have setlocale(LC_TIME, array('da_DA.UTF-8','da_DA@euro','da_DA','danish')); in LocalSettings.php so there should be no issue or excuse, still, DPL3 does NOT do what you say and use the user settings, even though it is defined (img 2 and 3).

 
As you can see, it's correctly set up but the month name is not translated to Danish as in the rest of MediaWiki (including other extensions).
 
 
In Danish, May is "maj" and not capitalized.


Ppehrson (talk) 14:10, 19 July 2022 (UTC)Reply

ParserOutput::mCategories

edit

Hello

How can i resolve this problem?

PHP message: PHP Deprecated:  ParserOutput::mCategories public read access deprecated [Called from DPL\DynamicPageListHooks::endReset in /home/lalala/extensions/DynamicPageList3/includes/DynamicPageListHooks.php at line 527]


Thanks for any help Lokipr (talk) 14:29, 21 September 2022 (UTC)Reply

This was reported to the bug tracker earlier this year: PHP Deprecated error on Mediawiki 1.38.2, no solution has been proposed yet. Ckujau (talk) 18:14, 2 October 2022 (UTC)Reply

Disable intersection-category

edit

Is there a way to disable the automatic addition of pages to the (empty) Pages using DynamicPageList category? I did not find a toggle to switch that off, so for now I always do apply this patch:

$ diff -Nrup includes/Hooks.php{.orig,}
--- includes/Hooks.php.orig     2022-05-24 17:20:38.000000000 +0200
+++ includes/Hooks.php  2022-10-02 19:58:16.229758439 +0200
@@ -44,7 +44,7 @@ class Hooks {
                if ( $wgDLPMaxCacheTime !== false ) {
                        $mwParser->getOutput()->updateCacheExpiry( $wgDLPMaxCacheTime );
                }
-               $mwParser->addTrackingCategory( 'intersection-category' );
+       //      $mwParser->addTrackingCategory( 'intersection-category' );
 
                $countSet = false;
                $count = 0;

....and now pages are no longer added to that category. Ckujau (talk) 18:09, 2 October 2022 (UTC)Reply

New Parameter for Extension Approved Revs

edit

Hello all,

like nicolas sénéchal, I also faced the problem to connect this extension with "Approved Revs". A big thank you goes to Nicolas who has already done most of the work.

I have just continued to work on it myself and it is now fully implemented. There are only two files to extend:

Add this in extensions\DynamicPageList3\includes\Query.php

    /**
     * See https://www.mediawiki.org/wiki/Extension_talk:DynamicPageList3
     */
    private function _approved( $option ) {

        if ( $this->parameters->getParameter('approved')) {
       

            $tableAlias = "appr";

            $this->addTable( 'approved_revs', $tableAlias );

            $this->addJoin(
                $tableAlias,
                [
                    'LEFT JOIN', "{$this->tableNames['page']}.page_id={$tableAlias}.page_id"
                ]
            );

            switch ( $option ) {
                case 'only':
                    $this->addWhere(
                        [
                            "{$tableAlias}.page_id IS NOT NULL"
                        ]
                     );
                    break;
                case 'exclude':
                    $this->addWhere(
                        [
                            "{$tableAlias}.page_id IS NULL"
                        ]
                    );
                    break;
            }
   
        }

    }

Add this in extensions\DynamicPageList3\includes\ParametersData.php in the array "private $data = ["

        /**
         * approved =...
         * - exclude: excludes approved pages from lists
         * - only: lists only approved pages in lists
         */
        'approved' => [
            'default' => null,
            'values' => [ 'exclude', 'only' ]
        ],

and this in "private static $parametersForRichnessLevel = [ 0 => ["

            'stablepages',

Usage example:

{{#dpl:
|category  = Countrys
|redirects = exclude
|approved = exclude
}}

Ich freue mich wenn ich einigen damit weiterhelfen konnte. Vielleicht findet diese Ergänzung den Weg in Zukünftige Versionen dieser tollen Erweiterung :)

Viele Grüße aus Deutschland Blckms (talk) 16:52, 10 October 2022 (UTC)Reply

DPL3 in sidebar?

edit

Is using DPL3 in Mediawiki:Sidebar possible? When I try, the sidebar doesn't show any output from it. Dimpizzy (talk) 19:15, 14 December 2022 (UTC)Reply

Return page titles as plain text?

edit

I am trying to use this extension to get a list of categories, and then return them in a comma-separated list in order to power a dropdown in Page Forms, but can't figure out a way to opt out of creating page links and just return the text. Is there a way to do this? Here's what I have so far:

{{{field|topic|
input type=dropdown|
values=
{{#dpl: 
category=Proposals|
namespace=Category|
mode=inline|
shownamespace=false|
inlinetext=,
}}
}}}

-- Nicholasalanbrown (talk) 16:05, 9 January 2023 (UTC)Reply

Try this code:

{{{field
 | topic
 | input type=dropdown
 | values = {{#dpl: namespace = Category
   | category = Proposals
   | mode = inline
   | format = ,%TITLE%,,
   | inlinetext = &#44;
  }}
}}}
-- Want (talk) 21:21, 9 January 2023 (UTC)Reply
This worked great! The only change I had to make was just writing a raw comma (i.e. ",") instead of the entity number under "inlinetext." Whenever I tried the entity number it would just print the code again. Thanks so much for your help! Nicholasalanbrown (talk) 03:14, 10 January 2023 (UTC)Reply

Advanced table output trouble

edit

Hi everyone, I can't for the life of me figure out how to create the following: ibb dot co /rxGjVmt (sorry for image link, I can't figure any other way to illustrate what I want easily).

I want to lay out all pages in a category or categories with their titles and single images (from infobox), kind of like rows of trading cards or something.

Is this even doable in DPL3?

Thanks for any feedback! 2001:818:D8C3:5600:25F9:B7A1:DD1E:F7D2 18:30, 3 March 2023 (UTC)Reply

include not including contents as expected

edit

Tested the extension, the page queries are fine, the main purpose was to use include functionality and there a glitch in the transclusion appeared. The include did not include the part of the page, just the html code (iframe tag from the extension)(tested both the heading and the labeled section configurations). The contents of the transcluded page contained a video embedded via EmbedVideo extension. When the video was the only element in the test page and include was defined for the complete page, include=* then it was transcluded correctly.

Environment MediaWiki 1.38.2, PHP 7.4.33 (fpm-fcgi), DynamicPageList3 3.4.6 (REL 1_38), EmbedVideo 3.0.8 https://github.com/StarCitizenWiki/mediawiki-extensions-EmbedVideo

Any solutions? Thanks. Pspviwki (talk) 18:06, 14 March 2023 (UTC)Reply

show the chapter section where the file is used?

edit

hi there! i'm wondering if there's a way to make the output show the chapter heading where a file is used? i've been able to get the %section% variable to show in output when there are multiple pages with an identical section (e.g. apple, grape, orange all have an "about" section), but am having trouble configuring when i know the sections are different.

for a theoretical barebones example, something like

{{#dpl: |imageused=file:apple.png }}

might currently show

[[food]]
[[recipes]]

is there some way i can configure the output to show something like this instead?

[[food#fruit]]
[[recipes#apple pie]]

thanks in advance! 2607:FEA8:780:3620:3010:3BEF:7AAB:C9D4 21:05, 22 March 2023 (UTC)Reply

Extension:DynamicPageList (DPL), version 3.3.8: ⧼dpl_log_24⧽

edit

What on earth does "dpl_log_24" mean as an error message? I'm seeing it on many queries which should have succeeded.

For instance, this fails:

{{#dpl:
  order=descending
| ordermethod=lastedit
| namespace=Forum
| category=Forum
| uses=Template:Forumheader
| count=8
| addeditdate=true
| include={Forumheader}.dpl
| userdateformat=d M
| format=,\n* %DATE%: ,,
| titlemaxlength=60
| allowcachedresults=false
}}

while this succeeds:

{{#dpl:
  order=descending
| ordermethod=categoryadd
| namespace=Forum
| category=Forum
| count=8
| include={Forumheader}.dpl
| userdateformat=d M
| format=,\n* %DATE%: ,,
| titlemaxlength=60
| allowcachedresults=false
}}

I see no reason why "ordermethod=lastedit" shouldn't be valid, either here or on the Extension talk:DynamicPageList (third-party) which this replaced. I'm also disappointed to see that there is no documentation or incomplete documentation on this site about how even to use this extension... is sending the reader to a fandoom site a bad joke? A web search for "Extension:DynamicPageList (DPL), version 3.3.8: ⧼dpl_log_24⧽" gives a list of affected sites, which seem to be using a range of MediaWiki and PHP7 versions. Everything from UBC to some site in Brazil is seeing this break, but the message is completely undescriptive as to what is going wrong; the .json file lists only errors up to dpl_log_22 with any localised description at all, so what is dpl_log_24? 204.237.89.128 20:12, 3 May 2023 (UTC)Reply

Template:Extension DPL

edit

When I use the DPL, the statement "Template:Extension DPL" appears above the DPL and I cannot delete it. How can I delete it? 160.237.108.123 10:48, 23 May 2023 (UTC)Reply

Do not delete it. Instead, create the template, with no content if you want. That way you can easily track which pages are using this extension. Ciencia Al Poder (talk) 11:35, 23 May 2023 (UTC)Reply

Table revision_actor_temp removed from MW1.39

edit

The table Manual:Revision_actor_temp_table exist only between versions 1.31 – 1.38. This table using DPL3 for ordermethod=lastedit and for similar options. Svamberg (talk) 11:50, 31 May 2023 (UTC)Reply

Sorry, I used Download link from this website, new version is on GitHub. Svamberg (talk) 12:13, 31 May 2023 (UTC)Reply

Get Page Information

edit

I use Extension:PageImages which creates a "Page image" property for each page. This can be viewed by added the "?action=info" parameter in the url, which shows other page properties such as Display title, Page ID, Number of page watchers, and more.

Can the Page image property, or any other property, be outputed by dpl? Such as: {{#dpl:linksto=Banana|format=,%PAGEIMAGE%,}} 70.160.223.43 02:44, 1 June 2023 (UTC)Reply

edit

I want to use the following on all pages, so it shows all the incoming and outgoing links in seperate.

{{#dpl: |linksfrom = Extension talk:DynamicPageList3 |mode = ordered |ordermethod = title |order = ascending }}

{{#dpl:linksto = Extension talk:DynamicPageList3 |mode = ordered |ordermethod = title |order = ascending }}

Problem is, that the output of "linksfrom" creates a list with links. "Linksto" then counts these as links and adds them to the list. Which is not wanted. Any workarounds? Bedtry (talk) 13:51, 21 June 2023 (UTC)Reply

Create List of Newest Articles

edit

Can this extension be used to create a list of the X newest articles in the mainspace that are in category Y? 70.160.223.43 01:13, 26 June 2023 (UTC)Reply

Pages using DynamicPageList3 parser tag (page does not exist)

edit

Hello,

After upgrading my MediaWiki to version 1.39.6, the DynamicPageList3 extension seems to be malfunctioning. Previously, I used the following structure, and it worked well:

<dpl>

 uses = Template:abc
 include = ...
 includematch = ...
 table = ...
 tablesortcol = ...

</dpl>

However, with the new version, all pages display the message "Pages using DynamicPageList3 parser tag (page does not exist)" and are not functioning correctly. I would appreciate any assistance in identifying the cause of this issue and finding a solution. Can someone provide guidance on how to fix this problem?

Thank you! Hoanghaicv (talk) 04:43, 9 January 2024 (UTC)Reply

maxResultCount not working

edit

I just tried to fix the issue that our DPL Statement on https://wiki.pathfindersonline.org/w/AY_Honors is only returning 500 results.

I did that by installing version 3.4.4 and we are using MW 1.35.5. A newer version of the extension did result in a white screen (wiki not loading anymore).

Sadly that didn't help. The only way I was able to get it working, was editing the default value of the count-item in the data array inside of the ParametersData.php file.

'count' => [ 'default' => 1000, 'integer' => true ],

I hope someone can help with a solution.

Best regards,

- DesignerThan (talk) 12:12, 14 February 2024 (UTC)Reply

Using : %PAGE% problem

edit

I am using the following code below to bring in section of pages inside a div class called items. The content I want to bring in is between tags.

Now, this works fine BUT if there are more than 7 pages in the category, the page times out out when I try and save the DPL code in a new page. If I add count=7 is works, if I add count=8 or more it won't save the page and it timesout.

I though this could be some perfomance issue but I have tried everything to get this to work including tweaks on the server. What's weirder is, I created a bunch of pages using the same DPL query as seen below months ago and they are bringing all the results in fine.

<dpl>
categorymatch=Items
  mode=userformat
  ordermethod=titlewithoutnamespace
  listseparators=\n{|,|-\n,{|class="items"\n|{{:%PAGE%}}|}\n\n,|-,|}
|uses = Template:Infobox
</dpl>

Any ideas on how I can get this to work?

Cheers! SyrinxCat (talk) 17:47, 23 March 2024 (UTC)Reply

PHP Notice: Undefined index: OR in .../extensions/DynamicPageList3/includes/Parameters.php on line 564

edit

I've just upgraded from MW 1.38.7 to 1.39.6, with DPL3 3.5.2 and PHP 7.4.3-4ubuntu2.20 (Ubuntu 20.04) and I'm seeing the message in the subject show up occasionally in syslog, logged there by the job queue runner service for one of our wikis. Is this possibly a bug or more likely related to something specific we're doing with DPL3? Justin C Lloyd (talk) 22:53, 12 April 2024 (UTC)Reply

Counters not shown any more

edit

Using MW.1.39 with the latest versions of DynamicPageList3 and HitCounters extensions. Initially the counters were shown, then suddenly no more, but just ⧼hitcounters-nviews⧽ The table hit_counter exists and it has over 2000 counters/rows, running update.php doesn't solve the issue. Do you have any advice?

wfLoadExtension( 'HitCounters' );

$wgGroupPermissions['sysop']['hitcounter-exempt'] = true;

wfLoadExtension( 'DynamicPageList3' );

$wgDplSettings['maxCategoryCount'] = 6;

$wgDplSettings['maxResultCount'] = 200;

$wgDplSettings['queryCacheTime'] = 300;


{{#dpl:

 |category=Artikel
 |rowcolformat=width=100%
 |ordermethod=count
 |mode=ordered
 |ordermethod=counter
 |order=descending
 |addpagecounter=true
 |count=20

}} S0ring (talk) 17:18, 6 May 2024 (UTC)Reply

The issue has been fixed after added the line to HitCounters/i18n/en.json

       "hitcounters-nviews": "$1 views",

respectively to HitCounters/i18n/de.json

       "hitcounters-nviews": "$1 Artikel",

S0ring (talk) 18:19, 7 May 2024 (UTC)Reply

Mediawiki 1.41.1 - Accessing $wgHooks directly is depreciated

edit

I am getting errors after updating MW to 1.41.1.

<error>

PHP Deprecated: Accessing $wgHooks directly is deprecated, use HookContainer::isRegistered() instead. [Called from MediaWiki\Extension\DynamicPageList3\Parse::triggerEndResets in C:\inetpub\wwwroot\MW_V1411\extensions\DynamicPageList3\includes\Parse.php at line 962] in C:\inetpub\wwwroot\MW_V1411\includes\debug\MWDebug.php on line 386 PHP Deprecated: Accessing $wgHooks directly is deprecated, use HookContainer::getHandlers() or HookContainer::register() instead. [Called from MediaWiki\Extension\DynamicPageList3\Parse::triggerEndResets in C:\inetpub\wwwroot\MW_V1411\extensions\DynamicPageList3\includes\Parse.php at line 962] in C:\inetpub\wwwroot\MW_V1411\includes\debug\MWDebug.php on line 386 PHP Deprecated: ParserOutput::mCategories public read access deprecated [Called from MediaWiki\Extension\DynamicPageList3\Hooks::endReset in C:\inetpub\wwwroot\MW_V1411\extensions\DynamicPageList3\includes\Hooks.php at line 559] in C:\inetpub\wwwroot\MW_V1411\includes\debug\MWDebug.php on line 386

</error>

Is DynamicPageList3 not compatible with Mediawiki 1.41.1?

Any help is appreciated. 64.4.67.126 13:59, 9 May 2024 (UTC)Reply

Mediawiki 1.41.1 - Use of ParserOutput::getCategories was deprecated

edit

I tried the latest master branch on Github and now I see this error: <error> PHP Deprecated: Use of ParserOutput::getCategories was deprecated in MediaWiki 1.40. [Called from MediaWiki\Extension\DynamicPageList3\Hooks::endReset in C:\inetpub\wwwroot\MW_V1411\extensions\DynamicPageList3\includes\Hooks.php at line 559] in C:\inetpub\wwwroot\MW_V1411\includes\debug\MWDebug.php on line 386 </error>

Return to "DynamicPageList3" page.