Issue:"eliminate" not working when including last section of a page

From FollowTheScore
Jump to: navigation, search
Description: When including the last section of a page, categories get included even when using "eliminate".
Extension / Version: DPL   /   1.8.9
Type / Status: Bug   /   open

Problem

When including the last section of a page, categories get included even when using "eliminate".

I suppose that's because "include" includes everything up to the next heading. And as there's no heading after the last section of a page all the stuff that comes at the end of the page (categories, template calls, magic words, etc.) will also get included. And due to parsing order "eliminate" won't catch that stuff. --nakohdo 09:41, 13 July 2011 (CEST)

Reply

You are probably right. DPL reads up to the end and finds all the category links. But I still wonder why "eliminate" does not throw these categorizations away afterwards. Gero 00:32, 15 July 2011 (CEST)

I suspect it's because some categories are added by template calls at the end of the page so they are kind of hidden when DPL parses the page. --nakohdo 10:52, 15 July 2011 (CEST)
EDIT: I now think the templates are the culprit. Every time DPL includes text which contains a template which adds a category those category will show up on the page with the DPL results even when the text doesn't come at the end of the page! --nakohdo 11:21, 15 July 2011 (CEST)
EDIT 2: This might be a strange edge case in my testing environment. The described behavior only seems to occur when I use the same DPL query more than once on a page. And even the order of those DPL queries affects the result. Strangely, the second DPL query seems to trigger including categories from the first DPL query on the page. Will keep an eye on it. --nakohdo 11:54, 15 July 2011 (CEST)
Indeed a rare constellation ... Maybe it helps if you add a separate DPL query after each normal DPL query. This separate query should only contain the ELIMINATE or RESET statement. Gero 13:19, 17 July 2011 (CEST)
Thanks for the hint. I will try that. It's only for testing purposes that I have more than one DPL query on a page so there probably will be no problems in the production environment. But better to be prepared ;-) --nakohdo 08:13, 18 July 2011 (CEST)