[symfony-users] Re: sfGuard backend/admin module for managing users

2009-09-15 Thread Alexandru-Emil Lupu
comment at the bottom On Tue, Sep 15, 2009 at 8:53 AM, Alexandru-Emil Lupu gang.al...@gmail.comwrote: HI! yes ... is possible but, you'll need to make some modifications to sfGuardPluigin. Add something like: public function executeEdit(sfWebRequest $request) { $this-form1 = new

[symfony-users] Assign value to form fields

2009-09-15 Thread mirfan
Hi, I have a form and i want to assign value to its field from my action.class.php like $this-form['first_name'] = 'Micheal'; but its give me error how i will handle it? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

[symfony-users] Re: Assign value to form fields

2009-09-15 Thread Sid Bachtiar
Try: $this-form-setValue('first_name', 'Michael'); or use this instead to set default value $this-form-setDefault('first_name', 'Michael'); On Tue, Sep 15, 2009 at 6:51 PM, mirfan m.irfa...@gmail.com wrote: Hi, I have a form and i want to assign value to its field from my

[symfony-users] Re: sfGuardUser restrict access only to certain modules

2009-09-15 Thread Kieu Anh Tuan
Hi, credentials set in security.yml is actually evaluated by permissions in symfony. Therefore, you have to assign permission(s) to your group of user then restrict your actions by group via its permission(s). In your case, create a permission, for example, selling_group_permission then assign it

[symfony-users] plugin js css

2009-09-15 Thread smellycat37
Hi, I'm trying to make my first own plugin... I've got some js and css required in this plugin... so, I put them in the directory /plugings/ myPluging/web/js/ /plugings/myPluging/web/css/... In the /plugings/ myPluging/config/view.yml I call them... That's a part of the view.yml : default:

[symfony-users] Can be sfTestBrowser used in non-symfony project?

2009-09-15 Thread Zap
If so, how to configure it? If not, does any so awesome functional testing tool exists? Thank you for tips. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to

[symfony-users] Re: Put message from forward404() into template

2009-09-15 Thread rooster (Russ)
On Sep 15, 6:34 am, Casey casey.cam...@gmail.com wrote: I haven't tried this, but since it is a forward, can you set a request attribute that can be accessed by the 404 action? That's pretty much what I was getting at! The problem is still that you'd have to set it before calling one of the

[symfony-users] Re: Put message from forward404() into template

2009-09-15 Thread Davide Borsatto
I think a flash message for the user object would do the job --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe

[symfony-users] Re: plugin js css

2009-09-15 Thread Alexandru-Emil Lupu
when you have some css or js for a pluging you usually can create a symlink called NamePlugin from your pluginName/web dir into the web dir ex: plugins/ NamePlugin/web/ plugins/ NamePlugin/web/js plugins/ NamePlugin/web/css ln -s plugins/NamePlugin/web web/NamePlugin and your web interface

[symfony-users] Re: plugin js css

2009-09-15 Thread david
Putting the files into the plugin web/js web/css directories and then using the publish-assets task should put the files into the appropriate directories for you - symlinking shouldn't be needed. On Tue, 15 Sep 2009 12:14:41 +0200, Alexandru-Emil Lupu gang.al...@gmail.com wrote: when

[symfony-users] Ajax queuing behaviour driving us mad

2009-09-15 Thread Gareth McCumskey
Hi all, We have encountered an odd problem that I believe should not be happening. Let me try and describe it as best I can. We have a symfony developed application using the Prototype javascript library. One of our pages (and others) make multiple ajax calls on load. Basically we have a few

[symfony-users] Re: Ajax queuing behaviour driving us mad

2009-09-15 Thread Sid Bachtiar
It is most likely due to PHP session locking: http://nz2.php.net/manual/en/ref.session.php#64525 On Tue, Sep 15, 2009 at 11:45 PM, Gareth McCumskey gmccums...@gmail.com wrote: Hi all, We have encountered an odd problem that I believe should not be happening. Let me try and describe it as

[symfony-users] Re: Ajax queuing behaviour driving us mad

