[symfony-users] Re: Form + oneToMany + EntityType; cascade not working

2011-06-06 Thread Ruben de Vries
*bump* I'm still stuck here :-( On 4 jun, 11:21, Ruben de Vries rubensay...@gmail.com wrote: cascade persist works like a charm (check out my ' this does work' example) when called stand alone, but it just doesn't work when going through the form. because it seems the form API doesn't use the

[symfony-users] Re: How to load Security Users from the Database (the entity Provider)

2011-06-06 Thread FractalizeR
What exactly is your problem? how to logon with user infomation in MySQL DB Can you please elaborate? -- 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] (sf1.4) format_date sometimes shows the date in English

2011-06-06 Thread Manu
I have a blog written in French, and I display the dates using format_date : ?php use_helper('Date');? ?php echo format_date(strtotime($content-getCreatedAt()), 'D') ? This works well, but sometimes the dates are back to English ! What could cause that ? It comes back to French after a while.

[symfony-users] Re: (sf1.4) format_date sometimes shows the date in English

2011-06-06 Thread Manu
I have default_culture: fr_FR in settings.yml -- 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] [sf2] Handling preferred language on first connexion

2011-06-06 Thread Michel
Hello, With symfony2, I'm looking for the best way to automatically set the locale of a user on his first connexion, based on what is advertised by his browser. What I've done so far is to implement an EventListener that provides the onCoreRequest method: public function onCoreRequest(

[symfony-users] Re: Handling AccessDeniedException

2011-06-06 Thread winzou
Hi, I'm still stuck on this. Any idea? 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] [Symfony2] What is the simplest way to globally add a {_locale} prefix to every route ?

2011-06-06 Thread keymaster
There are a number of posts on this topic, and an issue was opened which was fixed by fabien in a recent update. Issues: https://github.com/symfony/symfony/issues/1187 Update: https://github.com/symfony/symfony/commit/c72537da6b906d9d7599a0ce00aead597804d0c7 It sounds like we need to import

[symfony-users] Re: [Symfony2] What is the simplest way to globally add a {_locale} prefix to every route ?

2011-06-06 Thread keymaster
... ideally something like: all_routes: resource: @* prefix: /{_locale} requirements: _locale: it|en defaults: _locale: en -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message

Re: [symfony-users] Re: Handling AccessDeniedException

2011-06-06 Thread Paul Dugas
Tried setting _format to json in your route? I believe that will trigger the framework to render the exception using the json.twig template in vendor/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Exception though I may be off-base on that. On Mon, 2011-06-06 at 02:52 -0700, winzou

[symfony-users] Configure Assetic Filters

2011-06-06 Thread Paul Dugas
Where is the correct place to call methods on the Assetic filters in an SF2 app? I'm specifically looking to call setSkipMissing() on the CssEmbedFilter. I can get the filter from the service container and call the method but I'm not sure where to put that code. Paul signature.asc

[symfony-users] sf2, form with id as field

2011-06-06 Thread Michael Holm
Hi, I would like to make a form where i have a single row, a select box with ids of my entity Location, where the user can select a single entry.. The reason for this is that i want to select a id as the general location id for my website, and then i save the id as the default location id. I

[symfony-users] Re: Automatic selection which layout to use on AJAX calls?

2011-06-06 Thread FractalizeR
Well, I've found it. {% if app.request.isXmlHttpRequest %}} This is Ajax request {% else %} No, this is not an ajax request {% endif %} So you can use {% extends app.request.isXmlHttpRequest ? layout-ajax.html.twig : layout.html.twig %} -- If you want to report a vulnerability issue on

[symfony-users] Question about security in sf2

2011-06-06 Thread Javier Garcia
Hi, in the section of security of the sf2's manual there is this configuration: security: firewalls: secured_area: pattern:^/ anonymous: ~ http_basic: realm: Secured Demo Area access_control: - { path: ^/admin,

[symfony-users] Re: Is there demand for a Symfony2 Eclipse Plugin?

2011-06-06 Thread Carl
Very cool indeed! :D I currently use Netbeans for development (mainly for the Twig plugin and better UI) but a Symfony2 plugin for Eclipse may get me to switch back to using that. I'm watching this as well. Thank you! -- If you want to report a vulnerability issue on symfony, please send it

Re: [symfony-users] Question about security in sf2

2011-06-06 Thread Christophe COEVOET
Le 06/06/2011 16:57, Javier Garcia a écrit : Hi, in the section of security of the sf2's manual there is this configuration: security: firewalls: secured_area: pattern:^/ anonymous: ~ http_basic: realm: Secured Demo Area

[symfony-users] Re: Question about security in sf2

2011-06-06 Thread Javier Garcia
On Jun 6, 5:10 pm, Christophe COEVOET s...@notk.org wrote: This is defined in the access_control section which requires having the ROLe_ADMIN role to access all url starting by /admin (and the provider section tells you that the admin user has this role). Thanks C, But the access_control

Re: [symfony-users] Re: Question about security in sf2

2011-06-06 Thread Christophe COEVOET
Le 06/06/2011 17:31, Javier Garcia a écrit : On Jun 6, 5:10 pm, Christophe COEVOETs...@notk.org wrote: This is defined in the access_control section which requires having the ROLe_ADMIN role to access all url starting by /admin (and the provider section tells you that the admin user has this

[symfony-users] Re: Question about security in sf2

2011-06-06 Thread Javier Garcia
Thanks for your effort C :), I want to ask you something more: If authentication is defined in the section firewalls, why do you say the line /- { path: ^/admin, roles: ROLE_ADMIN }/ becomes this sentence: Any URL matching /admin/* is secured, and only the admin user can access it. ??? Javi On

[symfony-users] [symfony2] Problem with File type in form

2011-06-06 Thread Moises Gallego
Hi, I'm trying to make a form to add Info to an User with an avatar I'm created a file field and works correctly, I'm create the form at this way. $form = $this-get('form.factory') -createBuilder('form', $userInfo) -add('name', 'text') -add('last_name', 'text')

Re: [symfony-users] Re: Question about security in sf2

2011-06-06 Thread Christophe COEVOET
Le 06/06/2011 17:55, Javier Garcia a écrit : Thanks for your effort C :), I want to ask you something more: If authentication is defined in the section firewalls, why do you say the line /- { path: ^/admin, roles: ROLE_ADMIN }/ becomes this sentence: Any URL matching /admin/* is secured, and

[symfony-users] Re: Question about security in sf2

2011-06-06 Thread Javier Garcia
On Jun 6, 6:10 pm, Christophe COEVOET s...@notk.org wrote: the firewall section defines the authentication, not the authorization. Yes I know that. My question is: If authentication is defined in the section firewalls (as the manual says), why do you say the line /- { path: ^/admin, roles:

Re: [symfony-users] Re: Question about security in sf2

2011-06-06 Thread Christophe COEVOET
Le 06/06/2011 18:17, Javier Garcia a écrit : On Jun 6, 6:10 pm, Christophe COEVOETs...@notk.org wrote: the firewall section defines the authentication, not the authorization. Yes I know that. My question is: If authentication is defined in the section firewalls (as the manual says), why do

[symfony-users] Re: Symfony1 + Doctrine2?

2011-06-06 Thread rooster (Russ)
On Jun 6, 8:54 pm, PaulK paulka...@gmail.com wrote: Hi all, I was wondering if anyone has experience with using Doctrine2 in combination with Symfony1. The company I work for has build an SF1D1-based back end application, which I took part in. We have, in the meantime, started on a front

[symfony-users] Re: FOS FacebookBundle

2011-06-06 Thread Diego Henrique Oliveira
Reuven, I have the same issue. I did not make the FacebookBundle work with a custom provider. But without a custom provider, everything works fine. :( -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message

[symfony-users] Re : Re: FOS FacebookBundle

2011-06-06 Thread symfonyMan
hello, did you followed the doc of the Bundle ? It works with a custom provider.. can you show me your security and custom providers configuration -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message

Re: [symfony-users] Re : Re: FOS FacebookBundle

2011-06-06 Thread Diego Henrique Oliveira
of course that you can take a look into my configuration files: security.yml: https://gist.github.com/930223 services.yml: https://gist.github.com/998147 FacebookProvider.php: https://gist.github.com/998146 This configuration works fine if I remove the custom provider. thanks. Diego On

[symfony-users] [sf2] Error with the NativeSessionStorage

2011-06-06 Thread Diego Henrique Oliveira
Guys, anyone here is having this error after upgrade to beta 4? Exception Class: Symfony\Component\Security\Core\Exception\AuthenticationException Error Message: Unknown error Trace: #0

Re: [symfony-users] Symfony 2.0 or Symfony 1.4

2011-06-06 Thread oscar balladares
Hi again. The S1.4 Project I developed was for a client. That means that the project would be updated only at the client's request. It was finished about 1 month before to know about S2. But I won't never look back from now on. S2 feels like S1.4^10. There are major improvements: routing (it

Re: [symfony-users] Re: How to load Security Users from the Database (the entity Provider)

2011-06-06 Thread oscar balladares
Hi. I faced the same problem. Official docs has no practical examples. I suggest you to read this article. http://www.dobervich.com/2011/03/21/symfony2-blog-application-tutorial-part-v-intro-to-security/ It may be outdated (when I read it first time, it was implementing Symfony2 PR8). But you

[symfony-users] [S2-Doctrine2] Get custom set of associated objects in lazy loading, not all related object (how to implement a filter ).

2011-06-06 Thread oscar balladares
Hi everybody, hope you are doing well. The title might be confusing. This is the quickest explanation: objectA is related to objectB in a 1 to Many relation/association. With lazy load you can (in a template): {% for objectB in objectA.objectBCollection %} But objectA.objectBCollection (a

[symfony-users] Re: [S2-Doctrine2] Get custom set of associated objects in lazy loading, not all related object (how to implement a filter ).

2011-06-06 Thread winzou
You have to create a method in your objectA entity, like findPublicObjectB(), which returns only the objectB you want. And then from the template : for objectB in objectA.findPublicObjectB. -- If you want to report a vulnerability issue on symfony, please send it to security at

[symfony-users] [sf2] How to access the logger from inside a model?

2011-06-06 Thread bzarzuela
Sorry for the newbie question. I tried searching this group but ended up with nothing helpful. I'm looking forward to using the fingers crossed logging feature of monolog and I'm wondering what the proper way of getting the logger from inside a model is. Thank you. -- If you want to report a

Re: [symfony-users] Re: [S2-Doctrine2] Get custom set of associated objects in lazy loading, not all related object (how to implement a filter ).

2011-06-06 Thread oscar balladares
Hi Winzou. The problem I find with this approach is that all related objectB will be retrieved from database. I would want to optimize performance loading only necessary objects. Best practices doesn't allow the entity manager to be accessed from entities, but that would be very helpful!.

Re: [symfony-users] problem with console commands list

2011-06-06 Thread oscar balladares
Have you tried changing file and folder permissions? chmod -R 777 path/to/your/project Have you cleared the cache? rm -rf path/to/your/project/app/cache/* 2011/6/4 Mahmoud M. Abdel-Fattah engm...@gmail.com I've just started symfony2 development on virtual machine and shared folder. the

Re: [symfony-users] Re: [S2-Doctrine2] Get custom set of associated objects in lazy loading, not all related object (how to implement a filter ).

2011-06-06 Thread winzou
Sorry I meant from the entity repository of course ! Like $listObjectsB = $ObjectARepository-findPublicObjectB($objectA) And in the findPublicObjectB() method, you make a DQL or whatever request to retrieve only the objectsB you want. -- If you want to report a vulnerability issue on symfony,

Re: [symfony-users] Re: [S2-Doctrine2] Get custom set of associated objects in lazy loading, not all related object (how to implement a filter ).

2011-06-06 Thread oscar balladares
Sorry if I'm being buggy :D and thank you very much for helping, but I this approach won't solve my problem either. The thing is that I load a collection of ObjectA, and I'm accessing every objectA in a template, and also accessing objectB collection from every objectA like: {% for objectA in