[symfony-users] Get Context User in sfMixer class

2011-05-03 Thread Imran
Hi folks, I have been working on a project which is based on symfony 1.0. Does anyone has idea about getting the context user ($this->getUser()) reference in sfMixer? This is how sfMixer is being used: sfMixer::register('BaseArticle:save:pre', array('ArticleMixer', 'preSave')); I can use the

[symfony-users] Re: PR11 to Beta1 - Tests using PDO_sqlite now fail

2011-05-03 Thread danielholmes
With the in memory db, I still have the problem of multi request tests where the db wont be present across both. Have you run in to this problem? e.g.: $crawler = $this->client->request('GET', '/contact'); // Request 1, container created $form = $crawler->filter('#user-form input.button')

Re: [symfony-users] Symfony2 on GoDaddy

2011-05-03 Thread Luis Cordova
oppps oh no sorry scratch that, I just recalled that I had problems because they did not go to php5.3 or later rather go with better hosting with php5.3 and more standard cpanel or interface symfony also has a page with hosting On Tue, May 3, 2011 at 5:04 PM, Luis Cordova wrote: > Hi > > use pr

Re: [symfony-users] Symfony2 on GoDaddy

2011-05-03 Thread Luis Cordova
Hi use proper hosting for development and flexibility I full recommend this one here http://bit.ly/9TTSvJ Regards, Luis On Tue, May 3, 2011 at 1:13 PM, Laurus wrote: > Hi fellow Symfony2 friends! > > I have webhosting on GoDaddy (I regret it) and trying to run my > Symfony2 test page on it. U

Aw: Re: [symfony-users] [sf2] [FOS] Authenticate with email or username

2011-05-03 Thread Conrad
Thanks Jeremy for this detailed explanation :) Sorry for my late answer, I just had time to focus on this issue again. First of all, I read the Security User Guideseveral times, which helped me a lot to understand how

[symfony-users] Issues with Entity Fields in SF2 Form Component

2011-05-03 Thread Roger Webb
Greetings, I've been struggling with the new form component, particularly with the "entity" choice fields. I have a "ContactInfo" Entity with some scalar fields (first_name, address, etc) and a ManyToOne relationship with "Cities". "Cities" has a ManyToOne relationship with "States" class Conta

[symfony-users] symfony website on NFS - very slow?

2011-05-03 Thread Tomasz Chmielewski
Anyone tried using a symfony website with the files stored on a NFS server? I tried, and some of my busy websites are really, really slow, server load goes to 50 or more. I tried to look at what the webserver does when serving a symfony website, and it didn't look well. For example, it tries t

[symfony-users] sfDoctrineMasterSlavePlugin

2011-05-03 Thread jphblais
Hi all, for all of you which have relations problem (i18n/Translation) using the plugin or when follow http://snippets.symfony-project.org/snippet/373 blog take particular attention in the order of your master slave connections declaration in databases.yml. master should be the 1st and slaves afte

[symfony-users] Symfony2 on GoDaddy

2011-05-03 Thread Laurus
Hi fellow Symfony2 friends! I have webhosting on GoDaddy (I regret it) and trying to run my Symfony2 test page on it. Unfortunately I am still receiving this line: No input file specified. I created new subdomain (test) with webdir (web). So all my Symfony2 files are in subdomain. I have read mul

[symfony-users] [Symfony2 Forms] CollectionType - cannot display error messages with widget

2011-05-03 Thread Mark Fullbrook
Hi, I'm having great success with the new Form framework, except for the CollectionType. My issue is that the errors are rendering for the form {{ form_errors(form) }} and not the individual rows. My Types: class SpotResponseType extends AbstractType { public function buildForm(FormBuilder

[symfony-users] Forms and Doctrines Discriminator Maps

2011-05-03 Thread Daniel Cannon
Hi, I am creating an application in SF2 and have come across an issue creating form classes for entities using discriminatory maps. Here is the code I have currently which is causing issues when the request is bound to the form. https://gist.github.com/953890 If anybody could help that would be g

[symfony-users] ::buildForm() compatibility error with FormTypeInterface::buildForm()

2011-05-03 Thread begood
I am following along the Symfony 2 book chapter on forms (using BETA1), and everything is working fine until I create the Form Class ProductType: // src/Acme/StoreBundle/Form/ProductType.php namespace Acme\StoreBundle\Form; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\FormBu

[symfony-users] Re: Manually overriding values for form submission

2011-05-03 Thread OnDistantShores
Thanks so much for your reply! The bind overriding seems like the best solution, that means the extra values are attached to the form, which an be used in multiple apps. The only problem is my manually processed value require input from the form. How do I get that from the bind() method? I could

Re: [symfony-users] Error when adding new data - really really stucked with this one...

2011-05-03 Thread JP
somebody please give a hint! -- 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@googlegro

[symfony-users] Re: PR11 to Beta1 - Tests using PDO_sqlite now fail

