Issue:Returns 0 results even when resultsheader is used

From FollowTheScore
Revision as of 21:17, 27 October 2007 by Frank (talk | contribs) (New page: {{Issue |Type = Bug |Extension = DPL |Version = 1.4.7 |Description = Returns 0 results even when noresultsheader is used |Status = open }} == Problem == The followi...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Description: Returns 0 results even when noresultsheader is used
Extension / Version: DPL   /   1.4.7
Type / Status: Bug   /   open

Problem

The following is in Template:Person

{{#dpl: linksto={{FULLPAGENAME}} | uses=Template:Person | includepage={Person}.dpl | includematch=/.mother={{FULLPAGENAME}}¦.father={{FULLPAGENAME}}/ | mode=inline | inlinetext= • | resultsheader=''{{FULLPAGENAME}}'' has %PAGES% children listed here:  |oneresultheader=''{{FULLPAGENAME}}'' has %PAGES% child listed here:  | noresultsheader=''{{FULLPAGENAME}}'' has no offspring listed here.| resultsfooter=}}

and it works as expected unless (I'm guessing) another page refers to the page that this template instance is used in. Then instead of

has no offspring listed here.

it returns

has 0 children listed here:

The other page might be one that (say) lists all the pages that Template:Person is used in. When you first create a page using this template, it works exactly as expected however often you preview it. However, once you have saved the page, within a short period of time it goes to the other behavior. If no other page refers to this one, it works as it should. I'm not sure I can come up with a simple example of how to reproduce this, but it is rather consistent.

This page shows the problem, this page does not. The only difference of which I am aware is that no other page links to the latter. They both use Template:Person so it isn't directly related to self-inclusion. If you look at the site you'll see that it would have been impossible without DPL and the cool xxx.dpl templates! BTW there are other self referential templates that also search using similar keys and have the same problem, as you can see from the examples.

Thanks --Frank 15:16, 27 October 2007 (EDT)

Reply