ZPatterns: commitSubtransaction() gives AttributeError on commit_sub
I have the following form action pythonscript: req = context.REQUEST context.propertysheets.info.manage_changeProperties(longdesc=req.form['longdesc']) context.commitSubtransaction() req.RESPONSE.redirect(req['URL1']+'/edit_longdescForm') context is a DataSkin instance. When I submit the form, I get an Attribute Error on commit_sub (traceback below in case it helps anyone). As far as I can see from the ZPattern's source, I'm making the call correctly and it is an appropriate call. Any clues? This is Zope 2.3.1b1 and Steve's convenience release of ZPatterns. --RDM Traceback: File /usr/local/zope/Zope231b1/lib/python/ZPublisher/Publish.py, line 222, in publish_module File /usr/local/zope/Zope231b1/lib/python/ZPublisher/Publish.py, line 187, in publish File /usr/local/zope/Zope231b1/lib/python/Zope/__init__.py, line 221, in zpublisher_exception_hook (Object: tales) File /usr/local/zope/Zope231b1/lib/python/ZPublisher/Publish.py, line 175, in publish File /usr/local/zope/Zope231b1/lib/python/Zope/__init__.py, line 235, in commit File /usr/local/zope/Zope231b1/lib/python/ZODB/Transaction.py, line 276, in commit AttributeError: (see above)
req = context.REQUEST context.propertysheets.info.manage_changeProperties(longdesc=req.f orm['longdesc']) context.commitSubtransaction() req.RESPONSE.redirect(req['URL1']+'/edit_longdescForm')
context is a DataSkin instance. When I submit the form, I get an Attribute Error on commit_sub (traceback below in case it helps anyone). As far as I can see from the ZPattern's source, I'm making the call correctly and it is an appropriate call. Any clues?
This is Zope 2.3.1b1 and Steve's convenience release of ZPatterns.
--RDM
Traceback:
AttributeError: (see above)
I believe we've tracked this down and fixed it properly - the fix will be in 2.3.1 b2, but I've a attached a copy of the updated Transaction.py that you can drop into lib/python/ZODB, then restart. It would be great if you get a chance to confirm the fix and let me know how it goes... Note I've cc'ed a few other folks who have run into this specific problem - if any of you can spare a few moments to verify the fix and let me know if you still see any problems, I'd really appreciate it. Thanks! Brian Lloyd brian@digicool.com Software Engineer 540.371.6909 Digital Creations http://www.digicool.com
On Mon, 26 Feb 2001, Brian Lloyd wrote:
I believe we've tracked this down and fixed it properly - the fix will be in 2.3.1 b2, but I've a attached a copy of the updated Transaction.py that you can drop into lib/python/ZODB, then restart. It would be great if you get a chance to confirm the fix and let me know how it goes...
Bingo. Squashed like an ant under a bootheel. Thanks very much guys, this was about to hold my project up major and I hadn't made any progress on debugging it. --RDM
Dear Brian,
req = context.REQUEST context.propertysheets.info.manage_changeProperties(longdesc=req.f orm['longdesc']) context.commitSubtransaction() req.RESPONSE.redirect(req['URL1']+'/edit_longdescForm')
context is a DataSkin instance. When I submit the form, I get an Attribute Error on commit_sub (traceback below in case it helps anyone). As far as I can see from the ZPattern's source, I'm making the call correctly and it is an appropriate call. Any clues?
This is Zope 2.3.1b1 and Steve's convenience release of ZPatterns.
--RDM
Traceback:
AttributeError: (see above)
I believe we've tracked this down and fixed it properly - the fix will be in 2.3.1 b2, but I've a attached a copy of the updated Transaction.py that you can drop into lib/python/ZODB, then restart. It would be great if you get a chance to confirm the fix and let me know how it goes...
Note I've cc'ed a few other folks who have run into this specific problem - if any of you can spare a few moments to verify the fix and let me know if you still see any problems, I'd really appreciate it.
That sorted everything for me. Thanks very much. Just for info, I'm still using Zope 2.2.5 and just dropping the updated Transaction.py into that worked fine. Thanks again. Cheers, Ian
participants (3)
-
Brian Lloyd -
Ian Sealy -
R. David Murray