Re: [Zope-CMF] Weird UnicodeDecodeError with zope.formlib

2012-12-02 Thread Charlie Clark
Am 30.11.2012, 18:21 Uhr, schrieb Charlie Clark  
charlie.cl...@clark-consulting.eu:


Let me explain: in pdb I have access to request.form which is where I  
can see the difference. With Sentry I can only see the raw body of the  
request. I may simply have not understood well enough how to use it to  
inspect what's happening.

 I raise an exception in both cases in the forms' validate method.
 Do you see this until you extract it first from the request object?
  You are not having one form saying fieldname:string and the other just
fieldname?
 No, they are all zope.formlib/zope.schema fields so there is no  
additional marshalling.


I have finally tracked down the problem: I seem to have been bitten by a  
change in zope.formlib 4.1.


There are two solutions: either extend a form's update method with the  
something like the following:


   def update(self):
from Products.Five.browser.decode import processInputs
from ZPublisher import HTTPRequest
# XXX: if we don't set default_encoding explicitly, main_template  
might

#  set a different charset
self.request.RESPONSE.setHeader('Content-Type',
'text/html; charset=%s' % HTTPRequest.default_encoding)
# BBB: for Zope  2.14
if not getattr(self.request, 'postProcessInputs', False):
processInputs(self.request, [HTTPRequest.default_encoding])
super(_EditFormMixin, self).update()

Or, more simply, base forms on those provided by five.formlib.formbase

Thanks to yuppie for fixing this in the CMF.

I can confirm that this also works with Internet Explorer.

Charlie
--
Charlie Clark
Managing Director
Clark Consulting  Research
German Office
Kronenstr. 27a
Düsseldorf
D- 40217
Tel: +49-211-600-3657
Mobile: +49-178-782-6226
___
Zope-CMF maillist  -  Zope-CMF@zope.org
https://mail.zope.org/mailman/listinfo/zope-cmf

See https://bugs.launchpad.net/zope-cmf/ for bug reports and feature requests


[Zope-CMF] cmf-tests - OK: 8

2012-12-02 Thread CMF tests summarizer
This is the summary for test reports received on the 
cmf-tests list between 2012-12-01 00:00:00 UTC and 2012-12-02 00:00:00 UTC:

See the footnotes for test reports of unsuccessful builds.

An up-to date view of the builders is also available in our 
buildbot documentation: 
http://docs.zope.org/zopetoolkit/process/buildbots.html#the-nightly-builds

Reports received


   CMF-2.2 Zope-2.12 Python-2.6.8 : Linux
   CMF-2.2 Zope-2.13 Python-2.6.8 : Linux
   CMF-2.3 Zope-2.13 Python-2.6.8 : Linux
   CMF-2.3 Zope-trunk Python-2.6.8 : Linux
   CMF-trunk Zope-2.13 Python-2.6.8 : Linux
   CMF-trunk Zope-2.13 Python-2.7.3 : Linux
   CMF-trunk Zope-trunk Python-2.6.8 : Linux
   CMF-trunk Zope-trunk Python-2.7.3 : Linux

Non-OK results
--

___
Zope-CMF maillist  -  Zope-CMF@zope.org
https://mail.zope.org/mailman/listinfo/zope-cmf

See https://bugs.launchpad.net/zope-cmf/ for bug reports and feature requests