symfony

Symfony admin generator: Filtering the display columns

Hi, I am making use of the admin generator in Symfony 1.4, which is 99% working as I want it to simply using the options in the generator.yml config file. The problem I have is that I wish to specify which columns are displayed in the list view using a filter (as opposed to configuring them in generator.yml). I have successfully creat...

Symfony homepage not displaying image

I created a Symfony project and I can access it from a web browser but it doesn't display any images. I get this instead "If you see no image in this page, you may need to configure your web server so that it gains access to the symfony_data/web/sf/ directory." ...

PHP Symfony Alias

Hi! Can anyone tell me if there's any way to add an alias to a value of a enum fixture type? Something like this: responsabilityType: values: - ~ - StepAnaliseCC as Credit Responsability notnull: false Thanks in advance, Best regards! ...

Temporary store image in php only while displaying on web page

I want to fetch images from other site and display on my site. I want to store that images in my side temporary only at time of showing on page , so that user think images are coming from my site.is it possible? How? Thanks in advance. ...

accessing images

I am new to Symfony. I created a layout page in which I have this : <img src="images/header.jpg" width="790" height="228" alt="" /> but the image isn't displayed in the page when accessed from the browser. I put the file header.jpg in the web/images/ folder. I thought I could learn Symfony in a week while working on a small projec...

Custom scripts and styles for widgets in Symfony: position

My sample widget: class myWidget extends sfWidgetFormTextarea{ public function getJavascripts(){ return array('my_widget.js'); } public function getStylesheets(){ return array('my_widget.css'); } } Form template: <?php include_javascripts_for_form($form) ?> <?php include_stylesheets_for_form($form) ?>...

What are the .channels and .registry folders in the symfony /plugins folder?

I am upgrading a Symfony website from 1.2.9 to 1.4.1 and having a lot of fun in the process (NOT!). I have decided to clean up all unecessary files and folders and leave things to the bear minimum, in the process - since I had acquired a lot of plugins etc over a period of time - some of which were installed by PEAR and others (mostly),...

Symfony Doctrine Migration - Add new enum column

Hi there! Can anyone please tell me how can I add a new column of type enum to my schema in order to implement a Doctrine Migration? Thanks in advance, Best regards! ...

Doctrine Email Validation triggers on empty form field

Hi, I don't want an empty email field in my form to trigger a Doctrine_Validator_Exception. But, since Doctrine_Validator_Email uses "is_null()" to check for empty (non-existing) values (and the POST ['email'] contains an empty string), it does. Is this correct? Is there a simple way around this? This also has an impact when try...

Customize errors symfony

There are some "best practice" in Symfony to customize form errors? For exemple, if i would to show "Campo obligatorio" when the field is required. 1)How can i do that better way and independent from what forms call it? 2)How can i customize message 'An object with the same "%namefield" already exist.' ? Thanks updated sorry, but if...

Corrupt UTF-8 Characters with PHP 5.2.10 and MySQL 5.0.81

We have an application hosted on both a local development server and a live site. We are experiencing UTF-8 corruption issues and are looking to figure out how to resolve them. The system is run using symfony 1.0 with Propel. On our development server, we are running PHP 5.2.0 and MySQL 5.0.32. We do not experience corrupted UTF-8 char...

Doctrine to Propel snippet

I am using the Propel ORM with SF (1.4). I am writing a class, and I need to rewrite a query Doctrine query into Propel: $q = Doctrine_Core::getTable('sfGuardRememberKey')->createQuery('r') ->innerJoin('r.sfGuardUser u') ->where('r.remember_key = ?', $cookie); if ($q->count()){ // Do Something } can anyone help wi...

jQuery is not defined (in [Symfony] templating environment)

I am trying to display a page that uses jQuery. The AJAX functionality implemented in the page does not work. I am using FF for debugging. When I look in the console panel, I see the following error: 'jQuery is not defined'. Ah, that's an easy one I think - maybe the jQuery file has not been included correctly, or not found etc. So I t...

symfony setPostValidator with sfValidatorFile

I am going through an issue to setup a file upload validator on callback. I want to achieve this: I have a form, where user choose the type of the file they are uploading and upload the file. So I want to set the validator to handle images in case they chose "img" as type, and pdf if they chose "pdf". Moreover I want to specify the mi...

php/symfony/doctrine memory leak?

I'm having problems with a batch insertion of objects into a database using symfony 1.4 and doctrine 1.2. My model has a certain kind of object called "Sector", each of which has several objects of type "Cupo" (usually ranging from 50 up to 200000). These objects are pretty small; just a short identifier string and one or two integers. ...

How to know if an object from a relation exists in the database.

Hello. I'm using Symfony with Doctrine. I have two classes defined, Person and Student, a relation one to one. Each Student is related to a Person, but not every Person has a relation with a Student. When I call ... $person->getStudent(); ... I always get and object, regardless some Person's doesn't have a Student. How can I know ...

$sf_response->addStyleSheet() dosen't work in SF 1.4 ?

Does anyone know how to add stylesheets in a template with Symfony 1.4 ? I have tried everything I can think of, from modifying frontend/config/view.yml to modifying the template itself - bothing works. I have seen from my searches, that other people have had the same problem. There seems to be a clash of sorts between using include_st...

Symfony: how to implement a search functionality on multiple modules?

Hello, I have for example a module in my applications called 'Books'. Also I have several others modules in which I want to use a 'search a book' functionality (reuse the search form). How can I achieve that? I tried to make a component for this and use it in other modules templates, but I don't know how to return the found book id fr...

Uploaded docx files turning into zip

I am currently using symfony 1.4 and would like to allow users to upload Microsoft Word docx files. Using the sfWidgetFormInputFile widget and sfValidatorFile below users are able to select and successfully upload their docx files using a simple web form. $this->widgetSchema['file_name'] = new sfWidgetFormInputFile(array('label' => 'Fi...

Put several Google Maps on page using Symfony and sfEasyGMapPlugin

I'm using Symfony 1.2.9 and sfEasyGMapPlugin 3.0.0 I need to put two gmaps on one page. I've made custom ma name and DIV's id for each map. But I still can't make it work. Only second map is shown. The first one is not created. Does anybody knows how to make them work using sfEasyGMapPlugin? ...