Issue:Ordermethod=lastedit / addeditdate=false - broken in 1.7.9 - 1.8.1

From FollowTheScore
Jump to: navigation, search
Description: Ordermethod=lastedit / addeditdate=false - broken in 1.7.9 and 1.8.01
Extension / Version: DPL   /   1.8.1 (and 1.7.9)
Type / Status: Bug   /   closed

Problem

The following DPL code don't work well - table's row NO sorted by lastedit (? may be by pagetouched):

<DPL>
category=ProductInfo
namespace={{NAMESPACE}}
include={VersionInfo}:version:release_date:known_bugs
table= class=simple,style="font-weight:normal"| module, style="font-weight:normal"|vers,style="font-weight:normal"|date,style="font-weight:normal"|bugs
tablerow    = align=left|%%,style="font-size:85%"| ''%%'' ,align=center|%%
mode=ordered
ordermethod=lastedit
order=descending
count =20
</DPL>
  • On 1.7.8, this code worked fine.
  • On 1.7.9 - wrong sorting

Thanks very much.

Reply

Indeed it sorts by page_touched now. This is the result of an effort to optimize (saves a SQL join operation). I thought page_touched was the same as the latest edit date? Is there a difference? Gero 13:05, 11 June 2009 (UTC)

Gvk328 06:40, 15 June 2009 (UTC)

But "last EDIT date" not equal "last VIEW" (touched)! I use this DPL query for show recent changes (as news), but for articles in specified category only.

Reply

Regarding 'page_touched' the official documentation says:

This timestamp is updated whenever the page changes in a way requiring it to be re-rendered, invalidating caches. Aside from editing this includes permission changes, creation or deletion of linked pages, and alteration of contained templates.

So it is NOT "last view" but "last change to the page or to dependant pages".

The problem is that Extension:Intersection uses ordermethod=lastedit with exactly this semantics (it relies on page.page_touched).

Maybe I could add ordermethod=lastupdate which could take the last entry from the edit history as a point of reference. Would that make a difference for you?

Gero 11:31, 15 June 2009 (UTC)

Gvk328 08:12, 30 June 2009 (UTC)

Yes, addition of a new option "ordermethod=lastupdate" will solve my problem. I really be mistaken: the sort order demanded for me became incorrect not at view, but at editing of the template of page

Changed back

DPL 1.8.5 has changed back to the old logic. So, using 'lastedit' should solve your problem. Gero 14:50, 1 July 2009 (UTC)

OK. The version 1.8.6 work well.

Thanks! Gvk328 06:53, 3 July 2009 (UTC)