[symfony-users] Use compenents from symfony 2.0 in symfony 1.4

2011-02-08 Thread soulfly
Hi Is it possible to use compenents from symfony 2.0 in symfony 1.4 project. If so, would you explain how to do it right? Thnx -- 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 t

[symfony-users] [S2PR6] Mapping a form for an entity

2011-02-08 Thread Christophe Beyer
Hi, With this documentation page, I don't understand how to map my form with my Entity : http://docs.symfony-reloaded.org/guides/forms/overview.html#creating-form-fields-automatically 1. Here is my form (very simple!) : class BreveForm extends Form { protected function configure() {

Re: [symfony-users] How to bind one(or more) fields in the form?

2011-02-08 Thread Gareth McCumskey
If this is symfony 1.x you do not need to do anything funky. You can just bind your own array to the form. $values = array("_csrf_token"=>$request->getParameter('_csrf_token'), "field1"=>$request->getParameter('field1')); $my_form = new MyForm(); $my_form->bind($values); On Tue, Feb 8, 2011 at

[symfony-users] Re: doctrine:generate:entities generating classes in wrong folder?

2011-02-08 Thread jdewit
Make it 3! This affects generating repositories too. Thanks for the fix! -- 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 t

Re: [symfony-users] Re: [Symfony2] - Creating Forms

2011-02-08 Thread jdewit
Thanks again. Got it working. -- 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@googlegr

Re: [symfony-users] Re: [Symfony2] - Creating Forms

2011-02-08 Thread Christophe COEVOET
Le 08/02/2011 23:05, jdewit a écrit : Yet another error. You have to enable the templating engines you want to use in the templating config. This is a performance optimization as it avoids loading the PHP renderer when you only want to use Twig. Look at the configuration of the sanbox for an e

[symfony-users] Re: [Symfony2] - Creating Forms

2011-02-08 Thread jdewit
Yet another error. Fatal error: Uncaught exception 'LogicException' with message 'You must register at least one templating engine.' in C:\xampp\htdocs \sandbox\src\vendor\symfony\src\Symfony\Bundle\FrameworkBundle \DependencyInjection\FrameworkExtension.php:259 Stack trace: #0 C: \xampp\htdocs\sa

Re: [symfony-users] Re: [Symfony2] - Creating Forms

2011-02-08 Thread Christophe COEVOET
Le 08/02/2011 22:43, jdewit a écrit : Thanks for the quick reply! Just found the other thread that deals with this as well. http://groups.google.com/group/symfony-users/browse_thread/thread/ca55953f92ac004c So I updated my sandbox's Symfony vendor folder with the PR6 version, resolved some bad

[symfony-users] Re: [Symfony2] - Creating Forms

2011-02-08 Thread jdewit
Thanks for the quick reply! Just found the other thread that deals with this as well. http://groups.google.com/group/symfony-users/browse_thread/thread/ca55953f92ac004c So I updated my sandbox's Symfony vendor folder with the PR6 version, resolved some bad links in the autoload.php file and am no

Re: [symfony-users] [Symfony2] - Creating Forms

2011-02-08 Thread Christophe COEVOET
Le 08/02/2011 21:08, jdewit a écrit : I am following the online documentation and am getting the following error in my controller. Fatal error: Call to undefined method Application\HelloBundle\Contact \ContactForm::create() in C:\xampp\htdocs\sandbox\src\Application \HelloBundle\Controller\Hello

[symfony-users] [Symfony2] - Creating Forms

2011-02-08 Thread jdewit
I am following the online documentation and am getting the following error in my controller. Fatal error: Call to undefined method Application\HelloBundle\Contact \ContactForm::create() in C:\xampp\htdocs\sandbox\src\Application \HelloBundle\Controller\HelloController.php on line 50 Here's my cod

[symfony-users] Fwd: problem with doctrine:build dsn

2011-02-08 Thread Gab's mail lists
Hi, I'm on windows 7 with xampp, and SF 1.4.8 I've configured my db in databases.yml like this: all: doctrine: class: sfDoctrineDatabase param: dsn:'mysql://root:root@localhost/mydb' mydb exists in mysql. When I do : symfony doctrine:build --db I get : Unknown drive

[symfony-users] How to bind one(or more) fields in the form?

