symfony-1.4

PHP Symfony + One-to-Many Relationship + Result Caching

I am getting unexpected behavior (to me!) when defining a one-to-many relationship with Symfony 1.4. Here is a simple example which demonstrates the behavior, having an Employer table and an Employee table: one Employer can have many Employees. The YML schema file is as follows: Employee: columns: id: { type: integer, primary: tru...

Render each choice as a row in a table in a Symfony choice widget.

Hi, I have a sfWidgetFormChoice which renders checkboxes in Symfony 1.4. The problem I have is that I want to rend each choice as a row in a table. So my html would ideally be something like this: <tr><td>Choice 1</td></tr> <tr><td>Choice 1</td></tr> <tr><td>Choice 1</td></tr> . . . So that it woul...

Symfony plugin development

Can anyone point me towards a good tutorial/documentation on writing symfony plugins? I'm trying to write a plugin for paypal using doctrine and sf 1.4. Thanks ...

Can Symfony simply reload a page request?

I have an app that receives a request from another app. It detects a value on the query string, checks that value against a cached value and, if they don't match, it needs to clear its cache and reload the page (establishing a new cache). Unfortunately, I can't find a way to tell Symfony to redirect to the current page in exactly the sam...

setting up routing for the first time

I'm trying to set up url routing on my server for the first time. I'm fairly sure that mod_rewrite is enabled. Are there any other configurations I need to change or things to set up? Should the routing.yml file just automatically get read? ...

How to format a join table form to display multiple checkboxes for values from one of the linked tables in Symfony?

Apologies if this is something really simple that I've missed. I have 3 tables and related forms in symfony 1.4 (using Doctrine) for a website for local tradesmen: Profile columns: name: { type: string(255), notnull: true} email: { type: string(255), notnull: true, unique: true } phonenumber: { type: string(255), notnull:...

images not showing up after changing the web folder to public_html

When moving my project onto a new server, I was required to change the public folder from web to public_html. In addition, I wanted the symfony public files to be in a public folder, public_html/symfony. So they would be accessed by going to the website www.mysite.com/symfony This was achieved by: class ProjectConfiguration extends s...

Setting Doctrine attributes in a task

I'm trying to set a Doctrine attribute in a task, but it doesn't seem to work. What I'm trying to set, is an attribute to disable Doctrine validation: $databaseManager = new sfDatabaseManager($this->configuration); $connection = $databaseManager->getDatabase('doctrine')->getConnection(); $connection->setAttribute(Doctrine_Core::ATTR_VA...

how to define an autoincrement id column in doctrine?

I'm using symfony 1.4 with doctrine as my ORM, I need to do one of two thing to get it working, and I don't know how to do it. If anyone can help me please do :-P the id fields should not be bigint, just int or When I define my table as follows: Table: columns: id: type: integer autoincrement: true primary: true make th...

sfFacebookConnectPlugin: Authentication problem

Hi overflowers, I try to get the sfFacebookConnectPlugin to run by following the tutorial on the symfony homepage. Everything seems well configured. But when I try to login with sfFacebookConnectAuth/signin. I get the form error "The username and/or password is invalid.". I even don't know where to start with the debugging. First Ste...

Unknown record property / related component "..." on "..." with sfDoctrineActAsTaggablePlugin

Hi, I'm using the symfony plugin sfDoctrineActAsTaggablePlugin to add a Taggable behaviour to some objects of my model. I followed the instruction given here but when I want to save a taggable element in the database I get : Unknown record property / related component "saved_tags" on "Mishidea" Mishidea is the name of the class/tabl...

how can I define a value for model's field in symfony?

I'm building an app for the company I work for in symfony, non the less the app might be pretty useful outside our company so we decided to write it in a more general form so we can make it multi company. I'm facing a problem on how to define a default value for a field that is going to be in every single model (company_id) so we don't ...

Symfony - updating unique column - validation problem

I'm new to Symfony Framework and I ran into a problem with form validation. I want to update data in DB including unique column, but if unique column is unchanged, an error is returned (An object with the same "domain" already exist."). Domain column must be unique, but user should be able to change it. So, if one user saves his domain ...

Apply a Form Schema Formatter to all forms?

I just created a custom schema formatter by extending sfWidgetFormSchemaFormatter for my forms. However, what is sad to know is that to use it, I need to specify that in the configure() method of every form I use, which is kinda painful. Writing this in the BaseForm is a good idea, but the problem is that ModelForm & BaseModelForm don't...

Can't select day 8 and 9 in datepicker plugin for Symfony (sfFormExtraPlugin)

Hi, I am currently using the JQuery plugin Datepicker in my Symfony project with the sfFormExtraPlugin. Everything is working fine but there is a seems to be a strange bug in the plugin. If I select 8 or 9 in any month the day is not selected in the form. The month and year work correctly but the day is not selected. The plugin works co...

problem with image paths using sfFacebookConnect on a facebook app

using FBML my app is giving the following error: HTML error while rendering tag "img": Relative URLs not allowed here The same thing happened to me when working on apps not in symfony and the easiest solution was to just include the absolute url in either hard code or a constant. Does anyone know any more elegant solution using symfo...

How do you override your team's default databases.yml in Doctrine for using your local settings?

Looking for a way to cleanly override the values of databases.yml in Doctrine / Symfony in order to use my own local settings? The idea is not touching databases.yml and using some sort of local unversioned file to override that default. I'm trying to find out how without much success yet :/ ...

Retrieve related objects with Doctrine and Symfony

I searched for a long time, but I don't manage to retrieve two related object in one query. I am using Doctrine and Symfony (uses Doctrine by default). Here is a part of my schema.yml: Member: columns: ...some fields... Report: columns: member: { type: integer, notnull: true } ...some fields... relations: M...

Using routes to generate URLs in a Symfony task

I am running Symfony 1.3.6 on Ubuntu 10.0.4 LTS. I have written a Symfony task that generates a report which contains links (URLs). Here is a snippet of the execute() method in my task class: protected function execute($arguments = array(), $options = array()) { //create a context sfContext::createInstance($this->configura...

Need help with: Couldn't call Doctrine_Core::set()... symfony 1.4 fixture

I keep getting: Couldn't call Doctrine_Core::set(), second argument should be an instance of Doctrine_Collection when setting one-to-many references. This happens when I include data for 'asset' in the 'Upload' table in my fixture. See part of the schema.yml below: detect_relations: true options: collate: utf8_general_ci char...