Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
_patch.py in PloneGetPaid breaks Five formbased forms everywhere
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Matt Halstead  
View profile  
 More options Oct 22 2008, 10:18 pm
From: Matt Halstead <matt.halst...@gmail.com>
Date: Wed, 22 Oct 2008 19:18:02 -0700 (PDT)
Local: Wed, Oct 22 2008 10:18 pm
Subject: _patch.py in PloneGetPaid breaks Five formbased forms everywhere

see http://code.google.com/p/getpaid/source/detail?spec=svn2096&r=1315

1) I don't think the patch does what it intends to do
2) the way it is written kills unicode support for all Five formbase
based forms

in the code it says:

------------------

REQUEST INPUT PROCESSING

five destructively processes list and tuple inputs, when converting to
unicode
so we patch it to only happen once in the request.

-------------------

then the patch

-------------------------

from Products.Five.formlib.formbase import FiveFormlibMixin
from Products.Five.browser import decode

def update( self ):
    if getattr( self.request, '__inputs_processed', False ):
        decode.processInputs( self.request )
        decode.setPageEncoding( self.request )
        request.__inputs_processed = True
    super( FiveFormlibMixin, self).update()

FiveFormlibMixin.update = update

------------------------

my interpretation is that line 40 (http://code.google.com/p/getpaid/
source/browse/trunk/products/PloneGetPaid/_patch.py?
spec=svn2096&r=1315#40) should be:

if not getattr( self.request, '__inputs_processed', False ):

cheers
Matt


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kapil Thangavelu  
View profile  
 More options Oct 23 2008, 12:06 am
From: "Kapil Thangavelu" <kap...@gmail.com>
Date: Thu, 23 Oct 2008 00:06:27 -0400
Local: Thurs, Oct 23 2008 12:06 am
Subject: Re: _patch.py in PloneGetPaid breaks Five formbased forms everywhere

On Wed, Oct 22, 2008 at 10:18 PM, Matt Halstead <matt.halst...@gmail.com>wrote:

> see http://code.google.com/p/getpaid/source/detail?spec=svn2096&r=1315

> 1) I don't think the patch does what it intends to do

agreed, it certainly looks odd, and your change sounds good. the intent was
clearly that it should be executing once and only once, and that's the whole
purpose for it. the issue was on any z3 form processing a list it would,
attempt to decode a list of values twice, which occurred with multiple
formlib viewlets in the admin.  otoh, if people haven't been reporting any
issues with unicode list processing, or a decode error in particular, than
perhaps the whole patch can just be removed.

cheers,

kapil


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »