Hi, okay the issue comes from the reCaptcha Validator which was not included
in the mail :-)
fields:
recaptcha_response_field:
sfReCaptchaValidator:
which will get "null" as parameters, this is where pokaYoke struggles.
Ill send a patch to svn soon. Once I figure out is a string parameter should
be treated as parameter at all. As they normally should be a key value array
Two possible fixes:
Line 139:
if(count($validator['parameters']) > 0)
if(is_array($validator['parameters']) &&
count($validator['parameters']) > 0)
or
141-142:
If (is_array($validator['parameters']){
New 150-151
} else {
$validatorConfig .= $validator['parameters'];
}
Somehow the first one looks more natural for me. A third option would be to
give the reCaptchaValidator an actual parameter
.: Fabian
-----Original Message-----
From:
[EMAIL PROTECTED]
om
[mailto:[EMAIL PROTECTED]
groups.com] On Behalf Of Fabian Lange
Sent: Sonntag, 2. Dezember 2007 14:03
To: [email protected]
Subject: [symfony-users] Re: Problem with sfPokaYokeConfigHandler
No it was just a lame excuse.
Please send me the details I asked you for in my offlist mail.
.: Fabian
-----Original Message-----
From:
[EMAIL PROTECTED]
om
[mailto:[EMAIL PROTECTED]
groups.com] On Behalf Of [EMAIL PROTECTED]
Sent: Sonntag, 2. Dezember 2007 13:46
To: symfony users
Subject: [symfony-users] Re: Problem with sfPokaYokeConfigHandler
If it is the problem in the complexity of my YML file, is there any
standard or sample format that I can follow to rewrite the YML ?
On Dec 2, 12:11 pm, "Fabian Lange" <[EMAIL PROTECTED]> wrote:
> Hi,
> I have rewritten that part of code for Alistair. It seems in general a bit
> fragile. Either in my or in Alis way of doing so :-(
> Problem is the complexity of the yml you can give.
>
> I try to solve this with mephis1987 offlist and will post a patch as soon
as
> I found out the cause of this
> .: Fabian
>
> -----Original Message-----
> From:
>
>
[EMAIL PROTECTED]
> om
>
[mailto:[EMAIL PROTECTED]
> groups.com] On Behalf Of [EMAIL PROTECTED]
> Sent: Sonntag, 2. Dezember 2007 01:59
> To: symfony users
> Subject: [symfony-users] Problem with sfPokaYokeConfigHandler
>
> Hi everyone
>
> For the ease of form validation, I used sfPokaYoke but I have a
> problem with it. In the view of the module "user" and action
> "signup" (http://localhost/frontend_dev.php/user/signup), it says :
>
> Warning: Invalid argument supplied for foreach() in /home/mephis/
> foobar/plugins/sfPokaYokePlugin/lib/sfPokaYokeConfigHandler.class.php
> on line 143
>
> Here is what I ve done
>
> 1. I installed the plugin
> 2. Modify filters.yml
>
> rendering: ~
> web_debug: ~
> security:
> class: sfGuardBasicSecurityFilter
>
> # generally, you will want to insert your own filters here
> poka_yoke:
> class: sfPokaYokeFilter
>
> cache: ~
> common: ~
> flash: ~
> execution: ~
>
> 3. Clear the cache (so many times...)
> 4. I have a validation file called "signup.yml" . I thought it is the
> main cause because when I rename (or delete) it, the plugin works
> again but I just can not validate those fields anymore.
>
> fields:
>
> username:
>
> required:
>
> msg: your username is required
>
> sfStringValidator:
>
> min: 5
>
> min_error: Username must be 5 or more characters
> sfPropelUniqueValidator:
> class: sfGuardUser
> column: username
> unique_error: An account with this nickname already exists
>
> #myNewAccountValidator:
>
> #newaccount_error: An account with this nickname already exists
>
> email:
>
> required:
>
> msg: email is required
>
> sfEmailValidator:
>
> email_error: email is invalid
>
> password:
>
> required:
>
> msg: your password is required
>
> sfStringValidator:
>
> min: 6
>
> min_error: Password must be more than 6
>
> sfCompareValidator:
>
> check: password_bis
>
> compare_error: passwords do not match
>
> password_bis:
>
> required:
>
> msg: passwords do not match
>
> Can anyone help me with this? I have tried several methods including
> reading the sfPokaYokeConfigHandler.class.php file but I still have no
> clues.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---