[symfony-users] Re: Remove embedded forms / update object runtime
Patter, Did you happen to email this week? Someone emailed me regarding this issue, and I just went to reply but I can't find the email. If it was or wasn't you, according to a changeset I have from a month or two ago I did get it to work correctly; however, I'm not exactly sure what I did. If you give me a day or two I'm going to be doing the exact same thing again for sfDoctrineUserPlugin to finish up some of the backend functionality and I'll point you towards the code on the symfony trac servers. It will have the exact same example you're looking for, especially since my User has Phones (1-n) which will need to be able to be added and deleted. -- Stephen Ostrow On Feb 11, 11:06 am, patter wrote: > Hello, > > I have a 1:n relation: User have two phone numbers (well my real use > case is a bit complicated :-) ). > > In my UserForm::configure() I have something like this: > > $p1 = $this->object['phones'][0] = new Phone(); > $p2 = $this->object['phones'][1] = new Phone(); > > $subForm = new sfForm(); > $subForm->embedForm(0, new PhoneForm($p1 ); > $subForm->embedForm(1, new PhoneForm($p2)); > > $this->embedForm('phones', $subForm); > > This works perfect. I can add a new User with 2 phones. > > The problem is that if the user doesn't provide information for second > phone I should not insert a blank record (in fact I can't because of > not null fields). > > I have read a lot of articles but I'm not able to find solution yet. > > I think that I have to use UpdateObject() method to remove unwanted > relation, but if this is the better solution ? > > I use Doctrine :-) --~--~-~--~~~---~--~~ 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 from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: How to Use the Great sfDoctrineUserPlugin?
Xin, Yep. I have not completely finished the upgrade. Sorry, I probably should have marked it as beta instead of stable. I'm almost done with it since I'm using it in another new project which I'm doing in 1.2. It will be a lot cleaner and I'm hoping to include unit and functional test as well. I've also created some new forms which I'll include for use in both the frontend and backend as it is now really easy to do that. I hope to have a new version up in a day or two; I've hit a bug in doctrine 1.1 which has caused me to stall until it's ironed out. I'll post back to this thread when it is completely finished. For now the model and all the listeners work correctly if you check it out from subversion and generating an admin section for a one table at a time should be as easy as ./symfony doctrine:generate-admin backend sfUserUser sfUserUser -- Stephen Ostrow On Feb 14, 10:20 pm, Xin Jia wrote: > Thanks all for your reply. Sorry for my inconsiderateness. My sf is 1.2.4. I > don't know whether what I did are right. > > 1 - PEAR on online install sfDoctrineGuardPlugin > > 2 - PEAR locally install sfDoctrineUserPlugin 1.2 > > 3 - myUser extends sfUserSecurityUser > > 4 - enable_modules all in both plugins, login and security setting in > settings.yml and security.yml > > Later I even add sf_guard_plugin: profile_class in app.yml but result > is the same. > > 5 - build-all > > 6 - cc > > 7 - add an user and access /sfGuardUser, login, no anything about > sfDoctrineUserPlugin content > > 6 - access /sfUserUser, got an error "Class sfDoctrineAdminGenerator does > not exist", then I generate-admin sfUserUser, doesn't work as what I > imagine. > > Stephen, do you mean you've not finished the update yet? Then the 6th point > should be reasonable. > > Could anybody help me on my procedure and show me a right way? Thanks all! > > - xj > > 2009/2/15 Stephen Ostrow - Hide quoted text - > > Thank you for the complements. It's great to know other people are getting > use from from them and i'm helping others. > > First, what version of symfony are you using and how are you getting the > plugin (svn or pear)? > > Two, 1.1 i never really did anything with because I went straight from 1.0 > to 1.2. > > However, im now completely done with 1.2. I updated the model and listeners > last week and will start and finish the admin and forms for it this week. > > Let me know if its the admin stuff on 1.2 which is where your getting your > errors. > > - > Stephen Ostrow > (516) 263-3574 > 33 North End Ave > Kenmore, NY 14217http://www.sowebdesigns.com > > On Sat, Feb 14, 2009 at 5:39 PM, Bernhard Schussek wrote: > > > > > Hi Xin, > > > 2009/2/14 Xin Jia : > > > I've just followed it but failed. Well, what URL should I enter, need > > any > > > other setting or codes ? Thanks. > > > What failed? What URL enter where? You need to give a little more > > information if you want us to help you ;-) > > > Bernhard --~--~-~--~~~---~--~~ 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 from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: How to Use the Great sfDoctrineUserPlugin?
Thanks all for your reply. Sorry for my inconsiderateness. My sf is 1.2.4. I don't know whether what I did are right. 1 - PEAR on online install sfDoctrineGuardPlugin 2 - PEAR locally install sfDoctrineUserPlugin 1.2 3 - myUser extends sfUserSecurityUser 4 - enable_modules all in both plugins, login and security setting in settings.yml and security.yml Later I even add sf_guard_plugin: profile_class in app.yml but result is the same. 5 - build-all 6 - cc 7 - add an user and access /sfGuardUser, login, no anything about sfDoctrineUserPlugin content 6 - access /sfUserUser, got an error "Class sfDoctrineAdminGenerator does not exist", then I generate-admin sfUserUser, doesn't work as what I imagine. Stephen, do you mean you've not finished the update yet? Then the 6th point should be reasonable. Could anybody help me on my procedure and show me a right way? Thanks all! - xj 2009/2/15 Stephen Ostrow - Hide quoted text - Thank you for the complements. It's great to know other people are getting use from from them and i'm helping others. First, what version of symfony are you using and how are you getting the plugin (svn or pear)? Two, 1.1 i never really did anything with because I went straight from 1.0 to 1.2. However, im now completely done with 1.2. I updated the model and listeners last week and will start and finish the admin and forms for it this week. Let me know if its the admin stuff on 1.2 which is where your getting your errors. - Stephen Ostrow (516) 263-3574 33 North End Ave Kenmore, NY 14217 http://www.sowebdesigns.com On Sat, Feb 14, 2009 at 5:39 PM, Bernhard Schussek wrote: > > Hi Xin, > > 2009/2/14 Xin Jia : > > I've just followed it but failed. Well, what URL should I enter, need > any > > other setting or codes ? Thanks. > > What failed? What URL enter where? You need to give a little more > information if you want us to help you ;-) > > > Bernhard > > > > --~--~-~--~~~---~--~~ 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 from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
Re: Fwd: [symfony-users] Re: How to Use the Great sfDoctrineUserPlugin?
Thanks all for your reply. Sorry for my inconsiderateness. My sf is 1.2.4. I don't know whether what I did are right. 1 - PEAR on online install sfDoctrineGuardPlugin 2 - PEAR locally install sfDoctrineUserPlugin 1.2 3 - myUser extends sfUserSecurityUser 4 - enable_modules all in both plugins, login and security setting in settings.yml andsecurity.yml Later I even add sf_guard_plugin: profile_class in app.yml but result is the same. 5 - build-all 6 - cc 7 - add an user and access /sfGuardUser, login, no anything about sfDoctrineUserPlugin content. 6 - access /sfUserUser, got an error "Class sfDoctrineAdminGenerator does not exist", then I generate-admin sfUserUser, doesn't work as what I imagine. Stephen, do you mean you've not finished the update yet? Then the 6th point should be reasonable. Could anybody help me on my procedure and show me a right way? Thanks all! - xj 2009/2/15 Stephen Ostrow > Thank you for the complements. It's great to know other people are getting > use from from them and i'm helping others. > > First, what version of symfony are you using and how are you getting the > plugin (svn or pear)? > > Two, 1.1 i never really did anything with because I went straight from 1.0 > to 1.2. > > However, im now completely done with 1.2. I updated the model and listeners > last week and will start and finish the admin and forms for it this week. > > Let me know if its the admin stuff on 1.2 which is where your getting your > errors. > > - > Stephen Ostrow > (516) 263-3574 > 33 North End Ave > Kenmore, NY 14217 > http://www.sowebdesigns.com > > -- > From: Xin Jia > Sent: Friday, February 13, 2009 9:43 PM > To: sost...@sowebdesigns.com > Subject: Fwd: [symfony-users] Re: How to Use the Great > sfDoctrineUserPlugin? > > Hi Sostrow, > > Thanks for your great contribution on these helpful symfony plugins. But > please forgive my ignorance, I really don't know how to use > sfDoctrineUserPlugin. It doesn't work any more in my app and I know nothing > about its routing. Could you spend a little time to show me guides more than > that readme? Thanks a lot. > > - xj > > -- Forwarded message -- > From: Xin Jia > Date: 2009/2/14 > Subject: Re: [symfony-users] Re: How to Use the Great sfDoctrineUserPlugin? > To: symfony-users@googlegroups.com > > > I've just followed it but failed. Well, what URL should I enter, need any > other setting or codes ? Thanks. > > - xj > > > On Sat, Feb 14, 2009 at 5:45 AM, Рустам wrote: > >> >> See readme, it's simple >> >> On Fri, Feb 13, 2009 at 5:54 PM, Xin Jia wrote: >> > Hi, >> > >> > Could anybody show me how to use it ? I tried for a long time but failed >> and >> > don't have any idea about it ? Thanks. >> > >> > - xj >> > >> > > >> > >> >> >> >> > > --~--~-~--~~~---~--~~ 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 from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Customizing labels when rendering an sfForm
Hi, just use $form->setLabel('fieldname','This is the label text'); Julien On Feb 14, 2:15 pm, Rytis Daugirdas wrote: > Hello, > > Is it possible to customize field labels when calling > sfForm::render($attributes)? If yes, what is the structure of the > $attributes array I should use? > > Regards, > Rytis --~--~-~--~~~---~--~~ 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 from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] sfDoctrineManagerPlugin
Hello everyone. I 'd like to know how to use this new plugin, sfDoctrineManagerPlugin. I already try to search in the web and there isn't any tutorial or artlcle witch teache how to use. Any help will be very usefull. Thanks --~--~-~--~~~---~--~~ 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 from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Problem in figuring out a Doctrine Query for Symfony?
Hello Tomek. Yes I will try that query. In the mean time I have figured out something similar. The SQL query... SELECT * FROM topic t INNER JOIN post p ON ( t.id = p.topic_id ) WHERE p.posted = ( SELECT MAX(posted) FROM post WHERE topic_id = p.topic_id ); I have a problem figuring out the DQL for it though. I tried this one... $q = Doctrine_Query::create() -> from( 'Topic t' ) -> innerJoin( 't.Posts p' ) -> where( 'p.posted = (SELECT MAX(posted) from post p2 where p2.topic_id = p.topic_id)' ); But what this does is. it genrates a sql query looking like this SELECT * FROM topic t INNER JOIN post p ON ( t.id = p.topic_id ) WHERE p.posted = ( SELECT MAX(posted FROM post WHERE topic_id = p.topic_id )); Notice that paranthesis after MAX has been placed at the end. That gives an SQL syntax error. Is this a problem in Doctrine? On Feb 15, 12:34 am, Tomek wrote: > Hi Vikram, > > One way to do it would be with the subquery. > > I'm assuming your schema is: > Topic: > columns: > > Post: > columns: > topic_id: integer > posted: timestamp > relations: > Topic: > foreignAlias: Posts > > In SQL the query you are looking for looks like that: > SELECT * FROM topic t INNER JOIN post p ON (t.id=p.topic_id) > WHERE p.id=(SELECT id FROM post WHERE topic_id=p.topic_id ORDER BY > posted DESC LIMIT 1 ); > > In DQL: > $q = Doctrine_Query::create()->from('Topic t')->innerJoin('t.Posts > p') > ->where('p.id = (SELECT p2.id from post p2 where > p2.topic_id=p.topic_id order by p2.posted desc limit 1)'); > > I hope that helps, > Tomek > > On Feb 13, 11:06 am, SeeVik wrote: > > > Hello all > > > I am using Symfony with Doctrine plugin. > > > I am making a simple bulletin board in my application. I want to find > > out the last post in every topic and display the time in front of > > topic. > > > In Symfony, in the controller for the screen, I do this... > > > $list_topics = Doctrine::getTable( "Topics" )->getLastPost(); > > > In the model layer, in PostsTable.class.php, I have this > > > public function getLastPost() > > { > > $q = $this->createQuery( 'a' ) > > -> innerJoin( 'a.Topics t' ) > > -> groupBy( 'a.topic_id' ) > > -> having( 'a.posts_id = ?', ' Query to find out the posts having > > maximum time for a particular topic ' ); > > return $q->execute(); > > > } > > > Can somebody help me out with this? > > > Thanks and Regards > > Vikram --~--~-~--~~~---~--~~ 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 from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: How to display the data from a Join query?
Thanks Bernhard I solved the problem. There was no problem in the schema. Actually to access the fields from a joined table, I did not know I had to use the following syntax $item -> Table2[0] -> table2Field I was forgetting that array like index. That is why it was displaying the message. Thanks and Regards Vikram On Feb 14, 6:38 pm, Bernhard Schussek wrote: > Hi Vikram, > > Could you paste your schema in some hashbin? It seems as if you have > not configured the second table in your schema. > > Bernhard --~--~-~--~~~---~--~~ 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 from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: problem loading fixture for NestedSet using Doctrine
> I think this may be a bug. Can you create a ticket in > trac.doctrine-project.org ? > > Thanks, Jon Done. http://trac.doctrine-project.org/ticket/1919 Cheers, GM --~--~-~--~~~---~--~~ 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 from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Adding libraries to lib/vendor slows down symfony command line tasks dramatically
Hi, I'm relatively new to Symfony so this may be a newbie misunderstanding of how the framework works - please bear with me. I'm building a site using Symfony 1.2.4 on Ubuntu 8.10. My Lenovo T61 has Dual Core CPU and 4 GB Ram. Starting two days ago, I noticed that running the symfony command line tasks were taking a lot longer on my project than they did a few days ago. After some troubleshooting I realized that the culprit was adding libraries to the lib/vendor folder. I had sym- linked the ezComponents and Zend libraries into my project's lib/ vendor folder because I needed to use several components from each framework. They are not being loaded automatically in ProjectConfiguration.class.php though, so I'm not sure why they are affecting the execution time of commands. Before adding them to lib/vendor, the "symfony cache:clear" command took under 0.5 seconds to run: $ time symfony cache:clear real0m0.426s user0m0.360s sys 0m0.044s If I add Zend to lib/vendor, it jumps to 4.5 seconds: $ time symfony cache:clear real0m4.430s user0m4.328s sys 0m0.096s When I add ezcomponents, it goes to 26 seconds: $ time symfony cache:clear real0m26.687s user0m26.218s sys 0m0.460s If I remove the symlinks, the command runs in 0.5 seconds again. It's not just cache:clear - all other tasks take much longer than they used to also. Should adding libraries to the lib/vendor folder affect the performance of these commands this dramatically? Is there a different, recommended way to use 3rd party libraries that will not affect the performance of command line tasks? Thank you Mark --~--~-~--~~~---~--~~ 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 from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: problem loading fixture for NestedSet using Doctrine
I was sure of it, but im wrong :) I've got same error, if root has no children - it fails, looks like a bug. 2009/2/14 Greg Maruszeczka : > >> >> nestedSet, not NestedSet, and everything will be fine >> > > > Thanks for the reply. Are you certain of this? All example schemas > I've seen clearly capitalize behaviours and as I mentioned, the > fixture loads but only if I include children under every root node in > a multi-root configuration. > > > > --~--~-~--~~~---~--~~ 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 from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: problem loading fixture for NestedSet using Doctrine
I think this may be a bug. Can you create a ticket in trac.doctrine-project.org ? Thanks, Jon On Sat, Feb 14, 2009 at 1:23 PM, Greg Maruszeczka wrote: > > > > > nestedSet, not NestedSet, and everything will be fine > > > > > Thanks for the reply. Are you certain of this? All example schemas > I've seen clearly capitalize behaviours and as I mentioned, the > fixture loads but only if I include children under every root node in > a multi-root configuration. > > > > -- Jonathan H. Wage Open Source Software Developer & Evangelist http://www.jwage.com http://www.doctrine-project.org http://www.symfony-project.org --~--~-~--~~~---~--~~ 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 from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Why Doctrine Admin Generator use sfWidgetFormDoctrineSelect on foreign key fields?
Can you create a ticket for the issue you are having? Thanks, Jon On Sat, Feb 14, 2009 at 12:42 PM, Daniele wrote: > > Hi Julien, > > I am not talking about N..N relations, but 1..N. > As I said above, Propel uses sfWidgetFormPropelChoice on 1..N > relations, but Doctrine not. > sfWidgetFormORMSelect class do not support expanded option! > This is exactly the problem that I have met. > > On 13 Feb, 19:13, jukea wrote: > > Yes, that's what I was talking about. > > > > This fix applies to N to N relations. 1 .. N relations still have a > > select drop down menu, and I can't see how this is not > > appropriate .. ? Would you prefer radio buttons ? then you could use > > the 'expanded'=>true option > > > > Julien > > > > On Feb 13, 12:55 pm, Daniele wrote: > > > > > I am not very expert on Trac or SVN, but I do not find anything about > > > this. > > > I found this that is only similar but not is the same: > http://trac.symfony-project.org/ticket/5784 > > > > > On Feb 12, 11:17 pm, jukea wrote: > > > > > > Hi, > > > > > > I think this has been corrected. Look for it in trac, or try 1.2.5dev > > > > (trunk) > > > > > > Julien > > > > > > On Feb 12, 4:35 pm, Daniele wrote: > > > > > > > Hi, > > > > > someone can help me to understand why my Doctrine admin generator > (sf > > > > > 1.2.4) creates a sfWidgetFormDoctrineSelect instead of > > > > > sfWidgetFormDoctrineChoice on foreign key fields for make the > > > > > BaseXXXForm classes? > > > > > Instead the validators work as expected, and > sfValidatorDoctrineChoice > > > > > is used on foreign key fields. > > > > > I am moving from Propel to Doctrine and I have noticed this > > > > > strangeness, indeed Propel admin generator uses > > > > > sfWidgetFormPropelChoice. > > > > > Am I doing something wrong or is a normal behaviour? > > > > > thanks, Daniele > > > -- Jonathan H. Wage Open Source Software Developer & Evangelist http://www.jwage.com http://www.doctrine-project.org http://www.symfony-project.org --~--~-~--~~~---~--~~ 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 from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: problem loading fixture for NestedSet using Doctrine
> > nestedSet, not NestedSet, and everything will be fine > Thanks for the reply. Are you certain of this? All example schemas I've seen clearly capitalize behaviours and as I mentioned, the fixture loads but only if I include children under every root node in a multi-root configuration. --~--~-~--~~~---~--~~ 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 from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Customizing labels when rendering an sfForm
Hello, Is it possible to customize field labels when calling sfForm::render($attributes)? If yes, what is the structure of the $attributes array I should use? Regards, Rytis --~--~-~--~~~---~--~~ 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 from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Why Doctrine Admin Generator use sfWidgetFormDoctrineSelect on foreign key fields?
Hi Julien, I am not talking about N..N relations, but 1..N. As I said above, Propel uses sfWidgetFormPropelChoice on 1..N relations, but Doctrine not. sfWidgetFormORMSelect class do not support expanded option! This is exactly the problem that I have met. On 13 Feb, 19:13, jukea wrote: > Yes, that's what I was talking about. > > This fix applies to N to N relations. 1 .. N relations still have a > select drop down menu, and I can't see how this is not > appropriate .. ? Would you prefer radio buttons ? then you could use > the 'expanded'=>true option > > Julien > > On Feb 13, 12:55 pm, Daniele wrote: > > > I am not very expert on Trac or SVN, but I do not find anything about > > this. > > I found this that is only similar but not is the > > same:http://trac.symfony-project.org/ticket/5784 > > > On Feb 12, 11:17 pm, jukea wrote: > > > > Hi, > > > > I think this has been corrected. Look for it in trac, or try 1.2.5dev > > > (trunk) > > > > Julien > > > > On Feb 12, 4:35 pm, Daniele wrote: > > > > > Hi, > > > > someone can help me to understand why my Doctrine admin generator (sf > > > > 1.2.4) creates a sfWidgetFormDoctrineSelect instead of > > > > sfWidgetFormDoctrineChoice on foreign key fields for make the > > > > BaseXXXForm classes? > > > > Instead the validators work as expected, and sfValidatorDoctrineChoice > > > > is used on foreign key fields. > > > > I am moving from Propel to Doctrine and I have noticed this > > > > strangeness, indeed Propel admin generator uses > > > > sfWidgetFormPropelChoice. > > > > Am I doing something wrong or is a normal behaviour? > > > > thanks, Daniele --~--~-~--~~~---~--~~ 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 from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Symfony in shared servers
There is no PDO extension loaded in your server. There should be a whole section about PDO. Pablo On Sat, Feb 14, 2009 at 11:31 AM, Harinath wrote: > > Thanks, > > That is correct, i was talking about shared hosting. > > I understand the security issue. But I am not able to resolve "class > PDO not found" error, while phpinfo http://sosoft.org/ocms/web/phpinfo.php > shows pdo support. > > Thanks > Harinath > > > On Feb 14, 6:40 pm, Tom Boutell wrote: >> Define "shared server." If you're taling about shared hosting, please >> read this first: >> >> http://trac.symfony-project.org/wiki/SharedHostingNotSecure >> >> Then this: >> >> http://trac.symfony-project.org/wiki/InstallingSymfonyOnSharedHostNoSsh >> >> Note that for Symfony 1.2 your host must offer PHP 5.2.4 or newer. >> >> -- >> Tom Boutell >> >> www.punkave.comwww.boutell.com > > > --~--~-~--~~~---~--~~ 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 from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Symfony in shared servers
Thanks, That is correct, i was talking about shared hosting. I understand the security issue. But I am not able to resolve "class PDO not found" error, while phpinfo http://sosoft.org/ocms/web/phpinfo.php shows pdo support. Thanks Harinath On Feb 14, 6:40 pm, Tom Boutell wrote: > Define "shared server." If you're taling about shared hosting, please > read this first: > > http://trac.symfony-project.org/wiki/SharedHostingNotSecure > > Then this: > > http://trac.symfony-project.org/wiki/InstallingSymfonyOnSharedHostNoSsh > > Note that for Symfony 1.2 your host must offer PHP 5.2.4 or newer. > > -- > Tom Boutell > > www.punkave.comwww.boutell.com --~--~-~--~~~---~--~~ 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 from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Running symfony 1.2 in Shared Server - PDO issue
I have similar problem. I am using a shared hosting service. Here is the php configuration information. it seems I have everything ready there. http://sosoft.org/ocms/web/phpinfo.php But http://sosoft.org/ocms/web/frontend_dev.php shows the error about class PDO not found Fatal error: Class 'PDO' not found in /home/sosoft/public_html/ocms/ lib/symfony/plugins/sfPropelPlugin/lib/vendor/propel/util/ PropelPDO.php on line 42 Please suggest me something can be done at application level. Thanks Harinath On Feb 1, 6:46 am, Frank He wrote: > unfortunately, what I did is not working there. > > See the phpinfo() herehttp://love.mediatube4.com/phpinfo.php > > Also the php.ini ishttp://love.mediatube4.com/php.ini > > when you usehttp://love.mediatube4.com/frontend_dev.phpyou will see the > error there. > > Thanks > --~--~-~--~~~---~--~~ 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 from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: problem loading fixture for NestedSet using Doctrine
nestedSet, not NestedSet, and everything will be fine 2009/2/14 Greg Maruszeczka : > > Hi, > > I'm playing around with the nestedSet behaviour using Doctrine and > Symfony 1.2.4 and I can't seem to get my fixtures to load. > > Here's the relevant portion of schema.yml: > > CmsMenu: > actAs: >NestedSet: > hasManyRoots: true > rootColumnName: root_id > columns: >id: > type: integer(4) > unsigned: true > autoincrement: true > primary: true >label: > type: string(64) > notnull: true > notblank: true >path: > type: string(128) > notnull: true > notblank: true > nospace: true >description: > type: string(255) > > And here's the problem fixture: > > CmsMenu: > Item_1: >label: Home >path: '/' > Item_2: >label: About >path: '/about' >children: > Item_3: >label: Team >path: '/team' > Item_4: >label: Partners >path: '/partners' > > When I run 'symfony doctrine:data-load' at the CLI the command fails > with this message: > > 'Unknown method CmsMenu::setChildren' > > Oddly enough if I add a populated children key under Item_1 it works > but I don't want children under every root item. > > Any help is much appreciated, > > Greg > > > > --~--~-~--~~~---~--~~ 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 from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] problem loading fixture for NestedSet using Doctrine
Hi, I'm playing around with the nestedSet behaviour using Doctrine and Symfony 1.2.4 and I can't seem to get my fixtures to load. Here's the relevant portion of schema.yml: CmsMenu: actAs: NestedSet: hasManyRoots: true rootColumnName: root_id columns: id: type: integer(4) unsigned: true autoincrement: true primary: true label: type: string(64) notnull: true notblank: true path: type: string(128) notnull: true notblank: true nospace: true description: type: string(255) And here's the problem fixture: CmsMenu: Item_1: label: Home path: '/' Item_2: label: About path: '/about' children: Item_3: label: Team path: '/team' Item_4: label: Partners path: '/partners' When I run 'symfony doctrine:data-load' at the CLI the command fails with this message: 'Unknown method CmsMenu::setChildren' Oddly enough if I add a populated children key under Item_1 it works but I don't want children under every root item. Any help is much appreciated, Greg --~--~-~--~~~---~--~~ 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 from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Problem in figuring out a Doctrine Query for Symfony?
Hi Vikram, One way to do it would be with the subquery. I'm assuming your schema is: Topic: columns: Post: columns: topic_id: integer posted: timestamp relations: Topic: foreignAlias: Posts In SQL the query you are looking for looks like that: SELECT * FROM topic t INNER JOIN post p ON (t.id=p.topic_id) WHERE p.id=(SELECT id FROM post WHERE topic_id=p.topic_id ORDER BY posted DESC LIMIT 1 ); In DQL: $q = Doctrine_Query::create()->from('Topic t')->innerJoin('t.Posts p') ->where('p.id = (SELECT p2.id from post p2 where p2.topic_id=p.topic_id order by p2.posted desc limit 1)'); I hope that helps, Tomek On Feb 13, 11:06 am, SeeVik wrote: > Hello all > > I am using Symfony with Doctrine plugin. > > I am making a simple bulletin board in my application. I want to find > out the last post in every topic and display the time in front of > topic. > > In Symfony, in the controller for the screen, I do this... > > $list_topics = Doctrine::getTable( "Topics" )->getLastPost(); > > In the model layer, in PostsTable.class.php, I have this > > public function getLastPost() > { > $q = $this->createQuery( 'a' ) > -> innerJoin( 'a.Topics t' ) > -> groupBy( 'a.topic_id' ) > -> having( 'a.posts_id = ?', ' Query to find out the posts having > maximum time for a particular topic ' ); > return $q->execute(); > > } > > Can somebody help me out with this? > > Thanks and Regards > Vikram --~--~-~--~~~---~--~~ 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 from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Symfony in shared servers
Define "shared server." If you're taling about shared hosting, please read this first: http://trac.symfony-project.org/wiki/SharedHostingNotSecure Then this: http://trac.symfony-project.org/wiki/InstallingSymfonyOnSharedHostNoSsh Note that for Symfony 1.2 your host must offer PHP 5.2.4 or newer. -- Tom Boutell www.punkave.com www.boutell.com --~--~-~--~~~---~--~~ 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 from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: sfBrowser memory bug
If you go trough jobeet tutorial in last days you can see same error. jobActionsTest.php is getting so big and start to make memory exceptions. I have separate test file to 3 peaces and it pass all tests, but when it is one big file exits with memory fault. On Sat, Feb 14, 2009 at 11:53 AM, Bernhard Schussek wrote: > > Hi Myke, > > I think you sort of misinterpreted the abilities of sfBrowser. All > that sfBrowser does is simulating a symfony request. It is used to > test your local symfony application, but you cannot access any remote > host with it since it does not implement any mechanism (like fopen, > curl etc.) to resolve and access URIs. > > I can't answer whether this is the cause for the above error, but > > On Fri, Feb 13, 2009 at 7:01 PM, myke wrote: > > $b = new sfTestFunctional (new sfBrowser('www.somesite.com', > > '127.0.0.1')); > > generally cannot work. > > > Bernhard > > > > --~--~-~--~~~---~--~~ 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 from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Routing rules where the parameter to be set is not exactly what should appear in the URL
Hi Bernhard, Thanks for responding. You suggested: test_index: url: /test param: { module: test, action: index } test_images: url: /test/images param: { module: test, action: index, type: image } With that first rule in place, I would get the following results: test/index?type=image => /test?type=image test/index?type=video=> /test?type=video test/index => /test In other words, the first rule would match all requests for the test/index action and no further rules would be evaluated. Symfony routing rule matching isn't a "find the best fit" system. It's a "find the first fit" system. If you put the rules in the opposite order, then the images rule would match every request for test/index and force type to image for all of them, which would be incorrect. Allow me to restate what I really want: test/index?type=image --> /test/images test/index?type=video --> /test/videos test/index --> /test Even if we turn off the extra_parameters_as_query_string option for the test/index rule so it doesn't match everything, we still hit the wall trying to get the images and photos rules to differentiate based on something in the URL rather than the first one simply overriding the other. So far it looks like :type is the only way to go. I could get what I want by converting plural :type values back and forth to singular myself rather than trying to get routing rules to do it automatically for me. -- Tom Boutell www.punkave.com www.boutell.com --~--~-~--~~~---~--~~ 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 from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: symfony in shared servers
What do you mean exactly ? There are a lot of different scenarii for a such architecture... Do you want to perform load balancing ? high availability platform ? -- Adrien Mogenet On 14 fév, 12:33, Harinath Mallepally wrote: > Hi, > > What is the best way to install and use symfony in shared server > scenario. > > Thanks > Harinath --~--~-~--~~~---~--~~ 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 from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] symfony in shared servers
Hi, What is the best way to install and use symfony in shared server scenario. Thanks Harinath --~--~-~--~~~---~--~~ 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 from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Managing symfony with no shell support
Hi, I am wondering, if it is possible to manage the symfony commands using web based UI, like create project, app etc. Please do let me know if it is possible or if we can tweak and create such a facility. Thanks harinath --~--~-~--~~~---~--~~ 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 from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Production server routing issues
It is not only the AJAX actions themselves. If an action tries to use a redirect directly it also throws a 404 error. Also adding on index.php to the url such as http://www.domain.com/index.php/module/action all is fine, the ajax on that page does not load though because of the remote_function call probably using some redirect. And I have called the ajax actions directly as well and they then work fine. Gareth On Sat, Feb 14, 2009 at 11:36 AM, Bernhard Schussek wrote: > > Hi Gareth, > > Did you try accessing the AJAX actions directly? > > > Bernhard > > > > --~--~-~--~~~---~--~~ 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 from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: sfDoctrineRoute & method_for_query problem
Doh! I had defined the method in the wrong class. Thank you. BTW, it works fine with a static method ;) - Thomas Dedericks tho...@tequila-studio.com GSM: +32 (0) 499 23 60 22 http://tequila-studio.com Le samedi 14 février 2009 à 11:41 +0100, Bernhard Schussek a écrit : > Hi Thomas, > > retrieveOnlineProjects() needs to be a (non-static) public method in > class ProjectTable. Is this the case? > > > Bernhard > > > > --~--~-~--~~~---~--~~ 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 from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: sfFormWidgetFileInput and sfFormWidgetFileInputEditable
Hi Tom, On Thu, Feb 12, 2009 at 9:49 PM, Tom Boutell wrote: > What seems to be needed here is a file widget that automatically > preserves the user's most recent successful file upload while the > validation process continues, displaying a message letting the user > know they can still click browse if they really want to select a > different file. This sounds very interesting. When can we see the code? :-) Bernhard --~--~-~--~~~---~--~~ 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 from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: sfDoctrineRoute & method_for_query problem
Hi Thomas, retrieveOnlineProjects() needs to be a (non-static) public method in class ProjectTable. Is this the case? Bernhard --~--~-~--~~~---~--~~ 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 from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Add Channel and Install Plugin Command Not Working
Hi! Could it be you need superuser rights to modify the PEAR channels? try sudo symfony plugin:add-channel pear.symfony-project.com Bernhard --~--~-~--~~~---~--~~ 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 from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: sfBrowser memory bug
Hi Myke, I think you sort of misinterpreted the abilities of sfBrowser. All that sfBrowser does is simulating a symfony request. It is used to test your local symfony application, but you cannot access any remote host with it since it does not implement any mechanism (like fopen, curl etc.) to resolve and access URIs. I can't answer whether this is the cause for the above error, but On Fri, Feb 13, 2009 at 7:01 PM, myke wrote: > $b = new sfTestFunctional (new sfBrowser('www.somesite.com', > '127.0.0.1')); generally cannot work. Bernhard --~--~-~--~~~---~--~~ 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 from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] sfDoctrineRoute & method_for_query problem
Hello, I have a Project model with a static method called retrieveOnlineProjects(), which works perfectly. I'm trying to use this method to retrieve objects using $this->getRoute()->getObjects() in the action. My routing.yml file : homepage: url: / class:sfDoctrineRoute options: { model: Project, type: list, method_for_query: retrieveOnlineProjects } param:{ module: projects, action: index } requirements: sf_method: [get] I get a Doctrine_Record exception with the message "Unknown method Project::retrieveOnlineProjectsTableProxy"... I'm using symfony 1.2.4. What am I doing wrong ? NB: everything works fine with the following routing setup : homepage: url: / class:sfObjectRoute options: { model: Project, type: list, method: retrieveOnlineProjects } param:{ module: projects, action: index } requirements: sf_method: [get] - Thomas Dedericks tho...@tequila-studio.com GSM: +32 (0) 499 23 60 22 http://tequila-studio.com --~--~-~--~~~---~--~~ 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 from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Routing rules where the parameter to be set is not exactly what should appear in the URL
Hi Tom, It may be a silly suggestion, but why don't you just add the /test rule? test_index: url: /test param: { module: test, action: index } test_images: url: /test/images param: { module: test, action: index, type: image } On Fri, Feb 13, 2009 at 7:47 PM, Tom Haskins-Vaughan wrote: > I may be completely off track here, but does the requirements field not > use regular expressions? If it does, is there not something you can do > like this: > > requirements: { type: (image|video)s } Even if you do this, your parameter "type" will still contain either "images" or "videos". Remember that requirements are used just for asserting the parameter correctness, not for transforming it. Bernhard --~--~-~--~~~---~--~~ 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 from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: How to Use the Great sfDoctrineUserPlugin?
Hi Xin, 2009/2/14 Xin Jia : > I've just followed it but failed. Well, what URL should I enter, need any > other setting or codes ? Thanks. What failed? What URL enter where? You need to give a little more information if you want us to help you ;-) Bernhard --~--~-~--~~~---~--~~ 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 from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: How to display the data from a Join query?
Hi Vikram, Could you paste your schema in some hashbin? It seems as if you have not configured the second table in your schema. Bernhard --~--~-~--~~~---~--~~ 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 from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Production server routing issues
Hi Gareth, Did you try accessing the AJAX actions directly? Bernhard --~--~-~--~~~---~--~~ 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 from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---