symfony

Symfony 1.4 - Don't save a blank password on a executeUpdate action.

I have a form to edit a UserProfile which is stored in mysql db. Which includes the following custom configuration: public function configure() { $this->widgetSchema['password']=new sfWidgetFormInputPassword(); $this->validatorSchema['password']->setOption('required', false); // you don't need to specify a new password if you ...

symfony: form in the layout?

I have a form I need to show on every page. I'd like to put it in the layout rather than defining it in multiple controllers and view templates. I'm not sure how to do this without creating a slot for it, but then I have to define the slot in every template, and I'm back at square one. My other thought would be to create a custom action...

Symfony: joining two forms in the same page

Hi, i'm trying to join in the same action the login and the register forms. This is what i'm trying: modules/miembros/actions.class.php public function executeAux(sfWebRequest $request) { // I execute this action } modules/miembros/templates/auxSuccess.php <?php include_component('sfGuardRegister', 'register'); ?> <?...

Symfony 1.3: the signin form appears even when i have the security set to false

Hi, i have installed sfDoctrineGuardExtraPlugin and when i try to execute an action from sfGuardRegister or sfGuardForgotPassword i get the sfDoctrineGuardUser signin form. I have the security set to false. I don't have that problem with other modules. If i uninstall sfDoctrineGuardPlugin i get this error: 404 | Not Found | sfErro...

Symfony admin generator datetime picker

How can I use a jQuery datetime picker in the symfony admin generator? ...

How does Symfony pass members set in an action to a template?

How does a member set inside an action... $this->foo = 'bar'; ...become a variable accessible from a template... echo $foo; // bar I would like to know how it is achieved at a framework level. There is a lot of documentation on how to use Symfony, but I've not managed to find much about how it all fits together behind the scenes (...

Symfony 1.4: Deleting a sfGuardUser

Hi, I'm having some trouble with the following... I have a sfGuardUser table set up normally, and it has a one-to-one relationship with a Profile table, which contains some additional user info. When a user wants to delete themselves from the site, I'd like to retain their info in the Profile table for various purposes BUT delete the ...

Symfony problem with jq_link_to_remote

Hy, I'm using jq_link_to_remote function to load in a div a form to do answers to a comment (like in facebook). My problem is that i call this form like that 'social/respond/id/14' where id content the parent opinion. I create a funcion that setValue to a hidden field in my form. Then, why if i try to call directly 'social/respond/id/...

file upload functional testing in symfony without calling click()

I can't seem to perform functional test on file uploads through the sfTestFunctional's post() method. My action handling the HTTP post is able to get all parameters except the file upload field. Looking at Symfony 1.4's source codes, i think the sfBrowserBase only handle file upload through the click() method (specifically, the doClickE...

Log into file or database, readability question

Hi there! Right now I'm logging some info of the user in my web app in a log file to observe the usage & interest for some services, but I'm interested in checking that info in a readeable way, so I'm questioning if maybe I shall save that info in a database and then retrieve it to show it in tables or whatever. It's better to log in t...

Dynamic page titles in Symfony 1.4

Hi, I'm wondering if anyone's got any good advice/experience regarding setting dynamic meta titles in Symfony? Currently, the solution I'm aware of would be to use the following code to set a title individidually in each action: $this->getResponse()->setTitle('This is a title'); Because I also need translated titles, I could call th...

How to create a test environnement on the production FTP

Hello, I'm currently working on a symfony webapp, which is already on production. To develop and add/delete/modify functionnality of the model, I work on my laptop, using symfony 'dev' environnemment. I test if everything work fine, then I pray a little and deploy it on the prod server (with all the risk of data error, like when I add ...

symfony doctrine:insert-sql - "Couldn't locate driver named mysql" error

hey, I am a newbie in symfony. I am following this joobet tutorial on symfony-project.com, I am on there day 3 http://www.symfony-project.org/jobeet/1_4/Doctrine/en/03 Whenever I type php symfony doctrine:insert-sql, I get the following error: doctrine creating tables Couldn't locate driver named mysql I am using it on WAMP. I have sym...

Pros and cons of escaping strategies in symfony

I am still not sure in that matter. While turned on we're quite safe but some other problems appear (with passing template variables or counting characters). On the other hand we have magic turned off, everything is clear, but we have to manually escape every variable (that come from untrusted source) in templates. By the way, non-magic ...

Doctrine does not export relation properly

Hi, I've got a MySQL 5.1.41 database which i'm trying to fill with doctrine, but doctrine does not insert the relations correctly. My YAML is: Locatie: connection: doctrine tableName: locatie columns: loc_id: type: integer(4) fixed: false unsigned: false primary: true autoincrement: true org_id: type: i...

PHP session corrupt

Using symfony framework 1.4 I have created a website. I'm using sfguard for authentication. Now, this is working great on WAMP (windows). I can login to several accounts on different browsers and use the website. I have ubuntu server 9.10 running apache (everything up to date and default configuration). On my server, when I login to th...

In remote host: Connection could not be established with host smtp.gmail.com [Connection timed out #110]

Hi, after deploying I gettin this error below when i try to send an mail: 500 | Internal Server Error | Swift_TransportException Connection could not be established with host smtp.gmail.com [Connection timed out #110] stack trace * at () in SF_ROOT_DIR/lib/vendor/symfony/lib/vendor/swiftmailer/classes/Swift/Transport/StreamBuffer.ph...

Symfony 2.0 - routing

Hi! How can I set up routing in symfony to be like that(if one rule won't work, next should be grabbed): /controller/action/param/param/param/... /admin/controller/action/param/param/param/... ("admin" is constant here - name of the bundle) I tried that: homepage: pattern: / defaults: { _bundle: HelloBundle, _contr...

Problem with sfRemember cookie / sfGuard Remember me

I'm using Symfony 1.4 with Doctrine. Sorry if this is a silly question but what exactly does one need to build on top of the sfDoctrineGuardPlugin to get the "remember me" functionality working? When I login a user, the sfRemember cookie is created with the default 15-day lifetime, and the remember key is saved in the plugin's sf_guard...

how to acess user session in sfDoctrineRoute with symfony ?

how to acess user session in sfDoctrineRoute with symfony ? var_dump(sfContext::getInstance()->getUser()); returns NULL i cant access current user session in routing http://stackoverflow.com/questions/2455817/symfony-accessing-user-session-from-a-custom-routing-class = bad response ...