[symfony-users] Re: Problem with repositories with PR8
Hi, I managed to get it work. In fact, I was using YAML to build my entities class and I saw that my annotations did not include @orm informations. So I created manually the entities class with @orm annotations and now it works. Guillaume B On 23 mar, 20:32, guiguiboy wrote: > Hi, > > I have installed Symfony 2 PR 8 to give it a try and I m stuck with a > problem. > > After generating my bundle, I created yml files describing entities, > which were converted to class using : > > php app/console doctrine:generate:entities AcmeJeudiBundle > > Entities classes successfully generated. > > Now, I want to use custom methods to retrieve my data : I need > repositories. > The problem is that, when I run : > > php app/console doctrine:generate:repositories AcmeJeudiBundle > > No custom repositories are found. > Even if I add in my entity class : > @orm:Entity(repositoryClass="Acme\JeudiBundle\Entity > \ParticipantRepository") > Nothing is changed. > > It's problematic as I can't use custom methods to retrieve my > objects... > > Here is a sample action code I use. > > public function indexAction() > { > $em = $this->get('doctrine.orm.entity_manager'); > echo get_class($em->getRepository('Acme\JeudiBundle\Entity > \Participant')); > die; > //$participants = $em->getRepository('Acme\JeudiBundle\Entity > \Participant')->getParticipants(); > //return $this->render('AcmeJeudiBundle:Default:index.html.twig', > > array('participants' => $participants)); > } > > I saw that people already got this problem but I can't manage to get > it working. > Has someone any idea ? > Thank you > > Guillaume -- 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 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] [symfony2] Problem with repositories with PR8
Hi, I have installed Symfony 2 PR 8 to give it a try and I m stuck with a problem. After generating my bundle, I created yml files describing entities, which were converted to class using : php app/console doctrine:generate:entities AcmeJeudiBundle Entities classes successfully generated. Now, I want to use custom methods to retrieve my data : I need repositories. The problem is that, when I run : php app/console doctrine:generate:repositories AcmeJeudiBundle No custom repositories are found. Even if I add in my entity class : @orm:Entity(repositoryClass="Acme\JeudiBundle\Entity \ParticipantRepository") Nothing is changed. It's problematic as I can't use custom methods to retrieve my objects... Here is a sample action code I use. public function indexAction() { $em = $this->get('doctrine.orm.entity_manager'); echo get_class($em->getRepository('Acme\JeudiBundle\Entity \Participant')); die; //$participants = $em->getRepository('Acme\JeudiBundle\Entity \Participant')->getParticipants(); //return $this- >render('AcmeJeudiBundle:Default:index.html.twig', array('participants' => $participants)); } I saw that people already got this problem but I can't manage to get it working. Has someone any idea ? Thank you Guillaume -- 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 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: Call to undefined method sfRoute::getObject() when try to activate an affiliate in the backend
Hi, If you didn't find any difference between the 2 routing files, then consider making a diff on the whole project. You can use winmerge to see where the differences are (works for a file and a folder). I (strongly) advice you to use source code control. Guillaume B. On 17 déc, 11:05, scvroin wrote: > Hi, > > Unfortunate, I don't use source control. > I don't figure out from where is my diffrence. > > On 17 dec., 00:06, guiguiboy wrote: > > > Hi, > > > Do you use source code control for this project ? You seem to have > > difference between your dev (local) environment and your prod (online) > > environment. > > Make a diff between your local routing and prod routing to see what's > > going on. > > > Guillaume B. > > > On 15 déc, 16:54, scvroin wrote: > > > > Hello, > > > > I have 2 jobeet projects: one online and one on my localhost.My > > > problem is that on my local system when try to activate an affiliate > > > in the backend app, I got this fatal error: > > > Call to undefined method sfRoute::getObject() > > > And I think this is because I have matching route the "default" one > > > (/:module/:action/*) for /affiliate/ListActivate/id/3 for my link, > > > instead of jobeet_affiliate. > > > In the routing.yml the order is ok, but when I look in the navigator > > > window of my netbeans, the order is reverse. And in the routing.yml it > > > seams that jobeet_affliate is not ending properly. > > > Another diffrence between online and local version is this: the link > > > in my browser when I want to activate an affiliate, so here it is: > > > 1. in my local I have like this: /affiliate/ListActivate/id/3 > > > 2 on the online is like this:affiliate/469/ListActivate > > > php 5.3.3 > > > symfony 1.4.5 > > -- 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 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: No embed form bind
Hi, Have you tried doing a print_r on $oForm->getValues() ? Guillaume B. On 16 déc, 19:31, HAUSa wrote: > Weird... when I bind my form, the embedded forms don't receive the > values. > > This is my action: > > $oForm = new UserSocialNetworkLinksForm(NULL, array('linked' > => > $aLinked)); > if($oRequest->isMethod('post')){ > > > $oForm->bind($oRequest->getParameter($oForm->getName()), > $oRequest->getFiles($oForm->getName())); > > if($oForm->isValid()){ > > foreach($oForm->getEmbeddedForms() as > $oForm1){ > die(print_r($oForm1->getValues())); > die(print_r($oForm1->getObject())); > } > $this->doRedirect('wizard_start'); > } > > } > > The print_r() of $oForm1->getValues() is empty. > > How can it? > If I do a print_r() of $_POST, the values are actually there! > > Array > ( > [social_network_links] => Array > ( > [facebook] => Array > ( > [status_updates] => on > [id] => 1 > ) > > [hyves] => Array > ( > [id] => 2 > ) > > [_csrf_token] => 8c12ad89bd06f4190127ecb253370fb2 > ) > > ) > > Facebook and Hyves are the social networks here... -- 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 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: Call to undefined method sfRoute::getObject() when try to activate an affiliate in the backend
Hi, Do you use source code control for this project ? You seem to have difference between your dev (local) environment and your prod (online) environment. Make a diff between your local routing and prod routing to see what's going on. Guillaume B. On 15 déc, 16:54, scvroin wrote: > Hello, > > I have 2 jobeet projects: one online and one on my localhost.My > problem is that on my local system when try to activate an affiliate > in the backend app, I got this fatal error: > Call to undefined method sfRoute::getObject() > And I think this is because I have matching route the "default" one > (/:module/:action/*) for /affiliate/ListActivate/id/3 for my link, > instead of jobeet_affiliate. > In the routing.yml the order is ok, but when I look in the navigator > window of my netbeans, the order is reverse. And in the routing.yml it > seams that jobeet_affliate is not ending properly. > Another diffrence between online and local version is this: the link > in my browser when I want to activate an affiliate, so here it is: > 1. in my local I have like this: /affiliate/ListActivate/id/3 > 2 on the online is like this:affiliate/469/ListActivate > php 5.3.3 > symfony 1.4.5 -- 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 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: 06-Advanced-Forms Some Questions.
Hi, 1/ What do you mean with "Advertisement" ? 2/ If you want to change the labels of the form, simply use the setLabel() method in yout form class. Example : $this->widgetSchema->setLabel(%NAME%, %LABEL%); 3/ Well, I believe the tutorial is enough well coded to allow you change the number of pictures you wish to upload. Just change the value of size in the option array. $form = new ProductPhotoCollectionForm(null, array( 'product' => $this->getObject(), 'size'=> 2, )); Guillaume B. On 21 nov, 13:54, Guychmyrat Amanmyradov wrote: > Hi, > Firstly thanks for advanced forms. It really saved my times. > > I was following this link : > > http://www.symfony-project.org/more-with-symfony/1_4/en/06-Advanced-F... > > 1) I do not want to show "Advertisement" text (in tutorial current photos) on > new form. How can i hide it ? > > 2) How can i change "advertisement" and "newphoto" texts (labels) ? > > 3) How can i limit easily photos with 6. If user has uploaded 6 photos, i > want to stop image upload. > > Thank you. -- 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 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: Is a good idea to handle error 503 when the server is too hight?
Hi, you may find this useful : 503 Service Unavailable The server is currently unable to handle the request due to a temporary overloading or maintenance of the server. The implication is that this is a temporary condition which will be alleviated after some delay. If known, the length of the delay MAY be indicated in a Retry- After header. If no Retry-After is given, the client SHOULD handle the response as it would for a 500 response. Note: The existence of the 503 status code does not imply that a server must use it when becoming overloaded. Some servers may wish to simply refuse the connection. (found on http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html) Cheers, Guillaume On 19 nov, 15:37, Nei Rauni Santos wrote: > Hi Guys, > > I have many symfony's websites in a single server and I'm thinking to add a > filter to monitor the load average of the server and when it's too hight > like 60.0 the symfony return 503 service unavailable. > > I have others monitoring to prevent this situation, but it's a plus on the > application. > > Do you think it's a good idea? The best way to do that is on filters system? > > I hope to receive some ideas about that. > > Thank you, > > -- > Nei Rauni Santos > > http://www.linkedin.com/in/neiraunisantoshttp://www.facebook.com/nei.santoshttp://www.twitter.com/nraunihttp://blog.inuar.com > > Curitiba - Paraná > +55 41 85020985 -- 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 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: jq_submit_to_remote examples
Hi, I've never tried http://jquery.malsup.com/form/ but I would give it a try. @Martin Ibarra Cervantes In one of my application I use jq_form_remote_tag. Here is how it works : url_for('@my_route'), //the route where your data will be POSTed 'script' => true, //do you want to use JS in the response ? 'update' => "form_result_div",//div that will be updated by the response 'loading' => "$('#indicator').show();", //action performed while the request is being processed 'complete' => "$('#duplicate-indicator').hide();", //action performed after processing the request 'failure' => "alert('OMG : An error has ocuured.');" // action performed when HTTP status is not in 2xx ), array('id' => 'my_form_id') //id of your form ) ?> //form fields ... Then, in your action, just do as you would do with a regular sf form. Hope that helps. Guillaume On 15 nov, 15:12, deepak wrote: > Hi > > As suggested by Massimiliano Arione jQuery form plugin http:// > jquery.malsup.com/form/ is really good. I use the same with symfony > without any issue, and is very handy to use. > > Thanks > Deepak > > On Nov 15, 7:05 pm, Massimiliano Arione wrote: > > > On 15 Nov, 02:19, Martin Ibarra Cervantes > > wrote: > > > > Hi, guys, i want use jquery on my forms but i dont have idea how use this. > > > Stay away from any symfony plugin containing the word "jQuery". > > Just implement your form in the standard way, then add jQuery > > javascripts as needed. > > You can use jQuery form plugin http://jquery.malsup.com/form/or > > anything else you prefer. > > > cheers > > Massimiliano > > -- 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 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: sending email from task through CLI
Have you looked at the php.ini of your CLI ? Is the lib enabled (as in your php.ini in apache dir) ? On 5 nov, 14:15, Florian wrote: > If you're on windows, read this: > > http://vittoriop77.blogspot.com/2007/10/php-registered-stream-socket-... > > On 5 nov, 14:11, Florian wrote: > > > Another question: did you run phpinfo() function from the cli ? > > > php -a > > > > phphinfo(); > > > or php -r "phpinfo();" > > > On 5 nov, 14:09, Florian wrote: > > > > It looks like the stream socket transport you're using doesn't exist. > > > > try with sslv3 or sslv2 encryption method: > > > > transport: > > > class: Swift_SmtpTransport > > > param: > > > host: smtp.gmail.com > > > port: 465 > > > encryption: sslv3 > > > username: x...@gmail.com > > > password: > > > > On 5 nov, 13:24, hribo wrote: > > > > > i would like to ask you for the way to send email from the task. i > > > > know there are plenty of discussions showing how to do it. > > > > but i have actually problem when i am sending my emails, and this > > > > error shows up: > > > > > Warning: fsockopen(): unable to connect to ssl://smtp.gmail.com:465 > > > > (Unable to find the socket transport "ssl" - did you forget to enable > > > > it when you configured PHP?) in C:\wamp\www\my_sites\_SYMFONY > > > > \symfony-1.4.3\lib\vendor\swiftmailer\classes\Swift\Transport > > > > \StreamBuffer.php on line 233 > > > > > Connection could not be established with host smtp.gmail.com [Unable > > > > to find the socket transport "ssl" - did you forget to enable it when > > > > you configured PHP? #274232] > > > > > my factories.yml is set correctly for sure, because when i am sending > > > > emails not from tasks, IT WORKS. just not through task. > > > > transport: > > > > class: Swift_SmtpTransport > > > > param: > > > > host: smtp.gmail.com > > > > port: 465 > > > > encryption: ssl > > > > username: x...@gmail.com > > > > password: > > > > > i have also looked on my phpinfo() function and there i have already > > > > allowed SSL: > > > > Registered Stream Socket Transports tcp, udp, ssl, sslv3, sslv2, tls > > > > > do you know where is the problem? > > > > thank you -- 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 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] Attempt to assign property of non-object sfCoreAutoLoad
Hi, I have a weird problem that occurs sometimes. I get this error : Warning: Attempt to assign property of non-object in /var/www/xxx/ lib/vendor/symfony/lib/autoload/sfCoreAutoload.class.php on line 38 Call Stack: 0.0001 330780 1. {main}() /var/www/xxx/web/ backend_dev.php:0 0.0002 340520 2. require_once('/var/www/xxx/config/ ProjectConfiguration.class.php') /var/www/xxx/web/backend_dev.php:6 0.0010 443608 3. sfCoreAutoload::register() /var/www/xxx/config/ ProjectConfiguration.class.php:4 0.0010 443860 4. sfCoreAutoload::getInstance() /var/www/xxx/lib/vendor/symfony/lib/ autoload/sfCoreAutoload.class.php:69 0.0010 444204 5. sfCoreAutoload- >__construct() /var/www/xxx/lib/vendor/symfony/lib/autoload/ sfCoreAutoload.class.php:50 Warning: require(/config/ sfProjectConfiguration.class.php): failed to open stream: No such file or directory in /var/www/xxx/lib/vendor/symfony/lib/autoload/ sfCoreAutoload.class.php on line 99 Call Stack: 0.0001 330780 1. {main} () /var/www/xxx/web/backend_dev.php:0 0.0002 340520 2. require_once('/var/www/xxx/config/ProjectConfiguration.class.php') / var/www/xxx/web/backend_dev.php:6 0.0012 444932 3. sfCoreAutoload- >autoload() /var/www/xxx/lib/vendor/symfony/lib/autoload/ sfCoreAutoload.class.php:0 Fatal error: require(): Failed opening required '/config/sfProjectConfiguration.class.php' (include_path='.:/ usr/share/php:/usr/share/pear') in /var/www/xxx/lib/vendor/symfony/ lib/autoload/sfCoreAutoload.class.php on line 99 Call Stack: 0.0001 330780 1. {main}() /var/www/xxx/web/backend_dev.php:0 0.0002 340520 2. require_once('/var/www/xxx/config/ ProjectConfiguration.class.php') /var/www/xxx/web/backend_dev.php:6 0.0012 444932 3. sfCoreAutoload->autoload() /var/www/xxx/lib/vendor/ symfony/lib/autoload/sfCoreAutoload.class.php:0 And as I said before, it really occurs sometimes. This means that the same page can display correctly first and then display the fatal error without any changes. I already tried resetting the perms. Configuration : gbre...@gunix:/var/www/xxx$ php symfony -V symfony version 1.4.1 (/var/www/xxx/lib/vendor/symfony/lib) gbre...@gunix:/var/www/xxx$ php -v PHP 5.3.3-0.dotdeb.1 with Suhosin-Patch (cli) (built: Oct 4 2010 16:15:33) Copyright (c) 1997-2009 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies with Xdebug v2.1.0, Copyright (c) 2002-2010, by Derick Rethans with Suhosin v0.9.32.1, Copyright (c) 2007-2010, by SektionEins GmbH I saw that someone already got this error and solved it with downgrading to PHP 5.2 :/ But I need PHP 5.3 As anyone of you already faced this problem ? Do you have any suggestion ? Thanks for your replies Guillaume BRETOU -- 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 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] Attempt to assign property of non-object sfCoreAutoLoad
Hi, I have a weird problem that occurs sometimes. I get this error : Warning: Attempt to assign property of non-object in /var/www/assse/ lib/vendor/symfony/lib/autoload/sfCoreAutoload.class.php on line 38 Call Stack: 0.0001 330780 1. {main}() /var/www/assse/web/ backend_dev.php:0 0.0002 340520 2. require_once('/var/www/assse/config/ ProjectConfiguration.class.php') /var/www/assse/web/backend_dev.php:6 0.0010 443608 3. sfCoreAutoload::register() /var/www/assse/config/ ProjectConfiguration.class.php:4 0.0010 443860 4. sfCoreAutoload::getInstance() /var/www/assse/lib/vendor/symfony/lib/ autoload/sfCoreAutoload.class.php:69 0.0010 444204 5. sfCoreAutoload- >__construct() /var/www/assse/lib/vendor/symfony/lib/autoload/ sfCoreAutoload.class.php:50 Warning: require(/config/ sfProjectConfiguration.class.php): failed to open stream: No such file or directory in /var/www/assse/lib/vendor/symfony/lib/autoload/ sfCoreAutoload.class.php on line 99 Call Stack: 0.0001 330780 1. {main} () /var/www/assse/web/backend_dev.php:0 0.0002 340520 2. require_once('/var/www/assse/config/ProjectConfiguration.class.php') / var/www/assse/web/backend_dev.php:6 0.0012 444932 3. sfCoreAutoload- >autoload() /var/www/assse/lib/vendor/symfony/lib/autoload/ sfCoreAutoload.class.php:0 Fatal error: require(): Failed opening required '/config/sfProjectConfiguration.class.php' (include_path='.:/ usr/share/php:/usr/share/pear') in /var/www/assse/lib/vendor/symfony/ lib/autoload/sfCoreAutoload.class.php on line 99 Call Stack: 0.0001 330780 1. {main}() /var/www/assse/web/backend_dev.php:0 0.0002 340520 2. require_once('/var/www/assse/config/ ProjectConfiguration.class.php') /var/www/assse/web/backend_dev.php:6 0.0012 444932 3. sfCoreAutoload->autoload() /var/www/assse/lib/vendor/ symfony/lib/autoload/sfCoreAutoload.class.php:0 And as I said before, it really occurs sometimes. This means that the same page can display correctly first and then display the fatal error without any changes. I already tried resetting the perms. Configuration : gbre...@gunix:/var/www/xxx$ php symfony -V symfony version 1.4.1 (/var/www/xxx/lib/vendor/symfony/lib) gbre...@gunix:/var/www/xxx$ php -v PHP 5.3.3-0.dotdeb.1 with Suhosin-Patch (cli) (built: Oct 4 2010 16:15:33) Copyright (c) 1997-2009 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies with Xdebug v2.1.0, Copyright (c) 2002-2010, by Derick Rethans with Suhosin v0.9.32.1, Copyright (c) 2007-2010, by SektionEins GmbH I saw that someone already got this error and solved it with downgrading to PHP 5.2 :/ But I need PHP 5.3 As anyone of you already faced this problem ? Do you have any suggestion ? Thanks for your replies Guillaume BRETOU -- 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 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: Form Submition
As Christopher Schnell said, you have to use flash messages. Guillaume B. On 12 oct, 05:49, farhana wrote: > I am doing my project using symfony frame work . I want to show a > message " saved successfully" after the successfull submition of my > form .how can I show it. I am new to Symfony. > > Farhana -- 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 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: voiturelib.com cherche directeur technique associé, dév sous symfony
Bonjour, vous avez le site symfonians sur lequel vous pouvez poster vos offres d'emplois en rapport avec symfony. http://symfonians.net/ Guillaume. On 8 oct, 10:44, voiturelib wrote: > Voiturelib.com propose une plate-forme de location de voitures entre > particuliers > Le service décolle bien depuis son lancement en juin 2010 : presse > enthousiaste, vraie utilisation, levée de fonds en cours. > Je suis le fondateur et ai besoin d'un co-fondateur directeur > technique pour assurer tous les dév web (sous symfony) et mobile. > On aime : symfony, agilité, lean startup. Un modèle pour Voiturelib ? > airbnb.com > Proportion parts du capital / salaire discutable selon votre envie / > profil > > Paulin - paulin at voiturelib point com > > -- 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 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: Edit form data does not update
Hi, Have you read : http://www.symfony-project.org/forms/1_4/en/ chapter 1 and 2 ? Guillaume On 4 oct, 21:49, Social It wrote: > My edit form does not update when I make changes to it. I have to wait a > couple of seconds and hit refresh. Same with a page that queries the > database and shows the records. The table is updated in mysql, but the form > shows the old value. > > public function executeEdit(sfWebRequest $request) > { > $this->forward404Unless($items = > Doctrine::getTable('items')->find(array($request->getParameter('item_id'))), > sprintf('Object items does not exist (%s).', > $request->getParameter('item_id'))); > > //make sure the item being edited is owned by the logged in user > > $this->forward404Unless($items->getUser_id()==$this->getUser()->getGuardUser()->getId()); > > //set category id > $query=Doctrine_Query::create() > ->select('name') > ->from('categories') > ->where('category_id="'.$items->category_id.'"') > ->limit(1); > $category=$query->fetchArray(); > @$items->category_id=$category[0]['name']; > $this->form = new itemsUserForm($items); > } -- 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 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: sfDoctrinePager - sorting items
Hi, Don't you forget a title parameter in your link ? Try in your action : $this->title = $request->getParameter('title'); in your template : On 29 sep, 21:02, coda wrote: > Hello, > I'm following Jobeet tutorial and want to add some sorting options to > the sfDoctrinePager > > That's my code: > > actions: > > public function executeIndex(sfWebRequest $request) > { > $this->jobs_table = Doctrine::getTable('JobsItem'); > > $this->pager = new sfDoctrinePager( > 'JobsItem', sfConfig::get('app_max_jobs_on_page') > ); > > $q = Doctrine_Query::create() > ->from('JobsItem j'); > > if ($request->getParameter('title')) > { > $q -> addOrderBy('j.title '.$request->getParameter('title')); > } > $this->pager->setQuery($this->jobs_table->addActiveJobsQuery($q)); > $this->pager->setPage($request->getParameter('page',1)); > $this->pager->init(); > } > > In this case I want my items sorted by title according to the > parameter passed in the URL. This works only at the first time - I > don't know how to make the query saved when switching among the pages. > In the _pagination template I have: > > > Is there a simple way to remember the previous query and pass it on to > the next page? -- 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 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: Doctrine: Can't figure how to execute this: UPDATE user SET points = LEAST(200,300)
Be careful, LEAST is not SQL standard, this means if you change you database server, you may (will) encounter problems. Why not doing it with PHP ? You have the min function : http://fr.php.net/min On 29 sep, 15:05, torok84 wrote: > Workaround: > > $conn = Doctrine::getConnectionByTableName('User'); > $conn->exec('UPDATE user SET points = LEAST(200,300)'); > > Any chance this can be done using Doctrine? > > Paolo > > On Sep 29, 2:56 pm, torok84 wrote: > > > [ In the real application I would have something like > > LEAST(user.points, 300) ] > > Hello, I do not understand very well how the set() function works > > > I tryed the following code: > > > $q = Doctrine_Query::create() > > ->update('User u') > > ->set('u.points', 'LEAST(200,100)'); > > echo $q->getSqlQuery(); > > > But the generated SQL code is > > UPDATE user SET points = LEAST(200) > > > I tryed some other things, but none of them worked. For example > > ->set('u.points', '?' , 'LEAST(200,100)'); > > will generate > > UPDATE user SET points = 'LEAST(200,300)' > > > How can I create the query I want? > > > Thanks > > Paolo -- 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 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: Live symfony tutorial
Have you planned doing the same for sf2 ? On 29 sep, 05:21, f1gm3nt wrote: > I just want to spark up a discussion on what I hope to be very > informative for the symfony community. I will be giving a live symfony > 1.4 tutorial. This will air on uStream.tv (http://www.ustream.tv/ > channel/chattdevelopers) Note, if you are on Facebook you can RSVP > there as well (http://www.facebook.com/event.php?eid=159410737418800) > > So what do you want to see me go over? I literally just created these > events and have no idea what web app I will make within 45min to 1hr, > but I would like to get feedback from users on what component you want > covered the most. > > Thanks, > f1g -- 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 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: Is there an easy way to enable display the lookup values instead of IDs in indexSuccess.php in symfony 1.4.6?
If I understand your need, you want to display the employee name in the list view ? Is that it ? Then, you could just add in your generator.yml list: display: [id, name, _emp, created_at, updated_at] Add the partial _emp.php in your module and put the code : getEmp(); This will print the __toString() of your employee. I don't know if there is another way to do it. Hope that can help you. Guillaume B. On 21 sep, 15:33, dmitrypol wrote: > Hi all > > Apologies if this is a silly question. I am using Symfony 1.4.6 to > build a simple app to track which team members are working on which > issues (we need a custom solution). > > Core of my schema.yml: > issue: > columns: > name: { type: string(255), notnull: true, unique: true } > emp_id: { type: integer } > relations: > emp: { local: emp_id, foreign: id } > emp: > columns: > name: { type: string(255), notnull: true, unique: true } > ... > > I execute: > symfony generate:app frontend > symfony doctrine:build --all --no-confirmation > symfony doctrine:generate-admin frontend issue --module=issue > symfony doctrine:generate-module --with-show frontend issue_module > issue > > When I browse tohttp://url.com/frontend_dev.php/issue(or > issue_module) I see the foreign key IDs of the employees which looks > silly to the users. > ID Name Emp > 1 Issue 1 6 > 2 Issue 2 4 > When I browse tohttp://url.com/frontend_dev.php/issue/new(or > issue_module/new or edit page) I see a dropdown with the actual names > of the employees. > > I went through the Jobeet guide (and other docs on symfony site) and > see how forms can be configured. I see the differences between > indexSuccess.php, _list.php and _form.php. But is there an easy way > to enable display of actual names insted of IDs w/o doing the custom > coding? > > Thank you in advance > > Dmitry -- 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 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: Removing a field from a form in an action
Hi, You can also create 2 form classes : the first for authenticated users (authenticatedUsersForm for example) and the other for non-logged users (nonAutenticatedUsersForm for example). class authenticatedUsersForm extends nonAutenticatedUsersForm define your form widgets and validators in configure() of nonAutenticatedUsersForm then in configure() of authenticatedUsersForm call parent::configure() and add the custom widget and validator for the additionnal field That's it Simply do an if in your action code if($this->getUser()->hasAttribute('user')) $form = new authenticatedUsersForm() else $form = new nonAutenticatedUsersForm() Guillaume B. On 9 sep, 15:40, torok84 wrote: > Thanks, > > this is what I was trying to do, but actually it is not very nice :). > It didn't occur to me I could pass a parameter in the constructor. > > Paolo > > On Sep 8, 4:43 pm, Christopher Schnell > wrote: > > > hi, > > > you could do something nasty like > > > if(!$this->getUser()->hasAttribute('user')) > > $tempSchema=$this->form->getWidgetSchema(); > > unset($tempSchema ['mine']; > > $this->form->setWidgetSchema($tempSchema); > > > } > > > but this wouldn't be testable. > > > better solution > > ishttp://eatmymonkeydust.com/2009/08/symfony-forms-flexible-widgets-bas... > > > Regards, > > Christopher. > > > > -Ursprüngliche Nachricht- > > > Von: symfony-users@googlegroups.com [mailto:symfony- > > > us...@googlegroups.com] Im Auftrag von torok84 > > > Gesendet: Mittwoch, 8. September 2010 16:32 > > > An: symfony users > > > Betreff: [symfony-users] Removing a field from a form in an action > > > > Hi, > > > > I have a form to select some search options. I have a field that I > > > wanto to show only if the user is logged in. I want to do something > > > like this: > > > > if(!$this->getUser()->hasAttribute('user')) > > > unset($this->form->widgetSchema['mine']); > > > > that doesn't work because widgetSchema is protected. Moreover doing > > > this would leave a dangling validator for the 'mine' field. I > > > undestand I can create a second form class without the 'mine' field, > > > but it would be nice if I could simply unset a field. > > > > Thanks > > > Paolo > > > > -- > > > 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 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 -- 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 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: Any way to retrieve from the layout to the name of the template of the action?
Hi, What do you want to do ? Have you looked at slots ? On 7 sep, 15:03, Javier Garcia wrote: > Hi, > > hi, any way to retrieve from the layout to the name of the template of > the action? > > -- > Javi > > Ubuntu 10.04, sf 1.4 -- 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 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: Send Mails
Is your server correctly configured to send mails ? On 24 août, 00:51, vero wrote: > I have tried configuring my computer to use the fuction mail() . > I have tried use Zend Framework,, exactly like in jobeet. > But nothing works. The code was compiled, but no email was send. > > Please, help me! I need e-mails in my project. -- 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 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 and OVH RPS 1
Hi, I would like to know if a RPS 1 from OVH can handle correctly a website in symfony 1.4 ? The site is small : there are some articles with audio files playing, an e-commerce part, and a contact form. I do not expect many connections for this site. I saw that a user, saturn1, had problems with this machine, but I would like to have a feedback from other users. Thank you for your replies. Guillaume B. -- 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 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