symfony

customising the symfony view.yml file

Hi guys, I have a question regarding the view.yml file in Symfony. Basically I would like to be able to include certain javascript SDKs in my layout with the help of the view.yml file like so: first i would add an entry the the corresponding view file: all: load_facebook: true load_twitter: true stylesheets: javascripts: ...

Symfony routing problem - what am I doing wrong?

I am learning Symfony and I'm working with the following URI: url_for('newItem/show?id='.$item->getId().'&name='.$item->getName().'&summary='.$item->getSummary()) With the below routing.yml item_show_user: url: /newItem/:name/:summary param: {module: newItem, action: show} # default rules homepage: url: / param: { mod...

Symfony multiple filter handlers

I want to know if it is possible to add multiple handlers for the same filter. For my case I use sfGuardPlugins remember me filter, but I would like to use the remember me filter from sfFacebooConnectPlugin. Can I make both these filters to work on the remember_me filter, or should I create my own filter handler which would treat both c...

set content-type to json in symfony

I am using symfony 1.4, to create my project with propel as ORM. i want to get the response in JSON format, when i call a url. I have set the headers to "application/json" but it is not working, i am getting the response back in HTML format..which i am not able to decode. How can we set content-type in symfony?? example code: Action- ...

Continous integration tool for symfony project

I have to set up continous integration for php. My CI server should be able to build the project, run the unit tests and create a report with the result. What would be the best continuos integration tool for a symfony project? I can't decide between phpUnderControl + CruiseCotrol, Xinc, or Hudson. ...

error using doctrine:build --all symfony 1.4.4 apostrophe trunk

Hi, I'm stumped on why when I do doctrine:build -all it throws 2 warnings. I've tried commenting out all the schema.yml files and it still throws it. Anyone better informed help me understand where it is coming from, is there some caching I am unaware of? I've deleted the cache (./symfony cc). Manually deleted all the lib/ models, forms...

Symfony: impossible to remove from cache

Ok, so this is my issue. I have a page that lists a bunch of categories under a subdomain. I'm trying to clean the cache for that page if the user is logged in. In the action I'm using this: if ($this->getUser()->isAuthenticated()) { if($cache = $this->getContext()->getViewCacheManager()) { $cache->remove('category/index?subdoma...

Symfony Widget: sfWidgetFormDoctrineChoice vs. i18n - Undefined column

Hi. For a form I want to retrieve all entries of a table. Therefore I use the getChoices method of the sfWidgetFormDoctrineChoice class. protected function getPaymentTypes(){ $typesWidget = new sfWidgetFormDoctrineChoice( array( 'model'=>'PaymentType', 'method'=>'getName', 'order_by'=...

Symfony sfGuardSecurityUser->removeCredential not working

I'm using symfony 1.4.8 and I have some code that basically looks like this (in a Filter): $user = $this->getContext()->getUser(); if ($condition) $user->addCredential('cred'); else $user->removeCredential('cred'); die($user->hasCredential('cred'); No matter what I have done, it always registers that it has the cred credential...

Symfony CSRF attack detected everytime I submit a form

The login form works fine, but any other form I submit (things like editing or creating data) I get a CSRF attack detected error. I have tried to clear symfony and browser cache, deleted cookies, tried multiple browsers and multiple computers. What can cause this? When I turn off the CSRF protection it works fine. ...

How do you change the default format to XML in Symfony?

I'm writing a restful XML API for a university assignment, the spec requires no HTML frontend. There doesn't seem to be any documentation (or guessable functionality) regarding how to change the default format? Whilst thus far I have created all templates as ...Success.xml.php it would be easier to just use the regular ones and set this...

Which symfony-based CMS is the most extensible?

Hello, I'm looking for a symfony-based CMS, and I have heard about Diem and Apostrophe, but none of them offers all of the features I am searching for. In your opinion, which of these CMS' is the most easy to extend? Do you know any other Symfony-based CMS I would want to consider? EDIT : By 'to extend' I mean adding probably unsupport...

Why does a multi-word Doctrine search cause MySQL to use up to 300% CPU?

I have a table using Doctrine's Searchable behaviour, which works well for single word queries. However I've noticed that when a query includes a space, the page hangs and I can't get any response out of refreshing the page etc. If I open Activity Monitor on my Mac, or SSH then 'top' in Ububntu, MySQL is running a process at up to 300% ...

How do you enabled layouts for non-HTML templates in Symfony?

My Example Relatively simple layout.xml.php: <?xml version="1.0" encoding="<?php echo sfConfig::get('sf_charset', 'UTF-8') ?>"?> <example> <?php echo $sf_content ?> </example> Simply isn't being used by any XML templates e.g. indexSuccess.xml.php The Symfony documentation states: The layout is automatically disabled for XML HT...

Symfony : Generating filter+form classes = Fatal error (Allowed memory size exhausted)

Hello, I've got this weird error when i try to generate either the filters or the form on my production server. Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 20 bytes) in /var/www/project/lib/vendor/symfony/ lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Core.php on line 669 I don'...

How can you/Is it feasible to override Doctrine_Connection in Symfony?

The university servers I'm currently working on lack PDO drivers, hence I've had to re-implement PDO & it's respective MySQL class to allow doctrine to connect to a MySQL database. This is all well and good (or as well as a PHP implementation of PDO can go) and obviously if uni didn't have PDO at all this would all just work. However, ...

Doctrine ORM, two different querys produce the same result set

I'm using Doctrine 1.2 and Symfony 1.4. In my action, I have two different query that return different result set. Somehow the second query seem to change the result (or the reference?) of the first one and I don't have any clue why.. Here is an example: $this->categories = Doctrine_Query::create() ->from('Categorie AS c') ...