symfony

Symfony pass two models to route

Hi. I have this routing.yml: post: class: sfDoctrineRouteCollection options: { model: BlogPost } I need this url: /company/24/mycompany/blog/post/13. How how I can pass to my route 2 models to generate following route: //Test route example post_show: url: /company/:id/:title_slug/blog/post/:post_id param: { module: c...

Symfony InvalidArgumentException widget "attention" does not exist

InvalidArgumentException widget "attention" does not exist When I remove "attention", "captcha" gives the same error. Neither one of these fields are in the database. I had this working earlier until I tried to pass a variable to the form from actions. I took that out but I'm still getting an error Any thoughts on what I'm doing wrong?...

Temporary Connection to External Database with Symfony/Doctrine

Summary: I want to be able to run a query against an external database to grab some needed data at the time the user logs in. I don't want this site to do anything else with the external database. Long term, it may need to be able to push data back, but specifically, I don't want symfony to try to build the schema for the external db, i...

Symfony 1.4 routing issue

I have symfony 1.4 application. On windows AMP all is right. But on Linux Apache2 i have an isseu: For example, i have deployed application on myhost. http://myhost/ - works right, but http://myhost/module - doesn't work. But in i use frontend_dev.php - all is right. http://myhost/frontend_dev.php/module/ - works. Cache is clean. An...

Symfony 1.4 functional tests - using routing rules in sfTestFunctional::get()

Unfortunately I'am currently forced to use concrete URI in my functional test (get('/articles/index') in case of my backend admin testing). It's obviously not good because this way im depending on concrete project URI settings which is not the point of this tests, is possibly somehow use routing rules in this get() method? ...

Optimised solution to store order of rows in a database

Hi, I have a data model in Doctrine/symfony. I have a 'Course' which has many 'Lesson's. For each lesson I need to calculate the order (by date) that the lesson appears. For example, the Course 'Java for beginners' might have 10 lessons during October, I need to retrieve the order of these lessons so that the first one is called 'Java f...

Symfony forms or normal HTML forms

I am using Symfony 1.4 to create project, and i need to create dynamic forms depending upon the question set type coming from database. i have used Symfony forms in rest of my project, but in this case using symfony forms seems to be tough, as i need dynamic form. can it be safe to use normal HTML forms..in symfony project, or it is advi...

How to convert the SQLs of the symfony development bar to the MySQL SQLs ?

Hi, just that. Im using propel. REgards Javi ...

Using Varnish in a Symfony Application?

My goal is to use Varnish to cache my static assets with my Symfony 1.4 site (http://my.perqworks.com). I can write a VCL file that strips out cookies on all static files while leaving the user authentication cookie on the php file -- but the user authentication is failing. I cannot log into my application. I am looking for an answer t...

PHP Symfony - Form processing questions

I am trying to build my own user authentication system (simply because the ones out there are too convoluted and big). I have trouble getting to grasps with the symfony form processing though. Am looking at sfDoctrineGuardPlugin, but for the life of me, can't figure out, when the inputted password is converted to a sha1 hash before bein...

Cross-application I18n in Symfony

How can i use global i18n translations for all applications in a symfony project? ...

Doctrine (symfony) YAML schema/fixture constraint trouble

Morning, I'm having some trouble creating tables/loading fixtures. (symfony 1.4.6 with the bundled Doctrine 1.2.3(?)) Tables (simplified): Horseman: tableName: Horseman actAs: { Timestampable: ~ } columns: id: { type: integer(4), primary: true, autoincrement: true, unsigned: true } name: { type: st...

handling netbeans+symfony project on local network

We are two friends trying to develop an application on local network using symfony + netbeans + wamp. I have shared wamp directory and put my wamp server online. Now my friend can work on project that is placed in my www directory but he can not access phpMyAdmin and when he opens 'run symfony commands' window by right clicking on proje...

No database connection via doctrine in symfony

Hi, I'm working on the symfony tutorial jobeet and I have problems to get a database connection to the MySQL-database via doctrine. Development enviroment: Mac OS X and XAMPP. The command 'php symfony doctrine:build-schema' gives me the following error message: Warning: PDO::__construct(): [2002] No such file or directory (trying to ...

What happens to symfony when the database is offline?

What exactly happens when the database attached to symfony goes offline or is unreachable? Maybe the answer to this question is in my face and I don't realize it, but I've been searching for the last while and still coming up empty handed. I've attempted to simulate this myself (in the "production" environment) by just stopping the data...

PHP Symfony - Inside Filter, check if action is_secure'd?

How do I check if the action I am calling was secured in security.yml? security.yml myAction: is_secure: false filter.yml myFilter: class: myFilter Now inside myFilter i want to check if the action was secured or not. class myFilter extends sfFilter { public function execute($filterChain) { if ($this->getContext()->is...

symfony doctrine data-dump and reload wont't work

Hi, I have a database built by Doctrine from schema.yml which I want to modify. Thus, first I saved the data using doctrine:data-dump command. Afterwards I wanted to check if it really can reload data, so I called the doctrine:build --all --and-load command. It successfully rebuilt the database, however when loading data from data1.yml...

How to declare Doctrines Inheritance in a fixtures.yml file?

Hello folks, I have a problem with the inheritance of Doctrine within my fixtures.yml file of Symfony. Imagine the following: NewsAuthor: inheritance: extends: sfGuardUser type: simple Now I want to declare the default guard user User_admin of the fixtures file of the sfDoctrineGuardPlugin to be the author of the first d...

To set symfony validators for custom HTML elements

I have created custom HTML form elements to take inputs from user, and i am not using the Symfony Form. i know that it keep me out of Symfony form validation system, Is there any way to use custom HTML element and get Symfony Form validation on that elements. I have used Symfony forms and i know how to use validators, but this time i am ...

symfony updates table but not form

My symfony edit form validates and saves. When I check the record in mysql query browser the record updates, but when the page refreshes the same data is there and the form hasn't updated. Any thoughts? public function executeEdit(sfWebRequest $request) { $this->forward404Unless($items = Doctrine::getTable('items')->find(arra...