[symfony-users] Re: how to JOIN TABLE for better performance?

2010-04-23 Thread Tom Ptacnik
An example how to do this is in Practical Symfony jobeet 1.4 (doctrine), but I don't remember the chapter.. On 21 dub, 15:11, comb sa...@gmx.net wrote: Hi Tables: Gig, Song and GigSong (many-to-many). I use a pager and in executeIndex I set up the Query:                 $q =

[symfony-users] SF2.0 symfony command

2010-04-23 Thread Sameer I
Hi All, Is symfony command same on 2.0 as it is in 1.4? -Sam -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send

[symfony-users] Re: autogenerated id columns

2010-04-23 Thread Tom Ptacnik
You need some primary key ... so mark some column as primary and it woun't be autocreated. On 21 dub, 16:43, Tofuwarrior p...@clearintent.co.uk wrote: Is it possible to stop symfony/propel autogenerating id columns in my tables? I have the following schema and don't want id columns on the

Re: [symfony-users] Re: AJAX with symfony 1.4

2010-04-23 Thread tasse Dethe
Hello, thanks for this answer, i will try it and give some feedback 2010/4/23 Antoine S. antoine.spodobal...@gmail.com Hi, That's what I do : First make it work without ajax and use partial in your template. Example : action: executeMyForm() template: myFormSuccess().php // what you

[symfony-users] Re: foreign key relations in admin generator

2010-04-23 Thread Tom Ptacnik
I see your schema and there is a relation 1:N, but I think badly specified - i think it should be - Ristorante has 1 ZoneCitta, ZonneCitta has N Ristorantes if so then you have to specify the relation under the Ristorante Ristorante: ... relations: ZoneCitta: local: zona foreign:

[symfony-users] Re: frontend: get labels (not id) from child tables

2010-04-23 Thread Tom Ptacnik
Responded in http://groups.google.com/group/symfony-users/browse_thread/thread/94c37bf0a9a26a1 On 22 dub, 10:23, SatBoy78 bruno.mat...@gmail.com wrote: thanks tom... I've got these tables: Ristorante:   connection: doctrine   tableName: ristorante   columns:     id:       type:

[symfony-users] Re: how to JOIN TABLE for better performance?

2010-04-23 Thread comb
The only similar performance opimization I found in jobeet is the table_method in the backend, but that's not what I'm searching for, since I have three tables where one is the relation table, from which I need meta-data for ordering.. On 23 Apr., 08:32, Tom Ptacnik to...@tomor.cz wrote: An

Re: [symfony-users] noob url variable question

2010-04-23 Thread Gareth McCumskey
Or rather $request-getParameter('item'); FYI, you don't need special routing settings for parameters in the URL. A URL like module/action/parameter1/value, I can get the value of parameter1 in my action by doing: $value = $request-getParameter('parameter1'); The best part about symfony's

RE: [symfony-users] doSelect array result converted to ArrayDecorator in template

2010-04-23 Thread NOOVEO - Christophe Brun
In your template, the real array in $var is protected (for output safety purposes) by an sfOutputEscaperArrayDecorator. You can still access to the original (array) data with $var-getRawValues(). -Message d'origine- De : symfony-users@googlegroups.com

Re: [symfony-users] Re: doSelect array result converted to ArrayDecorator in template

2010-04-23 Thread Daniel Lohse
What you are seeing is the automatic output escaping in action. Turn it off, look in the docs on how to deal with this or just do $sf_data- getRaw('varName'); Cheers, Daniel Sent from my iPhone On Apr 23, 2010, at 12:21 AM, Joshua houseaddi...@gmail.com wrote: damnit. Restricted at every

Re: [symfony-users] doSelect array result converted to ArrayDecorator in template

2010-04-23 Thread Gareth McCumskey
You shouldn't be unsetting in your templates. Symfony wraps data sent to the template from the action in that sfOutputEscaperArrayDecorator object as a security measure against all sorts of injection attacks. You can still foreach through your array however and display that data... Maybe if you

Re: [symfony-users] Re: doSelect array result converted to ArrayDecorator in template

2010-04-23 Thread Gareth McCumskey
Doing that however, negates all the protection that the sfOutputEscaperArrayDecorator object gives you and is really not recommended. In fact if you have to do that then you should rather find another way. It will be more work to secure the output that sfOutputEscaperArrayDecorator provides

[symfony-users] Where to store class files (project level vs. app level, vs. module level)

2010-04-23 Thread Richtermeister
Hi all, This is more of an aesthetic question.. In most tutorials/examples/apps I see written in symfony, all class files are stored in the project/lib data. For the model layer I see that that's a good central spot, however, I often have forms or filters that are really only applicable to one

Re: [symfony-users] Where to store class files (project level vs. app level, vs. module level)