2011-05-03 Thread Donald
Looks like other people are experiencing this problem, and unfortunately Fabien doesn't seem to think it's a real issue... https://github.com/symfony/symfony/pull/742#issuecomment-1094468 On May 3, 10:40 am, Donald wrote: > Hi Daniel, > > Thanks for the info. Although commenting out that line do

[symfony-users] Re: PR11 to Beta1 - Tests using PDO_sqlite now fail

2011-05-03 Thread Donald
Hi Daniel, Thanks for the info. Although commenting out that line does resolve the problem, I think there's something going on a little deeper. My tests actually passed after this commit, so something has changed since then. Maybe something in the way the kernel actually carries out the shutdown

Re: [symfony-users] Re: Symfony2 ACL Performance Question

2011-05-03 Thread Johannes Schmitt
The ACL system supports batch loading ACLs (up to 30 in two queries). Kind regards, Johannes On Tue, May 3, 2011 at 3:49 PM, Gediminas Morkevicius < gediminas.morkevic...@gmail.com> wrote: > Your posts can have an author id, which can be mapped to all permissions, > same as groups this user bel

[symfony-users] Re: Login using built-in security bundle

2011-05-03 Thread Filipe La Ruina
Hi Daniel, It worked! I think I really had a problem with the pattern and the naming. I ended up with this: security.yml (copied from yours) login: pattern: ^/login$ security: false system: pattern: ^/[a-zA-Z]+ form_login:

[symfony-users] Symfony | Doctrine2 | Import | MySQL Enum

2011-05-03 Thread lidaa
Hi :) currently i'm trying to import a database schema into symfony2 using the following command: app/console doctrine:mapping:import MyBundle Now Doctrine2 is throwing the following error: [Doctrine\DBAL \DBALException] Unknown database type enum requested, Doctrine\DBAL\Pl

Re: [symfony-users] Re: Symfony2 ACL Performance Question

2011-05-03 Thread Gediminas Morkevicius
Your posts can have an author id, which can be mapped to all permissions, same as groups this user belongs and related permissions. If you would do it right, hierarchical structure of your ACL you may need only few specific access rights per user, like if user is banned from the specific topic, whe

Re: [symfony-users] [Sf2] Comparison of fields in validation

2011-05-03 Thread Greg Militello
Tim, You did. For some reason I was not receiving mail from the list. It was very odd. Thanks, -Greg On May 3, 2011, at 7:44 AM, Tim Nagel wrote: > I believe I spoke to you in the IRC channel, but the simplest method > of achieving what you want is to define a method on your domain > obje

[symfony-users] Re: Symfony2 ACL Performance Question

2011-05-03 Thread Marc MacLeod
Yes I still need to deal with this problem (I've put it off for now until the documentation is more complete). Gediminas, what if the user has thousands of posts, comments, etc? Do you think it would still make sense to retrieve and store that large ACL tree in the session? I'm still having a har

[symfony-users] SF2 Core Components Translations

2011-05-03 Thread Daniel Gomes
Hello all, I'm a newbie just start using it past 2 weeks ago. My question is, the Core Components should thrown translated messages? An example of it is in that class: symfony/src/Symfony/Component/Security/Core/Authentication/Provider/UserAuth enticationProvider.php But i found more classes th

Re: [symfony-users] [Sf2] Comparison of fields in validation

2011-05-03 Thread Tim Nagel
I believe I spoke to you in the IRC channel, but the simplest method of achieving what you want is to define a method on your domain object: /** * @assert:True(message="Some time constraint is bad") */ public function isTimeValid() { return $this->time_a < $this->time_b; } t On Tue, May 3, 20

[symfony-users] Re: Comparison of fields in validation

2011-05-03 Thread danielholmes
Hi Greg, I think the Valid constraint is for a different purpose. See: http://symfony.com/doc/2.0/reference/constraints/Valid.html. I think you're right about a Comparison validation being common. One way it could work is with a series of CLASS_CONSTRAINT constraints (GreatherThan, LessThan, Less

[symfony-users] Re: Twig template - Recursivity

2011-05-03 Thread chafik
Thank you guys, the macro is the solution. It works great ;) On Mar 24, 3:41 pm, Yohan GIARELLI wrote: > Something like this... > > {% macro foo(root) %} > >   >     {% for page in root.children %} >       ... >       ... >       {% if page.children is defined and page.children | length > 0 %} >

Re: [symfony-users] $form->getErrors() returns an empty array even $form->isValid() evaluates to false

2011-05-03 Thread Bernhard Schussek
Hi Ville, getErrors() only returns the errors of that specific Form instance, but not of any children. You can loop through the Form children and call getErrors() on them to receive their errors. Hope I helped, Bernhard -- If you want to report a vulnerability issue on symfony, please send it

Re: [symfony-users] attributes of form fields

2011-05-03 Thread Bernhard Schussek
Hi, You can pass custom attributes in the template: {{ form_widget(field, { 'attr': { 'class': 'foobar' } }) }} Cheers, Bernhard -- 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 t