2011-02-08 Thread raymond wang
Hi guys! I got a problem now. I need to bind just one or two fields in my OrderForm class while other fields stay unchanged. I read the source of sfForm::bind() where the line "$this- >taintedValues = $taintedValues;"(@line 204) make this improssible. Well, I think function sfForm::bindField($f

[symfony-users] Re: The CSRF token is invalid

2011-02-08 Thread Ed
Here is a dump of the $form->getCsrfProvider() (from right after I've called the bound function), seems pretty empty.. object(Symfony\Component\Form\CsrfProvider\SessionCsrfProvider)[32] protected 'session' => object(Symfony\Component\HttpFoundation\Session)[71] protected 'storage' =>

[symfony-users] error with equal nest relation

2011-02-08 Thread geraldo
I'm trying to define a equal nest relation with symfony 1.4.8 and sfDoctrineGuardPlugin but get the following error: Notice: Undefined index: agente in lib/vendor/symfony/lib/plugins/ sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Hydrator/Graph.php on line 303 Notice: Undefined index: in lib/vendo

Re: [symfony-users] [Symfony2] How to create Forms in PR6?

2011-02-08 Thread Dennis Jacobfeuerborn
I figured something like that would be the case but wasn't sure because the documentation doesn't mention a required name parameter: http://docs.symfony-reloaded.org/master/guides/forms/overview.html This should probably be added there too. -- If you want to report a vulnerability issue on symf

Re: [symfony-users] [Symfony2] Instantiating a Form from within a template

2011-02-08 Thread Dennis Jacobfeuerborn
Indeed it is. I was trying to call it as function which obviously can't work. Now I can setup the form in the controller and call that from the template which gives me exactly what I need. Thanks! -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-

Re: [symfony-users] [Symfony2] Instantiating a Form from within a template

2011-02-08 Thread Dennis Jacobfeuerborn
I could probably get away with a manual form but I'm still interested in finding out to do this for more complex cases where the form needs to be setup properly with data from a database for example (something that I might need for this search form at a later time). -- If you want to report a

Re: [symfony-users] [Symfony2] How to create Forms in PR6?

2011-02-08 Thread Nikita Korotaev
Bernhard, thanks for your suggestion. After playing around with different configurations, I've finally made it working. // Code in controller $relationUserUniversity = new RelationUserUniversity(); $relationUserUniversity->setUser(new User()); $relationUserUniversity->setUn

[symfony-users] propel driver not found

2011-02-08 Thread Manuel Alejandro Gómez Nicasio
Hi! I have a problem, when I run the task «propel:build-schema» I get the following error. >> propelRunning "reverse" phing task [propel-schema-reverse] There was an error building XML from metadata: could not

Re: [symfony-users] Re: How to access symfony 2 command line

2011-02-08 Thread stof
Right, the exception message says you "Unable to write in file [...]". Just update the permission. And the first issue listed here says the syntax of your /etc/php5/cli/conf.d/mcrypt.ini file is deprecated so you should fix it to avoid aving a message each type you use the CLI -- Christophe | St

[symfony-users] Re: How to access symfony 2 command line

2011-02-08 Thread deepak
Issue fixed given write permission to cache dir ... Thanks On Feb 8, 10:20 pm, deepak wrote: > Here is the complete command line output ... > --- > PHP Deprecated:  Comments starting with '#' are deprecated in /etc/ > php5/cli/conf.d/mcrypt.ini on line 1 in Unknown on line 0 > PH

Re: [symfony-users] Re: How to access symfony 2 command line

2011-02-08 Thread Gustavo Adrian
It seems to be a permissions problem. Give write permissions to dirs app/cache and app/logs On Tue, Feb 8, 2011 at 2:20 PM, deepak wrote: > Here is the complete command line output ... > --- > PHP Deprecated: Comments starting with '#' are deprecated in /etc/ > php5/cli/conf.d/m

[symfony-users] Re: How to access symfony 2 command line

2011-02-08 Thread deepak
Here is the complete command line output ... --- PHP Deprecated: Comments starting with '#' are deprecated in /etc/ php5/cli/conf.d/mcrypt.ini on line 1 in Unknown on line 0 PHP Fatal error: Uncaught exception 'RuntimeException' with message 'Failed to write cache file "/var/www/s

[symfony-users] Re: [symfony 2]How to access symfony 2 command line

2011-02-08 Thread deepak
Thanks Christophe, I don't know about the exception, what I am trying to know here is when I go to sf2 sandbox in terminal (ubuntu setup ), Is there a way to access sf2 commands like we had for symfony1.4 e.g. "symfony cc" etc ... Do these commands exits in sf2 anymore or not. (If yes, what all c

Re: [symfony-users] [symfony 2]How to access symfony 2 command line

2011-02-08 Thread stof
What exception do you get ? The call stack is useless without the exception (which should be printed before that). Christophe On Tue, 8 Feb 2011 09:00:55 -0800 (PST), deepak wrote: > Hi > > I have checked out the symfony 2 sandbox but I am not able to access > the symfony console like we used t

Re: [symfony-users] [Symfony2] How to create Forms in PR6?

2011-02-08 Thread Bernhard Schussek
Strange. Could you try removing $this->getOptions() when creating the subforms? -- 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 t

[symfony-users] [symfony 2]How to access symfony 2 command line

2011-02-08 Thread deepak
Hi I have checked out the symfony 2 sandbox but I am not able to access the symfony console like we used to do in sf1.4 or older version ... Any idea how to do that and how to see what all commands are available ? I tried to use "php app/console" and I get following --

Re: [symfony-users] [Symfony2] How to create Forms in PR6?

2011-02-08 Thread Nikita Korotaev
Bernhard, Now when I write: $form = UniversityRegistrationForm::create($this->get('form.context'), 'registration'); I got the error: *Neither property "registration" nor method "getRegistration()" nor method "isRegistration()" exists in class "Application\HelloBundle\Entity\RelationUserUniv

Re: [symfony-users] Re: Trying to send emails

2011-02-08 Thread Alex Pilon
Would the mail server discarding the message make the mail function on the php side fail? I always thought that php mail code failed when it could not contact the mail server for some reason. On Tue, Feb 8, 2011 at 10:52, stof wrote: > On Tue, 8 Feb 2011 07:35:46 -0800 (PST), Javier Garcia > wr

Re: [symfony-users] [Symfony2] How to create Forms in PR6?

2011-02-08 Thread Bernhard Schussek
Hi Nikita, $form = UniversityRegistrationForm::create($this->get('form.context')); should be $form = UniversityRegistrationForm::create($this->get('form.context'), 'registration'); Bernhard -- Software Architect & Engineer Blog: http://webmozarts.com Twitter: http://twitter.com/webmozart -- I

Re: [symfony-users] [Symfony2] How to create Forms in PR6?

2011-02-08 Thread Nikita Korotaev
Hi Bernhard, I'm still confused how to create a form that have fields connected to several entities(Like FieldGroup was doing). Can you check my syntax? In the controller I use a Create() function from the example. And in the From class I'm trying to add fields that should be connected to diffe

Re: [symfony-users] Re: Trying to send emails

2011-02-08 Thread stof
On Tue, 8 Feb 2011 07:35:46 -0800 (PST), Javier Garcia wrote: > Hi, my problem: no email is sent. > The only errors appearing in the logs are about headers already sent, which is certainly due to the fact you use var_dump() which prints 0 before the headers are chenged by Symfony. nothing appear

Re: [symfony-users] Re: Trying to send emails

2011-02-08 Thread Alex Pilon
Hi, Can you please answer whether or not you can send email using the native php mail function? It would seem to me that your configuration is wrong. Try and sub out the credentials with Googles smtp and see if you can make it work. Start from what you know works and work your way to the desired

[symfony-users] Dynamic breadcrumbs in symfony 1.1.1

2011-02-08 Thread Kiran
Hello Friends I am using Symfony 1.1.1 I want to add dynamic link for e.g I have one Parent link Registration and child link Add Edit Print I have to implement Dynamic link as follow Registration->Add Registration->Edit Registration->Print If I click Link Add then I click Edit child link Then Pre

Re: [symfony-users] Re: Trying to send emails

2011-02-08 Thread basos g
On 8 February 2011 17:35, Javier Garcia wrote: > Hi, my problem: no email is sent. > > > On Feb 8, 5:01 pm, stof wrote: > > On Tue, 8 Feb 2011 06:21:36 -0800 (PST), Javier Garcia > > > > wrote: > > > No idea? > > > > Well, what is your problem exactly ? You don't ask any question in your > > pr

[symfony-users] Re: Trying to send emails

2011-02-08 Thread Javier Garcia
Hi, my problem: no email is sent. On Feb 8, 5:01 pm, stof wrote: > On Tue, 8 Feb 2011 06:21:36 -0800 (PST), Javier Garcia > > wrote: > > No idea? > > Well, what is your problem exactly ? You don't ask any question in your > previous mail. > > Thus, the logs say the mail is sent. > > -- > Christ

Re: [symfony-users] Re: Trying to send emails

2011-02-08 Thread stof
On Tue, 8 Feb 2011 06:21:36 -0800 (PST), Javier Garcia wrote: > No idea? > Well, what is your problem exactly ? You don't ask any question in your previous mail. Thus, the logs say the mail is sent. -- Christophe | Stof -- If you want to report a vulnerability issue on symfony, please send

Re: [symfony-users] Re: Trying to send emails

2011-02-08 Thread Alex Pilon
Can you send mail with the native php mail function? On Tue, Feb 8, 2011 at 09:21, Javier Garcia wrote: > No idea? > > On Feb 7, 7:14 pm, Javier Garcia wrote: > > Hi, > > > > I'm trying to send emails using this code: > > > > var_dump($this->getMailer()->composeAndSend( //this outputs '0

Re: [symfony-users] [Symfony2] Instantiating a Form from within a template

2011-02-08 Thread stof
On Tue, 8 Feb 2011 05:57:41 -0800 (PST), Dennis Jacobfeuerborn wrote: > Is there a way to create a form without explicitly instantiating it in the > controller? > The use-case here is a small search form that is displayed on all pages. > Right now I explicitely instantiate it in the controller o

[symfony-users] Re: Trying to send emails

2011-02-08 Thread Javier Garcia
No idea? On Feb 7, 7:14 pm, Javier Garcia wrote: > Hi, > > I'm trying to send emails using this code: > >      var_dump($this->getMailer()->composeAndSend(   //this outputs '0' >         'f...@example.com', >         'j.gar...@jander.eu', >         'Subject', >         'Body' >      )); > > The f

Re: [symfony-users] [Symfony2] How to create Forms in PR6?

2011-02-08 Thread Bernhard Schussek
Ah you probably forgot to pass a name to Form::create(), right. This is fixed in trunk. Now an exception will be thrown when you bind an anonymous form. Sorry for the inconvenience. Bernhard -- Software Architect & Engineer Blog: http://webmozarts.com Twitter: http://twitter.com/webmozart -- If

Re: [symfony-users] [Symfony2] Instantiating a Form from within a template

2011-02-08 Thread Bernhard Schussek
Hi Dennis, Do you really need a Form instance for something as simple as a search form? Bernhard -- Software Architect & Engineer Blog: http://webmozarts.com Twitter: http://twitter.com/webmozart -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-p

[symfony-users] [Symfony2] Instantiating a Form from within a template

2011-02-08 Thread Dennis Jacobfeuerborn
Is there a way to create a form without explicitly instantiating it in the controller? The use-case here is a small search form that is displayed on all pages. Right now I explicitely instantiate it in the controller of the page but doing this in all Controllers would be a chore. I know that in

[symfony-users] Re: Friends of symfony UserBundle

2011-02-08 Thread scott
I think I have solved the problem by adding the suggested firewalls my config is now # app/config/config.yml security.config: providers: fos_user: id: fos_user.user_manager firewalls: main: form_login: login_path: /login

Re: [symfony-users] [Symfony2] How to create Forms in PR6?

2011-02-08 Thread Dennis Jacobfeuerborn
Using "new SearchForm('test')" results in the expected attributes name="test[query]" but using Form::create instead (which is used in the documentation) results in attributes that appear like name="[query]" which doesn't look right. -- If you want to report a vulnerability issue on symfony, pl

Re: [symfony-users] Re: How to let my users edit their password/profile ? [sfDoctrineGuardPlugin]

2011-02-08 Thread Alex Pilon
Glad I could help. Remember to always survey what you have to work with when coding. That and to read all documentation for something when you start using it. On Feb 8, 2011 8:12 AM, "Manu" wrote: !! I didn't know there was a registration form !! You're right, extending *that* form works perfec

[symfony-users] Re: How to let my users edit their password/profile ? [sfDoctrineGuardPlugin]

2011-02-08 Thread Manu
!! I didn't know there was a registration form !! You're right, extending *that* form works perfectly. I love you. :) -- 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

[symfony-users] Re: Friends of symfony UserBundle

2011-02-08 Thread scott
I am new to Symfony (and have chosen to start with Symfony 2) and therefore I apologise in advance if my problem is indeed a trivial one. I have downloaded and setup the Friends of Symfony UserBundle as stated by the setup document however, I can not login successfully. I am able to creat a new use

Re: [symfony-users] Re: How to let my users edit their password/profile ? [sfDoctrineGuardPlugin]

2011-02-08 Thread Alex Pilon
I made a form that inherited the included registration form. Look at its source code and you' ll see why. On Feb 8, 2011 3:29 AM, "Manu" wrote: Hum .. I can keep reading the source, sure. Can't anyone explain to me how they did it on their projects ? Did you start by a generate-admin sfguarduse

[symfony-users] Re: Friends of symfony UserBundle

2011-02-08 Thread scott
app.config: charset: UTF-8 error_handler: null csrf_protection: enabled: true secret: xx router:{ resource: "%kernel.root_dir%/config/ routing.yml" } validation:{ enabled: true, annotations: true } templating:{ engines: ['twig']

Re: [symfony-users] Friends of symfony UserBundle

2011-02-08 Thread stof
On Tue, 8 Feb 2011 04:35:29 -0800 (PST), scott wrote: > > # app/config/config.yml > security.config: > providers: > fos_user: > id: fos_user.user_manager You have to define a firewall to handle the authentication. Look at the official doc about security: http://docs.symfo

[symfony-users] Friends of symfony UserBundle

2011-02-08 Thread scott
I am new to symfony (although thought it was best to dive in to symfony 2.0 straight away) and therefore I apologise in advance if my problem is a trivial one. I have downloaded and setup this bundle as described in the documentation that comes with the bundle. I am able to create a new user howev

Re: [symfony-users] Want an id column but not auto incremented

2011-02-08 Thread Gareth McCumskey
Yes I have actually. The problem is that as soon as I delete the lib.model.schema.sql file and then run propel:build-sql it again creates a sql file as my OP shows based on the propel:build-schema schema.yml file. On Tue, Feb 8, 2011 at 1:46 PM, Justen Doherty wrote: > Hi Gareth, > > have you tr

Re: [symfony-users] Want an id column but not auto incremented

2011-02-08 Thread Justen Doherty
Hi Gareth, have you tried creating the table directly in the database then create schema from db? On Tue, Feb 8, 2011 at 11:27 AM, Gareth McCumskey wrote: > Hi all, > > I am trying to create a few tables with a column called id. I do not, > however, want symfony to do its automated stuff on this

[symfony-users] Want an id column but not auto incremented

2011-02-08 Thread Gareth McCumskey
Hi all, I am trying to create a few tables with a column called id. I do not, however, want symfony to do its automated stuff on this column. I have created my schema as per below: live_signature_fields: id: { type: integer, required: true, primary: true, autoIncrement: false } field_name

Re: [symfony-users] Question about sfOutputEscaperArrayDecorator

2011-02-08 Thread Gareth McCumskey
foreach works on that object still. So I don't see the problem: $results = sfGuardUserPeer::doSelect(new Criteria()); And in the template: getUsername() ?> On Mon, Feb 7, 2011 at 8:17 PM, Javier Garcia wrote: > Hi, > > when i do a sfGuardUserPeer::doSelect(new Criteria()), i get an object >

Re: [symfony-users] Skip autoloading in symfony

2011-02-08 Thread Gareth McCumskey
Also, you are misinformed. The classes in your lib folders do not autoload for every action you call but only get included as needed when you create objects from those classes etc. It is selectively autoloading. On Mon, Feb 7, 2011 at 10:20 AM, Imran wrote: > Hi visitors, > > I have some class f

Re: [symfony-users] [Symfony2 vPR6] Howto use WebProfilerBundle while using the PHP Templating engine for your website?

2011-02-08 Thread stof
On Tue, 8 Feb 2011 00:05:13 -0800 (PST), Frenck wrote: > Hi, > > I've got an issue. In the config.yml I've defined my templating > engine: > > app.config: > templating: { engines: ['php'] } > > > I also would like to use the WebProfilerBundle... So i've added the > profiler to my kernel:

Re: [symfony-users] Re: The CSRF token is invalid

2011-02-08 Thread Bernhard Schussek
Could you please print the output of var_dump($form->getCsrfProvider())? In Symfony\Component\Form\CsrfProvider\DefaultCsrfProvider there is the line return sha1($this->secret.$pageId.$this->getSessionId()); within generateCsrfToken(). Please do also output the secret, page ID and session ID

[symfony-users] Re: How to let my users edit their password/profile ? [sfDoctrineGuardPlugin]

2011-02-08 Thread Manu
Hum .. I can keep reading the source, sure. Can't anyone explain to me how they did it on their projects ? Did you start by a generate-admin sfguarduser call ? Thank you for your patience. -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.

[symfony-users] [Symfony2 vPR6] Howto use WebProfilerBundle while using the PHP Templating engine for your website?

2011-02-08 Thread Frenck
Hi, I've got an issue. In the config.yml I've defined my templating engine: app.config: templating: { engines: ['php'] } I also would like to use the WebProfilerBundle... So i've added the profiler to my kernel: if ($this->isDebug()) { $bundles[] = new Symfony\Bundle\