Issue:DPL ordermethod multiple params

From FollowTheScore
Jump to: navigation, search
Description: ordermethod multiple params confuses order; also a headingmode issue
Extension / Version: DPL   /   2.i18n
Type / Status: Bug   /   open

Problem

I want a terse "Recent Changes" list: the last edited 15 pages of any kind. I'd prefer not to have the date next to each page; rather, one date heading for each group of pages last edited on the same date.

My reading of the manual suggests that the following code should do that:

 
<DPL>
	notcategory=foobar
	count=15
	ordermethod = lastedit,title
	order       = descending
	headingmode = H4
	addeditdate = true
	userdateformat=Y M d:
	mode=ordered
</DPL>

No page is in Category:Foobar so this should select all pages. I don't really require a second level of sort but headingmode is advertised as requiring one, so I specify title. Here is what I get:

http://www.beyondeuclid.com/wiki/Shop%3ADPL_ordermethod_multiple_params

No H4 headers are produced and it seems that order = descending is ignored -- indeed, reversed. Output pages are the oldest, not the newest.

If I remove title, so ordermethod = lastedit only, then order = descending is respected but a warning is reported, since headingmode demands the second level of sort. If I remove headingmode, then everyhing works as expected but of course, I still don't get the desired date headers.

My wiki version is 1.12.0. I have not created the "special view" in MySQL; no error has been raised about this.

Other than this issue, DPL appears to work very well.

Please feel free to create an account on my wiki and experiment.

Reply

Thanks for that clear and precise report. If you use "debug=4" you will see the SQL statement which is generated by DPL. Th eproblem is that ASC or DESC are only appendend to the last sort criterion and not to all of them. This is clearly a bug. Maybe I could fix it some day, but if you are abel top do it this would be very welcome.

Regarding headingmode I would have to do further investigations. Unfortunately at the moment time is very scarce ...

Gero 09:20, 1 September 2008 (UTC)

Sorry, I know next to nothing about MySQL I wish I could help. DPL is potentially very useful and I'd love to be able to contribute. All I've been able to do, though, is to correct, cautiously, a few typos in your manual.
Thanks for the prompt reply. I've moved the demonstration of the bug to a semi-permanent page and you're welcome to come by at any time to experiment with it or other applications of DPL on my wiki. I'm sure you're time is short -- as is all of ours -- and I don't expect immediate results. I'll be very interested to see what you do with this, though. Xiong 23:01, 1 September 2008 (UTC)