[ZCM] [ZC] 2026/ 2 Comment "DTML-IN Sorting bug"

Collector: Zope Bugs, Features, and Patches ... zope-coders-admin at zope.org
Thu Feb 9 16:15:07 EST 2006


Issue #2026 Update (Comment) "DTML-IN Sorting bug"
 Status Pending, Zope/bug critical
To followup, visit:
  http://www.zope.org/Collectors/Zope/2026

==============================================================
= Comment - Entry #2 by camil7 on Feb 9, 2006 4:15 pm

This might be a problem with the database adapter,
of maybe some Brains plugged in there
Could You add more information about your setup?
With the information You gave so far at least I have no idea
how to reproduce the issue.
________________________________________
= Request - Entry #1 by SubZane on Feb 9, 2006 8:40 am

When looping thru a dictionary or SQL Resultset using a dtml-in the sort property will fail on some keys and give the following error:
----------------------------------------------------------------------------------------
Error Type: TypeError
Error Value: r.__cmp__(x,y) requires y to be a 'r', not a 'ImplicitAcquirerWrapper'
----------------------------------------------------------------------------------------

Sorting by product_id works, price however does not work.
Dictionary: {'art_num': 'UC3H2SH', 'custom_name': '', 'price': 34859.0, 'product_id': 22537, 'instock': 1, 'Description': 'ThinkPad T43p 2668 - Pentium M 770 2.13 GHz - RAM 1 GB - HD 60 GB - DVD Multi Recorder - Mdm - LAN EN, Fast EN, Gigabit EN, Bluetooth, 802.11b, 802.11g - Centrino - Win XP Pro - 15" TFT UXGA (1600 x 1200)\r', 'custom_price': 0.0}

Example Code:
<dtml-in mydict prefix=list sort=price>
  <dtml-var price><br>
</dtml-in>
==============================================================



More information about the Zope-Collector-Monitor mailing list