[symfony-users] Re: Unrecognized options "secret" under "framework.csrf_protection

2011-04-28 Thread Carlos Sánchez
change your app/config.yml file

--- before 
framework:
charset:   UTF-8
error_handler: null
csrf_protection:
enabled: true
secret: xx

--- after 

framework:
charset:   UTF-8
error_handler: null
secret: xx
csrf_protection:
enabled: true

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Unrecognized options "secret" under "framework.csrf_protection

2011-04-28 Thread Erkhembayar Gantulga
when i updated vendors.sh, my app_dev.php shows following error

// Fatal error: Uncaught exception 'Symfony\Component\Config\Definition
\Exception\InvalidConfigurationException' with message 'Unrecognized
options "secret" under "framework.csrf_protection"'

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] symfony 1.4: No User Object on Remote Clients

2011-04-28 Thread Stephen Cerniglia
I've been working on a project for a couple of weeks now and it works
great when I browse from the local machine.  However, when I use a
browser not located on the web server machine, symfony is not creating
a user object, i.e. $sf_user isn't available for my templates.  As I
said, if I run the browser locally, all works fine and I can see the
user object in  the debug information.

As this is my first symfony project, I'm sure that I'm missing some
simple configuration thing.  Unfortunately, web searches haven't
turned up anything helpful.  I'm hoping someone here has a clue as to
what could be wrong?

Thanks!

--Steve

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] A message logger for untranslated entries?

2011-04-28 Thread ton4y
Hello,
I just wanted to ask is there a logger for untranslated messages in
the Symfony Translator?
I have searched the internet for such a thing, but I couldn't find
anything useful.. I want to be able to develop my application and use
the actual sentence / phrase in english instead of tokens or
abbreviations. That way the site will be ready and working in english
without any problems. The application would however log all messages
that have been requested, but not translated (absent from the
dictionary) into a file log or a database. Afterwards I could hire a
translator who could easily translate all messages straight from the
log. Something like how Zend_Translate handles things.

Is there such support just yet, or is there a plan for such?

I would really appreciate such functionality and I could even
contribute to the idea since I already wrote such a tool.
Unfortunately for it to work you need to "inject" 2 lines of code in
Symfony\Component\Translation\Translator's trans() and transChoise()
which is impossible to maintain when you like keeping Symfony up to
date.

Thanks in advance!

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Symfony2 exception trying to initalize FOSUserBundle with ODM/MongoDB

2011-04-28 Thread Vince
same here, I am looking for the reason too. Please share if you get
the answer.

Thanks,Vince

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] attributes of form fields

2011-04-28 Thread lidaa
Hello everyone,

I am looking for the equivalent of that in Symfony2:

$ w = new sfWidgetFormInputText ();
$ w-> setAttribute ('class', 'foo');

Thank you in advance.

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Symfony2, Twig and I18N

2011-04-28 Thread Elia Contini @Phiware
Hi all,

I have a problem with Twig templates and I18N.

I created a new Symfony2 project using Symfony2project (https://
github.com/Garfield-fr/Symfony2Project) and everything worked fine
until I decided to add I18N support.

I followed the official guide (http://symfony.com/doc/2.0/book/
translation.html):
 1 - I add
   framework:
 translator: { fallback: en }
 to app/config/config.yml;

 2 - I created the translation file in
src/vendorName/bundleName/Resources/translations/
messages.en.yml

 3 - I use the {% trans 'Text' %} tag in my Twig templates, but, when
I try to open a page,
 Symfony gives me the following exception:
  Unexpected token. Twig was looking for the "with" or "from"
keyword in
  "vendorNameBundleNameBundle:Main:index.html.twig".

Any idea of what is wrong?

Cheers
Elia

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Switching roles with moderation

2011-04-28 Thread Vincent Lechemin
I found a solution, maybe it could help someone.
It is possible to do that by implementing your own event listener as a
service on the event onSecuritySwitchUser.
You also need to add the services security.context and
security.access.decision_manager as arguments to your service.

-- 
Vincent

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] [sf2] access_denied_url doesn't want to work ? (pr12)

2011-04-28 Thread spike3111
Hello,

I try to use access_denied_url, normally would call my Route, my
controller and my view, but displays only the basic error page.

#security.yml
firewalls:
main:
pattern:  .*
anonymous: true
access_denied_url: /hoho/error403

#routing.yml
hoho:
pattern:  /hoho/error403
defaults: { _controller: FrontBundle:Main:hoho }

#controller
   /**
 * @extra:Secure(roles="ROLE_ADMIN")
 * @extra:Template()
 * Enter description here ...
 */
public function indexAction()
{
return array();
}

/**
 * @extra:Template()
 * Enter description here ...
 */
public function hohoAction()
{
$mess = 'hoho!';

  return array ('mess' => $mess);

}

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] best way to implement transactional services with symfony?

