symfony

Global component in Symfony

I am currently implementing the navigation of the website (multilevel menu, having current page highlighted). As navigation part will be included for virtually all modules, I first made it a global partial. But logic for selection of "current page" is quite complicated in some situations, I am thinking of using a component for the naviga...

Lighttpd configuration, . (dots) in my query string cause 404

Hi, I have an address on my site like so: http://www.example.com/lookup?q=http%3A%2F%2Fgigaom.com%2F2010%2F10%2F10%2Fangry-birds-for-windows7-phone-dont-count-on-it%2F In this example, the dot in the 'gigaom.com' part of the query string is screwing with lighttpd and my rewrite rules. I get a 404 with the dot in, no 404 if I take the d...

How to use wildcard in Symfony's url_for helper?

Given in routing.yml: products: url: /products/* param: { module: products, action: index } How to fill wildcard part using url_for helper? I mean somthing like: <?= url_for('products/index?wildcard=somthingRandom') ?> that generates URL: /products/somethingRandom ...

symfony/propel: question about i18nTable and modules generated in the backend.

Hi, in Jobeet there is this part below of the schema: jobeet_category: _attributes: { isI18N: true, i18nTable: jobeet_category_i18n } id: ~ jobeet_category_i18n: id: { type: integer, required: true, primaryKey: true, foreignTable: jobeet_category, foreignReference: id } culture: { isCulture: true, typ...

Export more than one pdf generated one the fly as zip using the symfony framework.

Hi there, Iam currently working on an symfony app that needs to be able to output some documents as pdf, which is no problem at all using TCPDF. What I try to do now is to generate a zip file containing one ore more of these pdf´s generated on the fly. What I basically do is (using php´s) zip library: 1.) Create a new zip archive. 2.)...

Symfony Unit Test Won't load app_ globals

I'm attempting to create a unit test for my app in Symfony. My /config/app.yml looks like this: all: tmp_dir: "tmp" # usps usps_username: xxxxx usps_password: xxxxx usps_dir: usps in the unit test, when I run something like: $t->comment(sfConfig::get('app_usps_username')); It will just output and empty line. What's goin...

The module "taggableComplete" is not enabled

I'm trying to add the tag widget from the plugin sfDoctrineActAsTaggablePlugin I've added "_tag" to my configuration.yml, and in _tag.php I wrote : <?php include_component('taggableComplete','tagWidget', array('object' => $form->getObject())) ?> But all I get now is the following error : "The module "taggableComplete" is not en...

How to configure symfony when using apache

Please help, how do I configure apache (wamp) in windows when I want to use symfony as my php framework, I followed the guide(pdf) from the symfony site. But I end up with this when I access http://127.0.0.1:8080/: But I end up with this, when I try to access http://localhost/sfproject/web/frontend_dev.php What is the correct url to a...

Symfony 1.4 - forward404 pass message to error404 template in production mode

In my app I want to use $this->forward404("Data not found"); to output individual error messages when necessary. In the dev mode it works fine. When I run my app in production mode - where debug is set to false in getApplicationConfiguration() - I don't get the messages anymore. in settings.yml I set a custom 404 action. all: .actions...

What's "wrong" with my DQL query?

I have the following SQL query: select bank.* from bank join branch on branch.bank_id = bank.id join account a on a.branch_id = branch.id join import i on a.import_id = i.id It returns exactly what I expect. Now consider the following two DQL queries: $q = Doctrine_Query::create() ->select('Bank.*') ->from('Ban...

Selecting certain fields using Propel select criteria

Hello, I am unable to find something like this in documentation provided for Propel Criteria in Symfony 1.4 The criteria, by default, is: $this->Merchantss = MerchantsPeer::doSelect(new Criteria()); However, this selects all the fields in the table for 'Merchants'. I would only like to select a couple, lets say: id, name, category. ...

Symfony fails on sfValidatorRegex

I'm using the following line: $this->validatorSchema['name'] = new sfValidatorRegex( array('pattern' => '<my_regex>', 'must_match' => false), array('invalid' => 'Invalid name')); But "must_match" option is not working and I don't know why. Whatever I use true or false, it works like always: detect the expression and if it's on the te...

symfony/propel: starting with propel schemas

Hi, i have this propel schema: comentario: id: author: varchar(255) content: longvarchar created_at: when i do "build-all-load" the classes (model, form, filter) are not created. But if i change add the _attributes key like this: comentario: _attributes: { phpName: Comment } id: author: varchar(255) c...

Symfony Doctrine skeleton files

I'm using Symfony 1.4 with the Doctrine 1.2 plugin. I would like to add some function to the Doctrine auto-generated models files (*Base.class.php). Thoses file are normally generated using "./symfony doctrine:build-model" command from the CLI. I know Symfony have a system of skeleton for every file generated from the CLI but I habe abs...

Propel ORM data fixtures

If I have a yml data fixture file called mydata.yml User: anonymous: nickname: anonymous first_name: Anonymous david: nickname: david first_name: David How do I tell propel where to find this file. Do I need to add any instructions to the build.properties and how do I run it to insert the data into the database ...

Doctrine Self Referencing is not working in Symfony 1.4 when updating or deleting

Hi there! I'm trying to build a model for content pages on my site, and i gave it a self reference named 'Related Page'. Now if i build my models and try to create a new page in the admin generator everything works fine. If i give the page a related page (or more) it works fine too, but if i go to the other page and try to edit the refe...

Indexing previous records with Doctrine (and Symfony!) with Zend Lucene

I have a Symfony application that uses Doctrine as its ORM. Based on Symfony's "Practical symfony" book, I have Zend Lucene added to my web app. However, the problem is that there are around 1.1 million rows existing in the database that I want to index for Lucene as well. The only things being indexed are edited rows and the rows have...

symfony: using generator.yml, is there any way to hide the fields of the i18n forms in the admin?

Hi, using generator.yml, is there any way to hide the fields of the i18n forms in the admin? Javi ...

Symfony 1.4 / Doctrine 1.2 - Converting module to a plug-in - Model behaviour weirdness.

Okay, please try to follow closely to understood the problem, it weird, I know. I'm converting a working module to plug-in and did run to weird problem. Here is the schema.yml Code: Categories: actAs: I18n: fields: [ name, description ] Timestampable: NestedSet: columns: na...

Enabling propel plugin in Netbeans for Symfony Php framework

I am new to Symfony framework. I got Symfony (v1.4.8) on my Netbeans 6.8 and also got the initial success page. Now, I want to Configure a database using Propel ORM Tool. But in Netbeans I am getting Doctrine as the default tool enabled. I am not even getting the PROPEL commands in my Run Commands window. I configured Netbeans for Symfo...