Re: Re: [symfony-users] Translating form labels in custom domain don't work

2011-05-03 Thread Саша Стаменковић
In your config: twig: form: resources: ['ResellerOrderBundle:Form:fields.html.twig', 'ResellerOrderBundle:Form:labels.html.twig'] then in twig tpl override it like: {% block field_label %} {{ label | trans([], 'forms') }} {% endblock field_label %} But you can just add them in trans

Re: [symfony-users] Translating form labels in custom domain don't work

2011-05-03 Thread Michel Salib
You are welcome. Most of the time try to use the filter, it is less verbose and using an inline syntax is much meaningful. You should use trans block only for big translation messages. -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com

Aw: Re: [symfony-users] Translating form labels in custom domain don't work

2011-05-03 Thread Conrad
How do you customize the labels? Or do you use them as they are to put them into your translation files? -- 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 "symfo

[symfony-users] [Symfony2][FOS UserBundle] Custom registration "This form should not contain extra fields"

2011-05-03 Thread Conrad
Hi all, I modified my forms to have a different registration form. To achieve this, I extended the FOS\UserBundle\Form\UserFormType and overloaded the buildForm method and the UserFormHandler's class with it's process() method.. everything is working fine so far (even the registration itself), ex

Re: [symfony-users] Translating form labels in custom domain don't work

2011-05-03 Thread Саша Стаменковић
Filter! Thats great, worked like a charm. Thanks Michael! --- Regards, Saša Stamenković On Tue, May 3, 2011 at 10:07 AM, Michel Salib wrote: > I see, you are right. > > So what about doing this : > {% block field_label %} > {{ label | trans([],"forms") }} > {% endblock field_label %} > > > --

Re: [symfony-users] Translating form labels in custom domain don't work

2011-05-03 Thread Michel Salib
I see, you are right. So what about doing this : {% block field_label %} {{ label | trans([],"forms") }} {% endblock field_label %} -- 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

Re: [symfony-users] Translating form labels in custom domain don't work

2011-05-03 Thread Саша Стаменковић
Because %label% is a placeholder for varibales, and variables are not translated, but passed as they are. This should be used for : {% trans %}Hello %name%:{% endtrans %} -> Hello John And John is never translated. So, var under %% are never translated, but printed as they are. --- Regards, Saša

[symfony-users] Re: Login using built-in security bundle

2011-05-03 Thread danielholmes
Hi Filipe, Depending what version you're using, I think it might be your patterns. You might have got these from some outdated documentation. If you check out the updates doc: https://github.com/symfony/symfony/blob/master/UPDATE.md in the section PR8 to PR9 they changed the pattern matchers so y

[symfony-users] [Sf2] Comparison of fields in validation

2011-05-03 Thread Greg Militello
Hey all, I am not seeing a good way to use the annotation system in my case: I am storing 2 times (however I could easily see storing two values of ANY type), and I need to ensure that time_a is less than or equal to time_b. To be more specific, I am planning to store a time range. For reportin

[symfony-users] Re: PR11 to Beta1 - Tests using PDO_sqlite now fail

2011-05-03 Thread danielholmes
Hi Donald, I'm glad I wasn't the only one having this problem. Thanks for mentioning the spl_object_hash; I hadn't seen it before. Using that, I found they are actually referring to different containers. I tracked the problem down to this commit: https://github.com/symfony/symfony/commit/91602df

[symfony-users] [Symfony2 Beta 1] Components Translations and Security: compatibility doubt

2011-05-03 Thread Borja Rodríguez Diliz
Hi All! Very nice work in Symfony Beta 1 (lot of changes since my last evaluation in PR6!) Probably a newbie question but I can't find how to manage this: I need some permanent links on my secured application to allow an easy change of the language, so basically I have following these instructio

Re: [symfony-users] Translating form labels in custom domain don't work

2011-05-03 Thread Michel Salib
Why not doing that : {% block field_label %} {% trans from "forms" %}%label%:{% endtrans %} {% endblock field_label %} I'am not sure, but it should work. -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message becau

Re: [symfony-users] locale in urls

2011-05-03 Thread Саша Стаменковић
{{ path('myroute', {'_locale': app.request.attributes.get('_locale')}) }} --- Regards, Saša Stamenković On Sun, May 1, 2011 at 10:35 AM, robjensen82 wrote: > Hi there, > > I'm in the process of making a new site and I've decided to include > the locale in the url of every page. Currently what I

Re: [symfony-users] FormComponent Question

2011-05-03 Thread Bernhard Schussek
Hi Geoff, Like with createBuilder(), you can pass the $product as second argument of create(): $form = $this->get('form.factory')->create(new ProductType(), $product); Could you fix the documentation in this regard? Thanks! Bernhard -- If you want to report a vulnerability issue on symfony,

[symfony-users] Re: SF2: Form Widgets are HTML-escaped in TWIG

2011-05-03 Thread Skaldrom Y. Sarg
This is fixed now, Thnx a lot... -- 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@googl