2011-04-28 Thread Slavka
hey guys, my project currently offers a whole bunch of services to handle 
various buisness tasks, the services are represented using modules while 
actions represent the operations offered by the service (i.e. basic CRUD). 
now i am running into some issues where for e.g. a buisness task requires 
execution of multiple services. each service provides a REST interface but 
the real issue is if one step in the execution fails i nee to be able to 
roll back the changes made by the previous service calls.

the following is a potential way around that i have been thinking about and 
feedback/ideas/suggestions are what im after.

i could separate the service layer from the actual buisness logic layer, so 
assuming a buisness action requires services a, b and c then another service 
would be created which can then call the a,b and c within a transaction



-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users][Symfony2] Services in templates (speed test)

2011-04-28 Thread Nebula
there is a service my_service with getItems() method
there is a main layout index.html.php

somethere in main layout i want to get my_service items, what i need
to do?
call my_service_controller? // $view['actions']-
>render('myBundle:my_service_controller:action')
and then in my_service_controller:
public function actionAction()
{
$this->render('myBundle:View:my_service_template', array('items'
=> $this->get('my_service')->getItems())
}

ok, all of this takes about 370-450 ms  (i have a lot of stuff in
$items)


and now, i want to get items in the template directly from the service
i cant found any way to do this, so i have changed Symfony\Bundle
\FrameworkBundle\Templating\GlobalVariables

public function getService($serviceName)
{
if ($this->container->has($serviceName) && $service = $this-
>container->get($serviceName)) {
return $service;
}
}

and now, it takes about 150-200 ms...

so, any sollution to make it correct, without editing framework?

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


Re: [symfony-users] Re: The attribute "key" must be set for path "doctrine.dbal.connections.default.driverOptions"

2011-04-28 Thread noel guilbert
Done: http://trac.symfony-project.org/ticket/9726

Thanks

On Thu, Apr 28, 2011 at 3:03 PM, Fabien Potencier
 wrote:
> On 4/28/11 2:53 PM, Noel GUILBERT wrote:
>>
>> I'm suspecting a bug with this configuration entry. I cannot figure
>> out the problem, but with this config it's working:
>>
>> doctrine:
>>     dbal:
>>        driver:   %database_driver%
>>         host:     %database_host%
>>         dbname:   %database_name%
>>         user:     %database_user%
>>         password: %database_password%
>>         options:
>>             key:   dbname
>>             value: cool
>>
>> Note the "key" and "value" keys: the configuration builder is only
>> able to parse this configuration...
>>
>> Does someone know what's wrong here?
>
> The configuration is probably wrong. Can you create a ticket? I will have a
> look at this later.
>
> Fabien
>
>> Thanks,
>>
>> On Apr 28, 12:16 pm, noel guilbert  wrote:
>>>
>>> Hi,
>>>
>>> I'm trying to add some connections options in dbal connections, and I
>>> have this error:
>>>
>>> The attribute "key" must be set for path
>>> "doctrine.dbal.connections.default.driverOptions"
>>>
>>> Here is my configuration:
>>>
>>> # Doctrine Configuration
>>> doctrine:
>>>     dbal:
>>>         driver:   %database_driver%
>>>         host:     %database_host%
>>>         dbname:   %database_name%
>>>         user:     %database_user%
>>>         password: %database_password%
>>>         options:
>>>             foo: bar
>>>
>>> Any ideas?
>>>
>>> Thanks
>>>
>>> --
>>> Noël GUILBERThttp://www.noelguilbert.com/
>>> Twitter :http://twitter.com/noelguilbert
>>
>
> --
> If you want to report a vulnerability issue on symfony, please send it to
> security at symfony-project.com
>
> You received this message because you are subscribed to the Google
> Groups "symfony users" group.
> To post to this group, send email to symfony-users@googlegroups.com
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en
>



-- 
Noël GUILBERT
http://www.noelguilbert.com/
Twitter : http://twitter.com/noelguilbert

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


Re: [symfony-users] Re: The attribute "key" must be set for path "doctrine.dbal.connections.default.driverOptions"

2011-04-28 Thread Fabien Potencier

On 4/28/11 2:53 PM, Noel GUILBERT wrote:

I'm suspecting a bug with this configuration entry. I cannot figure
out the problem, but with this config it's working:

doctrine:
 dbal:
driver:   %database_driver%
 host: %database_host%
 dbname:   %database_name%
 user: %database_user%
 password: %database_password%
 options:
 key:   dbname
 value: cool

Note the "key" and "value" keys: the configuration builder is only
able to parse this configuration...

Does someone know what's wrong here?


The configuration is probably wrong. Can you create a ticket? I will 
have a look at this later.


Fabien


Thanks,

On Apr 28, 12:16 pm, noel guilbert  wrote:

Hi,

I'm trying to add some connections options in dbal connections, and I
have this error:

The attribute "key" must be set for path
"doctrine.dbal.connections.default.driverOptions"

Here is my configuration:

# Doctrine Configuration
doctrine:
 dbal:
 driver:   %database_driver%
 host: %database_host%
 dbname:   %database_name%
 user: %database_user%
 password: %database_password%
 options:
 foo: bar

Any ideas?

Thanks

--
Noël GUILBERThttp://www.noelguilbert.com/
Twitter :http://twitter.com/noelguilbert




--
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: The attribute "key" must be set for path "doctrine.dbal.connections.default.driverOptions"

2011-04-28 Thread Noel GUILBERT
I'm suspecting a bug with this configuration entry. I cannot figure
out the problem, but with this config it's working:

doctrine:
dbal:
   driver:   %database_driver%
host: %database_host%
dbname:   %database_name%
user: %database_user%
password: %database_password%
options:
key:   dbname
value: cool

Note the "key" and "value" keys: the configuration builder is only
able to parse this configuration...

Does someone know what's wrong here?

Thanks,

On Apr 28, 12:16 pm, noel guilbert  wrote:
> Hi,
>
> I'm trying to add some connections options in dbal connections, and I
> have this error:
>
> The attribute "key" must be set for path
> "doctrine.dbal.connections.default.driverOptions"
>
> Here is my configuration:
>
> # Doctrine Configuration
> doctrine:
>     dbal:
>         driver:   %database_driver%
>         host:     %database_host%
>         dbname:   %database_name%
>         user:     %database_user%
>         password: %database_password%
>         options:
>             foo: bar
>
> Any ideas?
>
> Thanks
>
> --
> Noël GUILBERThttp://www.noelguilbert.com/
> Twitter :http://twitter.com/noelguilbert

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] recaptcha

