[symfony-users] about i18n for template

2010-03-19 Thread Andy Cheung
Hello, I would like to ask if it is possible to return another language translation instead of the input when there is no translation for the user's current language. For example: in the template: ?php echo __('[HELLO]'); ? in a translation in 'en' trans-unit id=1

Re: [symfony-users] Unable to put sfGuardUser tables in a different database that the rest of the tables

2010-03-19 Thread Frank Stelzer
Mmh, i think the only chance getting this working is the way of defining a different db connection for all of your custom schema. So the propel connection would only point to the guard schema and your project schema to the rest. This would only work, when you do not use other plugins, which

[symfony-users] edit.yml not parsed admin generator 1.4

2010-03-19 Thread rernst
Hi, I just switched to doctrine and symfony 1.4. I have been using the admin generator udner 1.2 and propel without problems, having my validators in edit.yml. However, now with 1.4 and doctrine it appears the thing isn't even parsed so I have no table-driven means to validate it. Do I have to

[symfony-users] Re: relation between tables without onDelete

2010-03-19 Thread saki
thank you! where can I put the unlink row? On Mar 18, 7:35 pm, Lea Hänsenberger baerne...@gmail.com wrote: hi, there's still a partner with a foreign key pointing to the user you want to delete. you should first unlink the user from the partner: $partner-unlink('rmUser',$user_id); Then you

Re: [symfony-users] Re: relation between tables without onDelete

2010-03-19 Thread Lea Hänsenberger
before the line where you delete the user. Probably you have to save the partner after unlinking and before deleting the user. On Mar 19, 2010, at 10:12 , saki wrote: thank you! where can I put the unlink row? On Mar 18, 7:35 pm, Lea Hänsenberger baerne...@gmail.com wrote: hi, there's

Re: [symfony-users] error installing sfDoctrineGuardPlugin

2010-03-19 Thread Marius Rugan
Hi, - sounds like a PEAR error so try to update PEAR if not - install sfDoctrineGuardPlugin by hand placing it in the plugins dir (or svn co/export it from trunk/branches - see readme of plugin) i would first try browsing around to see if php 5.3 is compatible with symfony unfortunately, i'm stuck

[symfony-users] Re: error installing sfDoctrineGuardPlugin

2010-03-19 Thread kim
I did already do research to it and in php5.3 some of the functions are not supported any more but the strange thing is afterwords he tells me the installation was succesfull, but when I start my form and i go to the login page then my login page is secured (while this is nowhere turned on) So it

[symfony-users] Re: relation between tables without onDelete

2010-03-19 Thread saki
I've found another solution: 1. schema.yml - onDelete: CASCADE - SET NULL 2.1. check if the foreign key fields have NULL(=FALSE) attribute, now you have to change it to TRUE... 2. symfony doctrine:build --all 3. works fine :) thank you for your help! On Mar 19, 10:45 am, Lea Hänsenberger

[symfony-users] unsing unsetAllFieldsExcept to unset a field of an embeded form

2010-03-19 Thread Belgacem TLILI
Hello for all Sf dev, i'm using the function unsetAllFieldsExcept to get a form in 2 steps like this exemple http://www.iw2.fr/2009/08/28/symfony-formulaire-en-plusieurs-etapes/ my problem is : i would like to unset a fields for an embed form i call the unsetAllFieldsExcept function here to

Re: [symfony-users] unsing unsetAllFieldsExcept to unset a field of an embeded form