2009-09-15 Thread Gareth McCumskey
Thanks, looking at that link it seems to be exactly what we are experiencing. Would you know a way we could turn that session locking off within symfony? I am not too fond of the example given in that link. On Tue, Sep 15, 2009 at 1:57 PM, Sid Bachtiar sid.bacht...@gmail.comwrote: It is most

[symfony-users] Re: Ajax queuing behaviour driving us mad

2009-09-15 Thread Sid Bachtiar
It's not Symfony, it's PHP session thing. But this issue is not unique to PHP either. Basically we have a few div's on one page that needs to be populated with the ajax returns. What seems to be happening though is instead of each You really need to just have one ajax call per event

[symfony-users] Re: Ajax queuing behaviour driving us mad

2009-09-15 Thread Gareth McCumskey
We have seperate actions that are called per section on our page and each section recieves seperate responses from the ajax calls to display its own data. This is also because each section periodically updates at different times On Tue, Sep 15, 2009 at 2:18 PM, Sid Bachtiar

[symfony-users] Re: Ajax queuing behaviour driving us mad

2009-09-15 Thread Gareth McCumskey
Well we actually fixed the solution by using session_write_close() at the beginning of the actions responsible for pulling data from the server and that DO NOT write session data so that it will unlock session as soon as the controller passes execution to the action for that ajax call. THis way

[symfony-users] Re: Issue with url_for()

2009-09-15 Thread Christoph Häckel
MrGlass, The link has a slug at the end. The slugify function is part of a different class, which has a different file and location. I had missed this file when I went through things fixing the encoding. I just Switched it to utf8 without bom, and I no longer get random chars. Glad you

[symfony-users] Doctrine 1.1 generate-migration-diff task

2009-09-15 Thread Amo__
Hi, I just upgrade my project to Doctrine 1.1 because i really need the generate-migration-diff task that comes with doctrine 1.1 But now, with symfony 1.2.9 DEV i really don't know how to generate these migrations classes. I tried to generate a task that does :

[symfony-users] Re: how to get current login user id in my commonclass??

2009-09-15 Thread Oliver Jackson
Avani wrote: Hello Everyone, I have one common class for my own functions and I have stored it in lib/common.class.php My problem is, how to get current login userid from that class? I tried 1. $this-getUser()-getProfile()-getUserId(); 2. $sf_user-getProfile()-getUserId(); Try:

[symfony-users] sfvalidatordoctrineunique and admin generator: unicity on multiple columns

2009-09-15 Thread waouf
Hi all, I'm getting in trouble using sfvalidatordoctrineunique (Symfony 1.2.8, Doctrine, Ubuntu). This method validates the uniqueness of a column. According to API (http://www.symfony-project.org/api/1_2/ sfValidatorDoctrineUnique), we should be able to add several fields in options (columns

[symfony-users] random segmentation fault when running unit test with doctrine

2009-09-15 Thread JoeZ
When running unit test (lime) it randomly throws a segmentation fault (even if the test is successful). Consequently, when running abridged tests I get (also randomly) this annoying dubious state message. JoeZ# ./symfony test:unit model/Invoice 1..46 # Totals checks ok 1 - we have created an

[symfony-users] sfWidgetFormDoctrineChoice - parameters for table_method

