Difference between revisions of "Issue:Includematch does not filter results"
(→Reply) |
|||
Line 45: | Line 45: | ||
[[User:Gero|Gero]] 16:11, 5 August 2009 (UTC) | [[User:Gero|Gero]] 16:11, 5 August 2009 (UTC) | ||
+ | |||
+ | == Reproduction == | ||
+ | |||
+ | I added a section "Data" to the Pages [[Republic of Cameroon]] and [[Republic of Burundi]] | ||
+ | |||
+ | Without the "includematch" Parameter - the following dpl displays both sections: | ||
+ | |||
+ | <dpl> | ||
+ | titleregexp=Republic | ||
+ | include=#Data | ||
+ | resultsfooter= Result: %PAGES% pages | ||
+ | </dpl> | ||
+ | |||
+ | Adding the "includematch" Parameter - only the Section containing "Kirundi" is displayed | ||
+ | <dpl> | ||
+ | titleregexp=Republic | ||
+ | include=#Data | ||
+ | includematch=/Kirundi/si | ||
+ | resultsfooter= Result:''''' %PAGES% '''''pages | ||
+ | </dpl> | ||
+ | |||
+ | But those pages where the "includematch" does '''not match''' should not be listet. | ||
+ | |||
+ | Only on one page "Kirundi" was found -- there should be only one page listed. | ||
+ | |||
+ | I expected ..."Result: 1 pages" |
Revision as of 09:46, 6 August 2009
Description: | "includematch" can not be used like in version 1.7.4: It does not filter results. |
Extension / Version: | DPL / 1.8.6 |
Type / Status: | Bug / open |
Problem
I updated DPL from version 1.7.4 to version 1.8.6
within version 1.7.4 I used the parameter includematch very often.
E.g.:
<dpl> category=to-be-investigated include={template}:parameter includematch=/.*Value I am Looking for.*/si </dpl>
Using DPL 1.7.4 this produced a list of only those pages containing "Value I am Looking for" in the "parameter" of the "template".
Using DPL 1.8.6 this produced additionally those pages where the "includematch" did not match.
I think the behavior of 1.7.4 is the better one. Until this problem is resolved I downgraded back to version 1.7.4
BTW: I am using MediaWiki 1.13.3; PHP 5.2.8 (isapi); MySQL 5.1.30-community
Reply
Can you please reproduce the error here in this wiki? The official test example (Test includematch) looks quite o.k. to me.
Feel free to extend that example or to create a 'brother' like 'Test includematch 2'.
And you should have in mind that includematch, as the manual explains, matches the given pattern against the complete content of the template call, not only against the value of the parameter(s) you specified in the include statement.
Gero 16:11, 5 August 2009 (UTC)
Reproduction
I added a section "Data" to the Pages Republic of Cameroon and Republic of Burundi
Without the "includematch" Parameter - the following dpl displays both sections:
- Republic of Cape Verde
- Republic of Burundi
Name Republic of Burundi Official Languages Kirundi,French Goverment Republic Area 10,745 sq mi Population 7,548,000 GDP $4.517 billion Independence Days 01/07/1962 - Republic of Cameroon
Name Republic of Cameroon Official Languages French,English Goverment Republic Area 183,568 sq mi Population 17,795,000 GDP $43.196 billion Independence Days 01/10/1961 - Republic of Madagascar
- United Republic of Tanzania
Adding the "includematch" Parameter - only the Section containing "Kirundi" is displayed
- Republic of Burundi
Name Republic of Burundi Official Languages Kirundi,French Goverment Republic Area 10,745 sq mi Population 7,548,000 GDP $4.517 billion Independence Days 01/07/1962
But those pages where the "includematch" does not match should not be listet.
Only on one page "Kirundi" was found -- there should be only one page listed.
I expected ..."Result: 1 pages"