2010-03-19 Thread Alexandru-Emil Lupu
in your form2 class add a function unsetAllFieldsExcept and then replace: $this-unsetAllExcept(array( 'name','email' , 'form2[books]' ) ); to : $this-unsetAllExcept(array( 'name','email' ) ); if ($this-getEmbededForm('form2') instanceof form2Form ) {

[symfony-users] Re: error installing sfDoctrineGuardPlugin

2010-03-19 Thread kim
I fixed these errors by downgrading my PHP but i still cant log in so like the tutorial says in chapter 13 i installed sfDoctrineGuard put the security right but when i click the login button i get to the same page but when i take a better look i see it's actually the login page but this page is

[symfony-users] Re: Admin generator. Two modules from same schema or a module with two views ?

2010-03-19 Thread Race
Thank you. I use symfony 1.2 and it generate again same module. I try with symfony 1.4 and , yes , it-s working. I have to upgrade to 1.4. Have a nice day. Horatiu On Mar 19, 1:32 am, Richtermeister nex...@gmail.com wrote: Hey There, yes, both solutions work: either create 2 distinct admin

Re: [symfony-users] Help with Symfony routing problem.

2010-03-19 Thread Eno
On Thu, 18 Mar 2010, DarrenMr wrote: Hi guys here is my route YAML: product: url: /product_:brand_:name param: { module: products, action: view } requirements: { brand: \d+, name: ([a-z0-9-])+ } However I get this error when I try to access the page: Unable to parse

[symfony-users] Re: Deploying: if i write the password in properties.ini, why i have to write it again?

2010-03-19 Thread Manel
JAvier, take a look on this: http://troy.jdmz.net/rsync/index.html Manel On 18 mar, 18:19, Javier Garcia tirengar...@gmail.com wrote: Hi, this is my properties.ini. When i deploy my project (deploy --go) it asks me the password. [symfony]    name=rs [production]    host=208.43.66.44  

[symfony-users] Re: Unable to put sfGuardUser tables in a different database that the rest of the tables

2010-03-19 Thread Manel
Unfortunately I have several plugins and some of them uses propel. I think that I'm not asking anything too strange. Is usual that you have several applications and only one user for all. For instance, I have one application in asp.net and another in symfony that have the same users, and share

[symfony-users] Re: Unable to put sfGuardUser tables in a different database that the rest of the tables

2010-03-19 Thread Manel
Unfortunately I have several plugins and some of them uses propel. I think that I'm not asking anything too strange. Is usual that you have several applications and only one user for all. For instance, I have one application in asp.net and another in symfony that have the same users, and share

[symfony-users] Re: Session Timeout

2010-03-19 Thread DEEPAK BHATIA
Any suggestions, ideas.. On Thu, Mar 18, 2010 at 7:27 PM, DEEPAK BHATIA toreachdee...@gmail.comwrote: Hi, How do we check whether session handling between client and server is correct as per factories.yml setting ? Can we debug exactly when the session get expired ? Thanks in advance

[symfony-users] Symfony 2.0 - Use anchor in url

2010-03-19 Thread Jérémie
I there, I'd like to use anchors in my project, but when I have something like /page/1#12, it's overwritten by /page/1%2312 We could change it in the previous versions, but in 2.0, I can't find where. Does anybody know? Thanks Jérémie -- If you want to report a vulnerability issue on symfony,

[symfony-users] Using sf 2.0

2010-03-19 Thread Sid Ferreira
Im starting a new project, that won't be ready soon, so I decided to already start it with symfony 2.0. Im still a bit confused with the new architecture specially about the command line. So Im wondering: 1) Will have more/new examples soon? 2) Is there a console to create new apps/bundles?

[symfony-users] Re: edit.yml not parsed admin generator 1.4

2010-03-19 Thread Richtermeister
the yml validation was part of sf1.0 and it was enabled in 1.2 through the sfCompat10 plugin. This is removed in 1.4 and you have to use the form framework for all your validation needs. While this might seem tricky at first, it's really much more powerful and avoids any duplication that was

[symfony-users] how can I make the same query before each action ?

2010-03-19 Thread alexmm
I want to make query: $this-text = Doctrine::getTable('Texts')-getRandomText(); before each action. And in view use: echo $text-getText(); How can I make this query before each action and pass result to view ? Only solution is to use preExecute() function in each module with this query ? Or maybe

[symfony-users] Re: What about Dimensions plugin ?

2010-03-19 Thread john
I have faced a similar problem recently, and the only approach I found, was to write a custom view class extending sfPHPView and overwriting the getDirectory() and getDecoratorDirectory() methods with my custom logic. This way, it's easily possible to determine the template path dynamically

[symfony-users] Re: how can I make the same query before each action ?

2010-03-19 Thread xplo
You can acces to the request object in the object and set and attribute with your random value. It should work but i have no idea if it s considered good practice to create a filter for that ^^; You could also create a method in myUser class and call it with $sf_user in the layout/template On

Re: [symfony-users] about i18n for template

2010-03-19 Thread Tom Haskins-Vaughan
Hey Andy, That's something that I have often thought of but never tackled. Have you tried using something like %HELLO% instead of [HELLO]? On Thu, Mar 18, 2010 at 9:40 PM, Andy Cheung andychi...@gmail.com wrote: Hello, I would like to ask if it is possible to return another language

[symfony-users] When the clock stop ticking

2010-03-19 Thread Sid Ferreira
Hi all! Recently I've got a big disappointment with symfony 1.4. With a new project, wich we expected to be able to use 100% of Symfony and Doctrine combo, specially the behaviours of Doctrine. Indeed, we made an exotic schema: TableName: actAs: SoftDelete: Timestampable:

[symfony-users] Re: When the clock stop ticking

2010-03-19 Thread Sid Ferreira
I forgot: thanks in advance :) On 19 mar, 15:13, Sid Ferreira sid@gmail.com wrote: Hi all! Recently I've got a big disappointment with symfony 1.4. With a new project, wich we expected to be able to use 100% of Symfony and Doctrine combo, specially the behaviours of Doctrine. Indeed, we