2009-09-15 Thread andrea cecchetto
Hi guys, I need to pass some parameters to Option table_method on sfWidgetFormDoctrineChoice. Something like this 'l' = new sfWidgetFormDoctrineChoice( array( 'model' = 'Categoria', 'add_empty' = ' ',

[symfony-users] Re: random segmentation fault when running unit test with doctrine

2009-09-15 Thread Eno
On Tue, 15 Sep 2009, JoeZ wrote: JoeZ# ./symfony test:unit model/Invoice 1..46 # Totals checks ok 1 - we have created an Invoice which contains 3 items ok 2 - getBase() == 224.98 ... ok 44 - getNextNumber of ASET- invoices will be 10 ok 45 - getNextNumber of BSET- invoices will be

[symfony-users] Re: Ajax queuing behaviour driving us mad

2009-09-15 Thread david
Just as you can play to the strengths and weaknesses of databases by putting the data and logging files on different disks/busses - you can also use different techniques for session storage. Creating and using a ram disk for session storage is one approach as is using something like

[symfony-users] Re: PropelException on Symfony 1.2: SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for integer:

2009-09-15 Thread Luis Nabais
My form code: ? echo form_remote_tag(array( 'update' = array('success' = 'listEntities', 'failure' = 'create_form'), 'url' = 'mbmkt_entity/update', )) ? table class=tableForm cellpadding=0 cellspacing=0 ? echo $form; ? ? echo $form-renderGlobalErrors() ? ?

[symfony-users] Re: Doctrine 1.1 generate-migration-diff task

2009-09-15 Thread david
From the cli - look at the doctrine:generate-migration* tasks. On Tue, 15 Sep 2009 16:14:37 +0200, Amo__ amaurylerouxdel...@gmail.com wrote: Hi, I just upgrade my project to Doctrine 1.1 because i really need the generate-migration-diff task that comes with doctrine 1.1 But now, with

[symfony-users] Re: random segmentation fault when running unit test with doctrine

2009-09-15 Thread JoeZ
Eno. txs for the tip, I've run that, although there's not much I can use there. I post it here the ending lines of the log just in case write(1, \33[32;1mok 46\33[0m - getNextNumber..., 70) = 70 _llseek(1, 18446744073709551615, 0xbf905330, SEEK_SET) = -1 ESPIPE (Illegal seek) ioctl(1,

[symfony-users] Re: shouldn't a lack of an id in a form get some kind of error?

2009-09-15 Thread Richtermeister
Jey Jake, if the error is with a field that you're not rendering, you wouldn't see it. Also, you're not rendering global errors and hidden fields from what I can see.. Try just printing the entire form ( echo $form; ) and see if you see where the error lurks, and work backwards from there.

[symfony-users] Re: Put message from forward404() into template

2009-09-15 Thread Casey
To automate the process you could make a myactions.class.php file in the lib dir that extends sfActions then change all of the actions under your modules folder to inherit from myactions. Then create a forward404WithMessage($msg) function that automatically sets the msg as an attribute, say

[symfony-users] Re: PropelException on Symfony 1.2: SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for integer:

2009-09-15 Thread Casey
Sounds like there is something that is defined wrong in your schema file, can you post it? The actions look clean from what I can tell. On Sep 15, 8:21 am, Luis Nabais luisnab...@gmail.com wrote: My form code: ? echo form_remote_tag(array(     'update'   = array('success' = 'listEntities',

[symfony-users] Re: plugin js css

2009-09-15 Thread david
Aye. I was thinking more that it's better to use the task than to do it by hand. It helps ensure it's repeatable when moving to prod. On Tue, 15 Sep 2009 17:47:54 +0200, Richtermeister nex...@gmail.com wrote: On linux systems the plugin:publish-assets task will actually do a symlink by

[symfony-users] Re: sfWidgetFormDoctrineChoice - parameters for table_method

2009-09-15 Thread sikk
The best suggestion would be to create your own widget, and just apply the patch to it. The old one will still be supported, then the new one will have his own name. good luck. On Sep 15, 10:50 am, andrea cecchetto andrea.cecche...@gmail.com wrote: Hi guys, I need to pass some parameters to

[symfony-users] Re: Can be sfTestBrowser used in non-symfony project?

2009-09-15 Thread Florian
Hi, they are talking about coupling whith symfony here : http://www.symfony-project.org/installation/1_2/upgrade#Browser sfBrowserBase: The base browser class. It knows nothing about symfony, except classes from the symfony platform. Hope it helps ! On Sep 15, 10:38 am, Zap

[symfony-users] Re: random segmentation fault when running unit test with doctrine

2009-09-15 Thread Eno
On Tue, 15 Sep 2009, JoeZ wrote: Eno. txs for the tip, I've run that, although there's not much I can use there. I post it here the ending lines of the log just in case write(1, \33[32;1mok 46\33[0m - getNextNumber..., 70) = 70 _llseek(1, 18446744073709551615, 0xbf905330, SEEK_SET) = -1

[symfony-users] Custom SQL Select Column and Populated Objects

2009-09-15 Thread Zach
I have a raw sql query that selects all the columns in a table plus a custom column (distance). I then use TablePeer::populateObjects() to get my array of table objects. This works fine, but I don't know how to get the custom column. function inradius($lat,$lon,$radius){ $connection =

[symfony-users] many to many relationships at admin not working

2009-09-15 Thread dagger
Hi, I'm trying to implement the many to many relation between Role and Permission ... but the admin_check_list is not appearing ... i am using symfony 1.2 ... the structure follows schema.yml permission: id: method_name: { type: VARCHAR, size: 50, required: true } action_name:

[symfony-users] Get the values of other fields from a validator

2009-09-15 Thread miguelSantirso
From a normal validator, is it possible to get the values of the other fields submitted with the form? I need this because I want to set the name of a file according to the name of the object uploaded (the name is a different field of the same form). At first, I thought it would be easy with the

[symfony-users] Re: mod_rewrite

2009-09-15 Thread Eno
On Tue, 15 Sep 2009, sannaide wrote: I've used .htaccess provided by default when you create a symfony project and it works pretty well in conjunction with settings.yml - no_script_name. But, my boss asked me not to see http://[HOST]/[PROJECT]/web/[APPLICATION] but only requests to

[symfony-users] Re: many to many relationships at admin not working

2009-09-15 Thread Abraham Montilla
Hello dagger, in the schema you have to add foreign keys to the third table, in Doctrine would be something like Permission: columns: id: type: integer(4) primary: true notnull: true method_name: type: string(50) notnull: true action_name: type:

[symfony-users] Re: Custom SQL Select Column and Populated Objects

2009-09-15 Thread Kieu Anh Tuan
Hi, i recommend you to use DbFinderPlugin which is really useful with these kinds of custom query. On Sep 15, 2009 7:46 PM, Zach zach...@gmail.com wrote: I have a raw sql query that selects all the columns in a table plus a custom column (distance). I then use TablePeer::populateObjects() to

[symfony-users] sfDoctrineGuardPlugin schema options: collate charset

2009-09-15 Thread nord_ua
Is it possible to add options to tables: sfGuardGroup, sfGuardPermission, sfGuardUser? options: collate: utf8_unicode_ci charset: utf8 I'm using UTF8, so when I'm using DoctrineGuardPlugin and create some roles I got exception: SQLSTATE[HY000]: General error: 1267 Illegal mix of

[symfony-users] Re: many to many relationships at admin not working

2009-09-15 Thread Farrukh Abbas
changed the schema to the following (propel), but still no luck ... permission: id: method_name: { type: VARCHAR, size: 50, required: true } action_name: { type: VARCHAR, size: 50, required: true } role: id: name: { type: VARCHAR, size: 100, required:

[symfony-users] Re: Get the values of other fields from a validator

2009-09-15 Thread Casey
The only way I know to do this is to use sfValidatorSchema, which is an array of validators. I would create a validator that extends sfValidatorSchema and then use it as a post validator.But it sounds like the task you are trying to accomplish might not be the best job for a validator. I

[symfony-users] Re: many to many relationships at admin not working

2009-09-15 Thread Abraham Montilla
i think you actually did it, but... did you make the build-all-load command? and clear the cache only to see if helps. 2009/9/15 Farrukh Abbas strategy.vs.lo...@gmail.com changed the schema to the following (propel), but still no luck ... permission: id: method_name: { type:

[symfony-users] Re: how to get current login user id in my commonclass??

2009-09-15 Thread Avani
Hi Olly, Thanks a lot.. It's working :) On Sep 15, 4:29 pm, Oliver Jackson ojack...@valleyt.co.uk wrote: Avani wrote: Hello Everyone, I have one common class for my own functions and I have stored it in lib/common.class.php My problem is, how to get current login userid from that

[symfony-users] Disable create button from backend

2009-09-15 Thread Avani
Hi All, I have one functionality in backend for edit contents of static pages. In which, pages are fixed. Admin no need to create new pages. He can only change content of the existing pages. But I dont know how to disable create button on listing page. Can anybody help me please? Thanks in