Re: [symfony-users] Public Accessible Code

2009-12-01 Thread Gareth McCumskey
You can package them as plugins. Then store each in its own repository in SVN. Then, you can use the plugin within a project by defining an svn:externals property to the repository where the plugin is stored. That way it makes it very easy to make bug-fixes etc to the plugin and update all

[symfony-users] Personal validator

2009-12-01 Thread cosmy
Hi all, i need to validate some fields of my form in a special way.. i don't want that some fields have the same value (the form fields are divided in groups, every group should contain differents answers). I don't know how to write an own validator.. is there documentation about it? -- You

[symfony-users] Re: Symfony 1.3 + sfGuard 4.0.0 Plugin

2009-12-01 Thread micon
RESOLVED - i used the wrong plugin! :-( The fact that there is a sfGuardPlugina SfDoctrineGuardPlugin is a little bit confusing for a symfony newcomer ;-) especially when doctrine is the standard orm in symfony 1.3, so one could assume that the sfGuardPlugin should contain support for

Re: [symfony-users] Public Accessible Code

2009-12-01 Thread Lee Bolding
On 1 Dec 2009, at 02:37, Paul Witschger wrote: I want to build some extras (plugins, add ons, whatever), that I can offer to clients. These add ons will be things like photo galleries, news article listings, blogs, etc. Check out (maybe in BOTH senses of the word...) the symfony plugins

[symfony-users] doctrine - Jonathan.Wage - what is wrong in my ticket ?

2009-12-01 Thread dziobacz
I couldn't set default value for sfWidgetFormDoctrineChoiceMany in relation many to many (not one to many), I asked here and nobody know so I created ticket here: http://trac.symfony-project.org/ticket/7712 Why my ticket is invalid ? -- You received this message because you are subscribed to the

Re: [symfony-users] Re: sfDoctrineGuard Plugin uses deprecated Stuff

2009-12-01 Thread Christopher Schnell
Thanks Fabien. David, it is working in the SVN Version now. Regards, Christopher. David schrieb: I also upgrade to 1.4 and when I use the sfGuardUser backend, it throws an error when I try to edit a user: Fatal error: Call to a member function setLabel() on a non-object in

Re: [symfony-users] doctrine - Jonathan.Wage - what is wrong in my ticket ?

2009-12-01 Thread Thomas Rabaix
When you work with a sfMODELform then the defaults are not used. If you want to set default value in this case, just set the value to the related object $u = new User; $u-my_default_value = 'asds'; $f = new sfUserForm($u) On Tue, Dec 1, 2009 at 10:28 AM, dziobacz aaabbbcccda...@gmail.com wrote:

[symfony-users] Problem with the new pager Iterator interface

2009-12-01 Thread Grégoire
I use the sfDoctrinePager class to paginate results. I've seen in the 1.3/1.4 what's new article that the pagers now implement the Iterator and Countable interfaces. I say cool, let's try it so I did that: ?php if (count($my_pager)): ? ... ?php foreach ($my_pager as $object): ? ?php

[symfony-users] Re: gmail problem

2009-12-01 Thread Grégoire
Edit your membership... http://groups.google.com/group/symfony-users/subscribe On Dec 1, 8:57 am, Ben Akacha Khalil akachakhalil@gmail.com wrote: How can I block mail symfony group because I always suppime the mail received? -- You received this message because you are subscribed to the

[symfony-users] ow to find out why is form not valid?

2009-12-01 Thread Hong Kil Dong
I've fallen into a strange trap - my form doesn't pass validation but neither form's fields nor calling $form-hasGlobalErrors() reports errors... How to find out what cause form validation to fail ? -- You received this message because you are subscribed to the Google Groups symfony users

[symfony-users] Re: doctrine - Jonathan.Wage - what is wrong in my ticket ?

2009-12-01 Thread dziobacz
But I can set default value for select list for id_book (model Books) or id_author (model Authors), but default value only doesn't work for authors_list or books_list: $this-setWidget('authors_list', new sfWidgetFormDoctrineChoiceMany (array( 'model' = 'Authors') )));

[symfony-users] propel. how to retrieve

