[ZCM] [ZC] 1517/ 8 Comment "2.8 failure: History tab for ZPT does
not work"
Collector: Zope Bugs, Features,
and Patches ...
zope-coders-admin at zope.org
Fri Oct 1 01:24:34 EDT 2004
Issue #1517 Update (Comment) "2.8 failure: History tab for ZPT does not work"
Status Resolved, Zope/bug medium
To followup, visit:
http://collector.zope.org/Zope/1517
==============================================================
= Comment - Entry #8 by ajung on Oct 1, 2004 1:24 am
Thanks!
With backward compatibility I meant that I don't know
how existing Data.fs files from pre-2.8 work with this change. But I-really-don't-know-how-it-works-but-I-am-happy-that-you-fixed-it.
________________________________________
= Resolve - Entry #7 by tim_one on Sep 30, 2004 4:55 pm
Status: Accepted => Resolved
The description and user fields should be fine now, so closing this.
________________________________________
= Assign - Entry #6 by tim_one on Sep 30, 2004 4:40 pm
Supporters added: tim_one; removed: ajung
Yup, the description and user are trash. That's a ZODB problem, so assigned to me again.
Don't know what backward compatibility might mean here -- it's just characters on a web page.
________________________________________
= Comment - Entry #5 by ajung on Sep 30, 2004 4:05 pm
Using 'tid' instead of 'serial' show the management screen again. However the output of 'description' shows only trash.
Also now idea about backward compatibility.
________________________________________
= Assign - Entry #4 by tim_one on Sep 30, 2004 3:12 pm
Supporters added: ajung; removed: tim_one
Yup, the "serial" concept went away in ZODB 3.3 -- nothing "has a serial" anymore. Changing this code to use "tid" instead *probably* matches the intent, although I'm not sure what the intent here was.
________________________________________
= Assign - Entry #3 by ajung on Sep 30, 2004 1:04 pm
Status: Pending => Accepted
Supporters added: tim_one
Tim, any ZODB bells ringing?
________________________________________
= Comment - Entry #2 by ajung on Sep 30, 2004 1:03 pm
The corresponding code is the following
def manage_change_history(self):
first=0
last=20
request=getattr(self, 'REQUEST', None)
if request is not None:
first=request.get('first_transaction', first)
last=request.get('last_transaction',last)
r=self._p_jar.db().history(self._p_oid, None, last)
if r is None:
# storage doesn't support history
return ()
r=r[first:]
for d in r:
d['time']=DateTime(d['time'])
d['key']='.'.join(map(str, unpack(">HHHH", d['serial'])))
return r
Using pdb show that the dict has no key 'serial'
/opt/python-2.3.4/lib/python2.3/pdb.py(992)set_trace()->None
-> Pdb().set_trace()
(Pdb) n
> /develop/sandboxes/Zope/Zope/lib/python/OFS/History.py(124)manage_change_history()
-> for d in r:
(Pdb) print r
[{'version': '', 'description': '\x00\x00\x00\x00\x00\x00\x00\x01\x03X.\x1bn\r\x10\xcc\x00\x00\x00\x00\x00\x00\x12o\x00\x00', 'time': 1096563565.7932119, 'tid': '\x03X.\x1bn\r\x10\xcc', 'user_name': '', 'size': 520L}]
Looks like a ZODB related issue (no idea what's going on here).
________________________________________
= Request - Entry #1 by ajung on Sep 29, 2004 11:47 am
Time 2004/09/29 17:50:58.239 GMT+2
User Name (User Id) admin (admin)
Request URL http://192.168.0.12:8080/standard_template.pt/manage_change_history_page
Exception Type KeyError
Exception Value 'serial'
Traceback (innermost last):
* Module ZPublisher.Publish, line 112, in publish
* Module ZPublisher.mapply, line 88, in mapply
* Module ZPublisher.Publish, line 39, in call_object
* Module Shared.DC.Scripts.Bindings, line 306, in __call__
* Module Shared.DC.Scripts.Bindings, line 343, in _bindAndExec
* Module App.special_dtml, line 175, in _exec
* Module OFS.History, line 124, in manage_change_history
==============================================================
More information about the Zope-Collector-Monitor
mailing list