2011-04-28 Thread Hamza Tlili
hello
i added a field captcha in my embede form i placed the private key and
public key in my app.yml all work fine but now the field captcha has stopped
working
thanks

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: R: Functional test: how to set JSON data in a POST method?

2011-04-28 Thread Javier Garcia
Thanks Massimiliano, you're right. I found the example below here
http://www.symfony-project.org/jobeet/1_4/Doctrine/en/09:

$browser->
  get('/')->
  click('Design')->
  get('/category/programming?page=2')->
  get('/category/programming', array('page' => 2))->
  post('search', array('keywords' => 'php'));


but in the action, I'm retrieving the JSON data through $request-
>getContent(). So, if I write the JSON data as an associative
array ,as in the example I have pasted, and then run the test, the
call to $request->getContent() returns NULL, (of course, if I use
normal browser like FF, $request->getContent() returns the JSON data
correctly) ...

Any help?


On Apr 22, 3:21 pm, Massimiliano Arione  wrote:
> Il giorno giovedì 21 aprile 2011 17:48:41 UTC+2, Javier Garcia ha scritto:
>
>
>
> > I want to create a functional test for an action that receives a POST
> > method with data in JSON format.
>
> > This is what I have:
>
> >   info('set car')->
> >   post('/user/'.$user->getId().'/set-car/'.$car->getId()'->
>
> >   with('request')->ifFormat('json')->begin()->
> >     isParameter('module', 'myModule')->
> >     isParameter('action', 'myAction')->
> >   end()->
>
> > But..where should I set the receiving json data?
>
> > sf 1.4
>
> You should pass data as second argument to post()
>
> cheers
> Massimiliano

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] [SF2] The attribute "key" must be set for path "doctrine.dbal.connections.default.driverOptions"

2011-04-28 Thread noel guilbert
Hi,

I'm trying to add some connections options in dbal connections, and I
have this error:

The attribute "key" must be set for path
"doctrine.dbal.connections.default.driverOptions"

Here is my configuration:

# Doctrine Configuration
doctrine:
dbal:
driver:   %database_driver%
host: %database_host%
dbname:   %database_name%
user: %database_user%
password: %database_password%
options:
foo: bar

Any ideas?

Thanks

-- 
Noël GUILBERT
http://www.noelguilbert.com/
Twitter : http://twitter.com/noelguilbert

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Switching roles with moderation

2011-04-28 Thread Vincent Lechemin
Hi,

I resolved my problem by adding in attemptSwitchUser line 128 (after
the target user ($user) is fetched):
if (false === $this->accessDecisionManager->decide($token, $user->getRoles())) {
  throw new AccessDeniedException();
}
But i did not find any other way to add this test to the framework
without changing its code.
Because the decision managers don't get asked if the user has all the
role the target user has.
And this listener is the only one called when switching user.
Could anyone point me out how to?

Thanks,

-- 
Vincent

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] link between frontend and backend

2011-04-28 Thread Hamza Tlili
hello
I developed a project with symfony 1.4, I want to know how to make a link
between my frontend application and my backend .
thanks

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en