| Error: sfValidatorI18nChoiceLanguage does not support the following options: 'culture'. [message #91907] |
Wed, 20 January 2010 20:27  |
Strateg Messages: 1 Registered: January 2010 |
Junior Member |
|
|
Hello help mу please, and excuse for my terrible English.
There was such a very unpleasant problemm; decided to learn symfony, began with a project jobeet and everything seemed to be good ..... but then came to the localization and got here this error:
500 | Internal Server Error | InvalidArgumentException
sfValidatorI18nChoiceLanguage does not support the following options: 'culture'.
stack trace
• at ()
in SF_ROOT_DIR\lib\vendor\symfony\lib\validator\sfValidatorBase .class.php line 67 ...
64. // check option names
65. if ($diff = array_diff($optionKeys, array_merge($currentOptionKeys, $this->requiredOptions)))
66. {
67. throw new InvalidArgumentException(sprintf('%s does not support the following options: \'%s\'.', get_class($this), implode('\', \'', $diff)));
68. }
69.
70. // check error code names
not quote the rest, there are too many things written yet ....
To some, let us say version dismiss: to all the lessons that worked ... may not immediately but worked on the project doing the English version, so that's 19 a lesson, before the heading "Language Switching" everything worked, then made a written
$ Php symfony plugin: install sfFormExtraPlugin
command line returned success
put <? php include_component ( 'language', 'language')?>
checked - says there is no language ........ Well, not the essence, added a module filled components.class.php and opa this error crept ..... It seems the problem is in it as well, not working and not working and completed the lesson until the end ...... and still more of this error is not gone.
Removed <? Php include_component ( 'language', 'language')?> - Again, everything works.
I do not know what to do now, as a variant of what in the dock the pen in the lesson is written that it was intended that a version 1.3 or 1.4 and I have a 1.4.1 or as another option for what version sfFormExtraPlugin refreshed and more suited to symfony 1.4.1 but it is All versions are not professional, I hope the professionals who have gathered here all the same will help to understand what really happened
Thanks in advance
|
|
|
|
|
| Re: Error: sfValidatorI18nChoiceLanguage does not support the following options: 'culture'. [message #94519 is a reply to message #91907 ] |
Mon, 01 March 2010 21:55   |
bugeo Messages: 2 Registered: February 2010 Location: Italy - Mantova |
Junior Member |
|
|
Hi
also i a get the same error:
sfValidatorI18nChoiceLanguage does not support the following options: 'culture'.
i find that the error is in the sfFormLanguage.class.php
at the row 102 and 106
From the api documentation i read that the sfValudatorI18n...
accept one option only: "language"
http://www.symfony-project.org/api/1_4/sfValidatorI18nChoice Language#method_configure
So remove the culture parameter
public function configure()
{
$this->setValidators(array(
'language' => new sfValidatorI18nChoiceLanguage(array('languages' => $this->options['languages'])),
));
$this->setWidgets(array(
'language' => new sfWidgetFormI18nChoiceLanguage(array('culture' => $this->user->getCulture(), 'languages' => $this->options['languages'])),
));
}
[Updated on: Mon, 01 March 2010 21:59]
|
|
|
| Re: Error: sfValidatorI18nChoiceLanguage does not support the following options: 'culture'. [message #99911 is a reply to message #94519 ] |
Thu, 27 May 2010 09:23  |
sela Messages: 24 Registered: November 2009 Location: London |
Junior Member |
|
|
|
i encountered the same problem and wonder why the plugin developer doesn't fix it?
|
|
|