2010-04-23 Thread Denis Golovin
I think that all tutorial examples assumes that you have only two applications: frontend and backend (or even single frontend). Obviously, if you have three or more applications - it will be better, if you put application classes separately. I'm not so sure about modules, but application level

[symfony-users] Re: autogenerated id columns

2010-04-23 Thread Tofuwarrior
awesome, thanks. On Apr 23, 8:03 am, Tom Ptacnik to...@tomor.cz wrote: You need some primary key ... so mark some column as primary and it woun't be autocreated. On 21 dub, 16:43, Tofuwarrior p...@clearintent.co.uk wrote: Is it possible to stop symfony/propel autogenerating id columns

[symfony-users] routing creates variable value true when no trailing slash

2010-04-23 Thread Tofuwarrior
Hi all, I guess this is simple lack of understanding but it is a bit peculiar. Any insights, answers pointers to further readng gratefully received. I haven't found any answers in the docs anywhere. In my app, this .com/folder/tree/id creates request variable id=boolean(true) whereas this

Re: [symfony-users] routing creates variable value true when no trailing slash

2010-04-23 Thread Gareth McCumskey
Look at this piece of code: $a = 1; $b = 0; if ($a == true) echo I am true if ($b == false) echo I am false results in I am true and I am false both being echoed. However: if ($a === true) echo I am true if ($b === false) echo I am false does not On Fri, Apr 23, 2010 at 11:15 AM, Tofuwarrior

[symfony-users] Re: foreign key relations in admin generator

2010-04-23 Thread SatBoy78
Hi, thanks a lot for your suggestions... in fact I need a 1:N relation I've tried to use your hints, but when I make a build --all I've got an error: symfony can't recognize localAlias I've searched localAlias on symfony documentation, but I can't find it What's wrong? thanks On 23 Apr, 09:29,

[symfony-users] Re: Multiple actions in one page

2010-04-23 Thread Poltasi Risom
Yes, component template is as you described (is showing aside) modules/miembros/templates/_signin.php form action=?php echo url_for('miembros/aux?submit=signin') ? method=post ?php echo $form['email_address']-renderLabel() ? ?php echo $form['email_address'] ? ... but when you

Re: [symfony-users] Re: AJAX with symfony 1.4

