Index: openacs-4/packages/xowiki/tcl/includelet-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/includelet-procs.tcl,v diff -u -r1.239.2.88 -r1.239.2.89 --- openacs-4/packages/xowiki/tcl/includelet-procs.tcl 9 Apr 2022 14:57:04 -0000 1.239.2.88 +++ openacs-4/packages/xowiki/tcl/includelet-procs.tcl 12 Apr 2022 08:44:19 -0000 1.239.2.89 @@ -2368,6 +2368,16 @@ $extra_where_clause $locale_clause"] set pages [::xowiki::Page instantiate_objects -sql $sql] + # + # Set the mixin for page-order before the call of __value_compare. + # Probably, we should use here a different approach to support as well + # sorting by different attributes. + # + $pages orderby \ + -order [expr {$order_direction in {asc ""} ? "increasing" : "decreasing"}] \ + -type [ad_decode $order_attribute page_order index dictionary] \ + $order_attribute + if {$range ne "" && $page_order_att ne ""} { lassign [split $range -] from to foreach p [$pages children] { @@ -2378,11 +2388,6 @@ } } - $pages orderby \ - -order [expr {$order_direction in {asc ""} ? "increasing" : "decreasing"}] \ - -type [ad_decode $order_attribute page_order index dictionary] \ - $order_attribute - if {$source ne ""} { # add the page_order to the objects foreach p [$pages children] {