2009-12-01 Thread g0d br
Hi, I dont even know how to ask that but i want to show what i need. my schema.yml category: id: ~ title: { type: varchar(100), required: true, index: unique } product: id:~ category_id: { type: integer, foreignTable: category, foreignReference: id, onDelete: cascade } name: { type:

[symfony-users] Create a many-to-many relation from sfGuardUser class (sfDoctrineGuardPlugin) to itself

2009-12-01 Thread tirengarfio
Hi all, I would like to create a many-to-many relation from sfGuardUser class (sfDoctrineGuardPlugin) to itself, but if i cant modify the plugin content, how should i make it? Bye Javi -- You received this message because you are subscribed to the Google Groups symfony users group. To post

[symfony-users] Where to clear the cache

2009-12-01 Thread Timmipetit
Hi everyone, I'm thinking about the following issue, where and how should the cache be cleared? Let's assume a scenario with 2 models: user and message. A message has a reference to a user. On the user-page (in the frontend) a partial is included that shows all the messages belonging to that

Re: [symfony-users] propel. how to retrieve

2009-12-01 Thread Gareth McCumskey
First, you will always have a category with at least one product because you have set cascade on delete. For the second part, in your CategoryPeer class: public static function getProductCountPerCategory() { //Get all categories $category_obj_arr = self::doSelect(new Criteria()); //Get

Re: [symfony-users] propel. how to retrieve

2009-12-01 Thread Dheeraj Kumar Aggarwal
hi for the first part, use this . $c = new Criteria(); $c-addJoin(ProductPeer::CATEGORY_ID, CategoryPeer::ID); $c-setDistinct(); $categories = CategoryPeer::doSelect($c); now the $categories variable contains the categories that have at least one product On Tue, Dec 1, 2009 at 5:58 AM,

Re: [symfony-users] move_uploaded_file with a twist

2009-12-01 Thread Gareth McCumskey
http://www.php.net/fopen Works on remote files too ;) On Mon, Nov 30, 2009 at 7:19 PM, Parijat Kalia kaliapari...@gmail.comwrote: Hey guys, I am making use of move_uploaded_file to upload a bunch of files from my website onto a server, as it goes:

[symfony-users] Re: ow to find out why is form not valid?

2009-12-01 Thread Hong Kil Dong
Yes, I have validator to each widget. Is there any error container in sfForm containing all form's errors, not only global ones ? On 1 дек, 15:10, Gareth McCumskey gmccums...@gmail.com wrote: I stand open to correction but I believe that ALL fields need to have a validator applied, even if

[symfony-users] Re: ow to find out why is form not valid?

2009-12-01 Thread Hong Kil Dong
Yes, I have validator to each widget. Is there any error container in sfForm containing all form's errors, not only global ones ? On 1 дек, 15:10, Gareth McCumskey gmccums...@gmail.com wrote: I stand open to correction but I believe that ALL fields need to have a validator applied, even if

[symfony-users] Re: ow to find out why is form not valid?

2009-12-01 Thread rooster (Russ)
On Dec 1, 2:10 pm, Gareth McCumskey gmccums...@gmail.com wrote: I stand open to correction but I believe that ALL fields need to have a validator applied, even if that validatoion is nothing. Just check that you have a validator applied to each form widget. On Tue, Dec 1, 2009 at 1:56 PM,

[symfony-users] Re: doctrine

2009-12-01 Thread rooster (Russ)
Antoine S. wrote: I used a lot with propel the possibilty to add a criteria to a generated function. Example : a product has categories, it will generate : public function getProductCategories($criteria = null, $con = null) { } and then I could easily refined with a criteria. But

[symfony-users] Firefox cache problem - routing

2009-12-01 Thread Guychmyrat Amanmyradov
Hello, Firefox caches my dynamic pages, it does not show my new messages. I have to press ctrl + f5 to see them. but if i can add a random parameter end of my url ff thinks i sent new data. so it shows my new messages. for a page i do not want to stop my all page cache. is there any way to add

Re: [symfony-users] Re: doctrine - Jonathan.Wage - what is wrong in my ticket ?

2009-12-01 Thread Jonathan Wage
Maybe this? $this-setDefaults(array( 'authors_list' = array(2) )); On Tue, Dec 1, 2009 at 7:52 AM, dziobacz aaabbbcccda...@gmail.com wrote: But I can set default value for select list for id_book (model Books) or id_author (model Authors), but default value only doesn't work for

[symfony-users] Problem with sfDoctrineGuardPlugin

2009-12-01 Thread Trailfinder
Hi All, Running latest svn of symfony 1.4 / latest svn (today) of sfDoctrineGuardPlugin. When running following command i get an error r...@ubuntu:/home/workstate/testpro# php -c /etc/php5/apache2 symfony doctrine:build-sql doctrine generating sql for models Notice: Undefined variable: e in

Re: [symfony-users] Problem with sfDoctrineGuardPlugin

2009-12-01 Thread Jonathan Wage
The undefined variable: e error is fixed now in SVN. - Jon On Tue, Dec 1, 2009 at 12:29 PM, Trailfinder beer...@gmail.com wrote: Hi All, Running latest svn of symfony 1.4 / latest svn (today) of sfDoctrineGuardPlugin. When running following command i get an error

[symfony-users] sfGuardAuth not registering routes in sf1.4?

2009-12-01 Thread Jonathan Dart
After upgrading to sf1.4 sfGuardUser/Group/Permission are not working for me. In settings.yml enabled_modules:[default, sfGuardGroup, sfGuardUser, sfGuardPermission, sfGuardAuth] When I go to sfGuardUser/index I get the following error: The route sf_guard_user_collection does not

[symfony-users] Getting crazy : how to add a widget (tinyMCE for ex.) on internationalized fields

2009-12-01 Thread poussain
Hi everybody. I can not manage to have both i18n and tinyMCE widgets on internationalised fields. If i put both, i will have internationalised fields for all my objects' fields, but no tinyMCE for them. I will have as much tinyMCE fields as i declared, but thew will not correspond to any

Re: [symfony-users] propel. how to retrieve

2009-12-01 Thread Daniel Lohse
This will get messy very fast. Imagine only 20 categories and for this simple count, you'll already have 20 queries. Not good. :( Normally, you'd do a count on the category_id column and group by the same category_id column. So simple in SQL/Doctrine but so hard in Propel. :( Daniel On

[symfony-users] Add column

2009-12-01 Thread Jordi
I'm using Postgresql and I'm trying symfony for migrate to it. But I can't do one think I believe it's basic. Modify database schema (for example adding a new column) without deleting tables. The only thing I found was a plugin (http://www.symfony-project.org/plugins/

[symfony-users] [Error] - Schema.yml (trying to implement a self-relationship)

2009-12-01 Thread ruigoncalves
Hi all! I have the following schema.yml file for my database definition: Section: actAs: I18n: fields: [name] columns: name: type: string(30) notnull: true color: string urlShortDesc: string Page: actAs: I18n: fields: [name,html,urlShortDesc]

[symfony-users] Re: ow to find out why is form not valid?

2009-12-01 Thread rekarnar
Make sure you are displaying your form after validation and not creating a new form (or forwarding or redirecting away). That form should have all the validation errors for you to see. On Dec 2, 12:56 am, Hong Kil Dong fetfru...@gmail.com wrote: I've fallen into a strange trap - my form doesn't

[symfony-users] Re: doctrine

2009-12-01 Thread Antoine S.
Thank you, but I think it s not possible for the generated getter methods. I think they are just alias to the function _get($fieldName, $load = true); On Dec 2, 3:30 am, rooster (Russ) russmon...@gmail.com wrote: Antoine S. wrote: I used a lot with propel the possibilty to add a criteria to

[symfony-users] Re: sfGuardAuth not registering routes in sf1.4?

2009-12-01 Thread charolastra
I can confirm this... I'm setting up a new project today and having to set the routes by hand. Is there a way to manually load them? I'm new to Symfony, sorry :-$ On Dec 1, 2:23 pm, Jonathan Dart jonathand...@gmail.com wrote: After upgrading to sf1.4 sfGuardUser/Group/Permission are not

Re: [symfony-users] propel. how to retrieve

2009-12-01 Thread g0d br
im sorry to hear that... but my next project i will start with doctrine for sure. Thanks all On Tue, Dec 1, 2009 at 12:23 PM, Daniel Lohse annismcken...@googlemail.comwrote: This will get messy very fast. Imagine only 20 categories and for this simple count, you'll already have 20 queries.

[symfony-users] Re: sfGuardAuth not registering routes in sf1.4?

2009-12-01 Thread Jonathan Dart
After upgrading sfDoctrineGuardPlugin to 4.0.0.1 things worked as expected. To do the upgrade I changed my ProjectConfiguration.class.php to point to sf`1.3, this allows the upgrade to work, then after you're done change it back to 1.4 and you should be good to go after a doctrine:build --all and

[symfony-users] Re: doctrine - Jonathan.Wage - what is wrong in my ticket ?

2009-12-01 Thread dziobacz
At least Jonathan Wage - good xD Unfortunately Jonathan this solution doesn't work :( I have tried that solution - Gregore gave me that solution few days ago in this thread: http://groups.google.com/group/symfony-users/browse_thread/thread/9f3a6aeef78e7212/5bb41b1d1609edce#5bb41b1d1609edce but it

Re: [symfony-users] Where to clear the cache

2009-12-01 Thread Lee Bolding
On 1 Dec 2009, at 13:46, Timmipetit wrote: Now let's say that messages will be created/edited/deleted in 2 modules in the frontend, and maybe also from the backend (or even a plugin). When this happens, the cached partial from that user should be deleted. The easiest way to do this in this

[symfony-users] semantic web

2009-12-01 Thread vegoigse
someone knows which parts I have to change if I need a semantic web. If I use xml, is it enough? -- You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group,

Re: [symfony-users] semantic web

2009-12-01 Thread Alexandre Salomé
Hum yes :) 2009/12/1 vegoi...@alumni.uv.es someone knows which parts I have to change if I need a semantic web. If I use xml, is it enough? -- You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to

Re: [symfony-users] Re: ow to find out why is form not valid?

2009-12-01 Thread Alexandre Salomé
In this case, remove your form template an do : echo $form You will see everything, especially : $form-renderGlobalErrors(); Alex' 2009/12/1 rekarnar rekar...@gmail.com Make sure you are displaying your form after validation and not creating a new form (or forwarding or redirecting

[symfony-users] Using routes in forms

2009-12-01 Thread Adrien Mogenet
Basically generated forms look like : form action=?php echo url_for('mymodule/'.($form-getObject()- isNew() ? 'create' : 'update').(!$form-getObject()-isNew() ? '?id='. $form-getObject()-getId() : '')) ? BUT because I'm using routes, I would like to use route to define my action=...

Re: [symfony-users] [Error] - Schema.yml (trying to implement a self-relationship)

2009-12-01 Thread Alexandre Salomé
You must define your subpage column on Page model. subpage: integer(4) Alexandre 2009/12/1 ruigoncalves skcra...@gmail.com Hi all! I have the following schema.yml file for my database definition: Section: actAs: I18n: fields: [name] columns: name: type:

Re: [symfony-users] Add column

2009-12-01 Thread Alexandre Salomé
Propel doesn't handle Migrations. Consider using raw SQL : ALTER TABLE ... ADD You can create a data/sql/migrations folder and use versionning : 1.0-to-1.1.sql It's the simplest way. 2009/12/1 Jordi jordi.roma...@gmail.com I'm using Postgresql and I'm trying symfony for migrate to it.

[symfony-users] unsubscrive

2009-12-01 Thread edem AMEWUAME
please my message is a administrator for symfony group please i would like to unsubscrive in this group please my compte is not a google compte please help me it is enough thanks _ A

Re: [symfony-users] Using routes in forms

2009-12-01 Thread Alexandre Salomé
We don't write such code, typically, a form like create/edit submit to the save action. The difference create/edit is done by checking the id parameter. Present ? Update ! Missing ? Create... If you are facing complexity in template, use a helper. Have a look at admin generated code, Alexandre

Re: [symfony-users] Getting crazy : how to add a widget (tinyMCE for ex.) on internationalized fields

2009-12-01 Thread Alexandre Salomé
Well, it's all OK, until you do : $this-widgetSchema['intro'] = new sfWidgetFormTextareaTinyMCE( At this time, you are not modifying existing widgets, you are creating new one. You should put this code in the MyObjectI18nForm. Symfony generates forms for I18N attributes. In your template :

Re: [symfony-users] Schema for a ticketing system

2009-12-01 Thread Alexandre Salomé
Relations are defined by (at less) 3 attributes : class, local, foreign. Read Doctrine Documentation ( on doctrine-project.org) about relations, your schema is missing some informations. Alex' 2009/11/29 Trailfinder beer...@gmail.com Hi All, Could somebody help me with a schema for a

Re: [symfony-users] funky select behavior

2009-12-01 Thread Alexandre Salomé
Hello, Your default value is English, so the widget #2 is OK the first one must inherits from your object value. Does your object method getLanguage returns Romanian by default ? Try debugging : $myObject = new Product(); echo $myObject-getLanguage(); Do you bind values to form ? Are

Re: [symfony-users] Re: CSRF form_tag questions

2009-12-01 Thread Alexandre Salomé
Huum, form_tag doesn't aim to create the form, or render CSRF fields, just ouput the form tag, add attributes if you are using files, method = POST... But nothing more than form ... Creation of the form must be done in controller. And in controller, you are OK to add CSRF 2009/11/30 Tommy

Re: [symfony-users] Firefox cache problem - routing

2009-12-01 Thread Alexandre Salomé
There is no option in routing, it's not the routing matter, but the cache matter. Check your cache.yml files, but it can also be the apache configuration... Disable your cache, and test it. Alexandre 2009/12/1 Guychmyrat Amanmyradov guychmy...@yahoo.com.tr Hello, Firefox caches my dynamic

[symfony-users] Re: Add column

2009-12-01 Thread dthomas-wwp
I use sfPropelSqlDiffPlugin, which adds a propel:build-sql-diff task. It works well, in general. There's some quirkiness to it though: If you're changing PKs or FKs, sometimes it's not able to figure out the right order of operations, so you may have to enter a loop of running the sql, running

Re: [symfony-users] Doctrine Query

2009-12-01 Thread Alexandre Salomé
Didn't understood your 2 methods to check result : 1. Executing MySQL with the console client (or PHPMyAmin, or other) 2. Executing with Doctrine Is it OK ? Give us more details, where do you execute it ? Have you checked your parameter ? How do you render/view the result of Only 1 is

Re: [symfony-users] Schema for a ticketing system

2009-12-01 Thread Parijat Kalia
Hey...if that is the exact replica of the schema in the YAML file, you are getting the identation wrong. It should be Ticket: actAs: basically, make sure u space out the columns twice after the table...other than that...put your column attributes in curly brackets such as id: {type:

[symfony-users] Re: sfGuardAuth not registering routes in sf1.4?

2009-12-01 Thread charolastra
Upgrading to 4.0.1 worked for me, thanks. It was also consistently failing in the sfGuardUser controller due to not enough memory, so I upped that in php.ini. On Dec 1, 4:39 pm, Jonathan Dart jonathand...@gmail.com wrote: After upgrading sfDoctrineGuardPlugin to 4.0.0.1 things worked as

[symfony-users] Re: CSRF form_tag questions

2009-12-01 Thread Tommy
I agree. That make sense as form =\= sfForm would you mind showing me an example of creating a CSRF added sfForm in actions.class.php. I am totally newbie in symfony. Thanks in advance. On Dec 2, 7:27 am, Alexandre Salomé alexandre.sal...@gmail.com wrote: Huum, form_tag doesn't aim to create the

Re: [symfony-users] Firefox cache problem - routing

2009-12-01 Thread Gareth McCumskey
Are you sure its Firefox? Have you tested this with other browsers? Your first step is to confirm if its the browser or not. If you get the same results within another browser then its the caching in your application affecting it. Your best bet then is to relook at how you are caching on your