Re: [symfony-users] Using sf 2.0

2010-03-19 Thread Jonathan Wage
Hi, Symfony 2 just really isn't ready for a real project. It was a preview release. Lots of functionality is missing and not added yet. Things will change a lot. You will continually run into problems and missing functionality. It will be added for sure, we just have to settle on some core things

[symfony-users] Re: Symfony 2.0 - Use anchor in url

2010-03-19 Thread Marijn
Where does symfony overwrite those links? In your routing file? Or in the RoutingHelper? On Mar 19, 5:16 pm, Jérémie jeremie.symf...@gmail.com wrote: I there, I'd like to use anchors in my project, but when I have something like /page/1#12, it's overwritten by /page/1%2312 We could change it

[symfony-users] Re: Symfony 2.0 - Use anchor in url

2010-03-19 Thread Jérémie
On Mar 19, 7:51 pm, Marijn marijn.huizendv...@gmail.com wrote: Where does symfony overwrite those links? In your routing file? Or in the RoutingHelper? In the address bar of the browser. The link, created with $view- router-generate('mypage'), is ok. I can see it's something like

[symfony-users] Re: about i18n for template

2010-03-19 Thread rooster (Russ)
The i18n helper is quite simple in what it does. If it does not find a target translation it will simply return what was passed. You have a few of ways to get round this: 1. Write your own (override the) __() function So it checks if the string returned is identical, if it is - then you can

[symfony-users] Re: how can I make the same query before each action ?

2010-03-19 Thread alexmm
Oh thx so: class myUser extends sfBasicSecurityUser { public function Test() { return Doctrine::getTable('Texts')-getRandomText(); } } And in template: echo $sf_user-Test()-getTresc(); Thx You :) I don't know You - You are new user this forum ? :) On 19 Mar, 19:07, xplo

Re: [symfony-users] Using sf 2.0

2010-03-19 Thread Eno
On Fri, 19 Mar 2010, Jonathan Wage wrote: Symfony 2 just really isn't ready for a real project. It was a preview release. Lots of functionality is missing and not added yet. Things will change a lot. You will continually run into problems and missing functionality. It will be added for sure,

[symfony-users] Re: unsing unsetAllFieldsExcept to unset a field of an embeded form

2010-03-19 Thread Belgacem TLILI
i have an error about getEmbededForm other things the function unsetAllFieldsExcept is in the file : BaseFormDoctrine.class.php On Mar 19, 11:41 am, Alexandru-Emil Lupu gang.al...@gmail.com wrote: in your form2 class add a function unsetAllFieldsExcept and then replace:  

[symfony-users] Re: Symfony 2.0 - Use anchor in url

2010-03-19 Thread Marijn
What code do you use for link generation? I suggest you don't add the #id to your link generation: a href=?php echo $view-router-generate('my_route', array('arg_myRouteArgument' = 'someValue')), $myObject-getId(); ? ?php echo $myObject-getSomeValue(); ?/a On Mar 19, 8:05 pm, Jérémie

Re: [symfony-users] Re: Symfony 2.0 - Use anchor in url

2010-03-19 Thread Eno
On Fri, 19 Mar 2010, Marijn wrote: What code do you use for link generation? I suggest you don't add the #id to your link generation: Especially since # is used in URLs for page anchors... -- -- If you want to report a vulnerability issue on symfony, please send it to security at

[symfony-users] Re: What about Dimensions plugin ?

2010-03-19 Thread AJStoneham
I think using the ysfDimensions plugin would be the best way to go, have you tried it with 1.4? with 1.2 it worked fine, I was able to extend views, actions and configurations based of a dimensions, just as the readme states. It was robust, consistent and worked well. Multiple sites in

RE: [symfony-users] Routing cache and memory usage

2010-03-19 Thread Daniel Kucharski
This is interesting. How do you cache it? (and does it also work with APC?) Kind regards, Daniel -Original Message- From: symfony-users@googlegroups.com [mailto:symfony-us...@googlegroups.com] On Behalf Of Eno Sent: woensdag 17 maart 2010 15:13 To: symfony-users@googlegroups.com

[symfony-users] Re: When the clock stop ticking

2010-03-19 Thread john
This is a quite common problem with the behaviors and one of the reasons why they are not in the Doctrine 2 core. In order to leverage the full power of the behaviors, my advice is try to understand what is going on behind the scenes. In your case, you're declaring the Versionable behavior before

[symfony-users] Select fields updating other form fields

2010-03-19 Thread bretth
Hi all, I need to make a form which has a number of select fields; changing one field causes the second select field to reload with a number of sub items based on what was selected in the first. Ie Selecting a Category from the first select field updates the Subcategories select field with only