2010-04-23 Thread tasse Dethe
Re, so i made a partial as you said, this is my code input type=text class=ajax name=ajax value=Hello onclick=ajaxrefresh() / I just want the text on the button to be refrehed by ajax... this is my js file : function ajaxrefresh() var value = $(#ajax).val(); $.post(ajax/ajax, {myParam :

[symfony-users] Re: How to access generator.yml variables in view ?

2010-04-23 Thread John
Hi Pabz, Thanks for your answer. Apparently I'm not clear : What I'd like to do is to show the value of the list title from the generator.yml file in the layout. So my question is : how can I get a generator.yml variable and put it in the view ? Thanks again, John On 23 avr, 05:10, Pabz

Re: [symfony-users] How to access generator.yml variables in view ?

2010-04-23 Thread Richard U
sfConfig::get On Fri, Apr 23, 2010 at 10:30 AM, John drskulls...@gmail.com wrote: Hi, I'm trying to access the list title and put it in the view. The variable is in generator.yml.    config:      actions: ~      fields:  ~      list:        title: My events I'd like to put the title

Re: [symfony-users] Re: doSelect array result converted to ArrayDecorator in template

2010-04-23 Thread Daniel Lohse
I wasn't implying to completely turn it off but I'm afraid it came out as such. Sometimes it's good to see results and then look how to deal with the output escaping. It's all in the docs, is what I'm saying. :) Daniel On 23.04.2010, at 09:59, Gareth McCumskey wrote: Doing that however,

Re: [symfony-users] Re: Multiple actions in one page

2010-04-23 Thread Javier Garcia
On 04/23/2010 11:43 AM, Poltasi Risom wrote: but when you failed to login action would show the form in the main area In my way, if the user fails logging, the form is showed in the main area (miembros/aux). Or maybe i don't understand you.. Thanks Daniel your way works! -- If you want

[symfony-users] Re: Frontend // pager or filter display issue

2010-04-23 Thread ziclo
No ideas about this issue ? Help would be very appreciated. Thank you On 27 mar, 22:06, ziclo lauren...@gmail.com wrote: Hello, I use the admin generator actions and others methods for my frontend (i just copied actions and classes). My problem is that when i use the filter in order to get

[symfony-users] Re: routing creates variable value true when no trailing slash

2010-04-23 Thread Tofuwarrior
Hi gareth, Thanks for replying (again!) I understand about the difference between == and === and that that must be what is causing retrieveByPK to return this but what I don't get is why id is being set to true when there is no value being passed in the url so I guess my question is about

[symfony-users] Re: noob url variable question

2010-04-23 Thread Tofuwarrior
Yes, that kicks ass! On Apr 23, 8:43 am, Gareth McCumskey gmccums...@gmail.com wrote: Or rather $request-getParameter('item'); FYI, you don't need special routing settings for parameters in the URL. A URL like module/action/parameter1/value, I can get the value of parameter1 in my action

[symfony-users] stupid question about securing backend with sfGuard?

2010-04-23 Thread Tofuwarrior
Hi, I've followed through the sfGuard installation and have used it fine for the front end. Now I have enabled it in the backend and set default: is_secure: true in the backend but it displays a page saying this page is not public and saying I need to login in the login form This isn't

Re: [symfony-users] stupid question about securing backend with sfGuard?

2010-04-23 Thread safa boubekri
hi try to create administator symfony guard:create-user admin admin symfony guard:promote admin i had the same problem after this it's resolved -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because

Re: [symfony-users] stupid question about securing backend with sfGuard?

2010-04-23 Thread Gábor Fási
sfGuardAuth is the module that handles the authentication and authorization, you'll need to enable that as well. The other modules are to manage the users, the permissions, etc. On Fri, Apr 23, 2010 at 15:56, Tofuwarrior p...@clearintent.co.uk wrote: Hi, I've followed through the sfGuard

[symfony-users] Re: noob url variable question

2010-04-23 Thread bklshblues
Awesome, thanks guys. This helps a lot! On Apr 23, 9:01 am, Tofuwarrior p...@clearintent.co.uk wrote: Yes, that kicks ass! On Apr 23, 8:43 am, Gareth McCumskey gmccums...@gmail.com wrote: Or rather $request-getParameter('item'); FYI, you don't need special routing settings for

[symfony-users] Routing + action : object lost in translation

2010-04-23 Thread NOOVEO - Christophe Brun
Ladies and gentlemen, I'm having again some trouble with the routing in symfony and I'm stuck. Any help would be appreciated. Here is the problem : 1/ My logs shows the following line, indicating that the url clicked is parsed : Apr 23 15:50:02 symfony [info] {sfPatternRouting} Match route

RE: [symfony-users] Routing + action : object lost in translation

2010-04-23 Thread NOOVEO - Christophe Brun
Well, after all I found the solution : it's a mismatching in the columns names : in the VitrineParagraph model, the key is 'id', not 'id_paragraphe'. Sorry... De : symfony-users@googlegroups.com [mailto:symfony-us...@googlegroups.com] De la part de NOOVEO

[symfony-users] Re: :-( please help. ajax problem - noob to ajax -probably simple

2010-04-23 Thread Massimiliano Arione
On 21 Apr, 15:14, Paul Burdon p...@clearintent.co.uk wrote: Could you clarify what the 'proper' way is please. Thanks. Of course. The proper way is to write html as if javascript wouldn't exist. Then, write javascript files that use the document load event to look into dom, modify the dom

Re: [symfony-users] Re: Multiple actions in one page

2010-04-23 Thread Javier Garcia
Hi again, I have a new way. This time the form is not processed by the component but by the action, so no problem this time to use redirect(). What's your opinion? modules/miembros/actions/actions.class.php |public function executeAux(sfWebRequest $request) { return

[symfony-users] Re: How to access generator.yml variables in view ?

2010-04-23 Thread Richtermeister
If you're already inside the generated module, you should have access to the configuration class. that should contain all the info from the generator.yml. Daniel On Apr 23, 3:04 am, John drskulls...@gmail.com wrote: Hi Pabz, Thanks for your answer. Apparently I'm not clear : What I'd like

Re: [symfony-users] Re: routing creates variable value true when no trailing slash

2010-04-23 Thread Gareth McCumskey
My simple guess is that module/action/id tells symfony that id is a parameter with its own value defaulted to false (kinda just to show it exists) whereas module/action/id/ tell symfony that id is a parameter and there is a value of for it (because nothing follows the trailing slash. In short,

Re: [symfony-users] Re: :-( please help. ajax problem - noob to ajax -probably simple

2010-04-23 Thread Gareth McCumskey
Massimiliano is right, but the right way or best paractices as it is known tends to be a moving goal post. When we started work on one of our large projects, embedded javascript (i.e. javascript on a link as an onClick event) wasn't seen as odd or strange. Now, its considered best practices to

[symfony-users] sfDoctrineGuardPlugin with sfGuardForgotPassword + sfGuardRegister

2010-04-23 Thread Anthony
Is there a way to change the settings of a module without actually updating a file in the module directory? I am using the sfDoctrineGuardPlugin which seems to have the sfDoctrineGuardExtraPlugin rolled into it, but the config/security.yml file for both sfGuardForgotPassword and sfGuardRegister

[symfony-users] Doctrine innerJoin doubt

2010-04-23 Thread fRAnKEnSTEin
Hi, 1) I have this DB schema: Reservation: columns: name: { type: string(255), notnull: true } email: { type: string(255), notnull: true } commets:{ type: string(500), notnull: true } ReservationDetail: columns: