[symfony-users] Help needed for forms
Hello, I’ve spent a lot of time trying with forms in Symfony2, but I don´t got results. I want to have the typical system which let me Edit, Create and Delete a record from a database. I’ve defined: 1) MyBundle/Entity/articles.php: namespace My\BackBundle\Entity; /** * @orm:Entity */ class Articles { /** * @orm:GeneratedValue * @orm:Id * @orm:Column(type=integer) */ private $id; /** * @orm:Column(type=integer) */ private $name; ….. getters and setters 2) MyBundle/Resources/views/Articles/edit.html.twig form method=post action={{ path(back_articles_edit, {id: form.id-getData()}) }} {{ form_field(form) }} input type=submit value=Guardar / /form 3) MyBundle/Controller/ArticlesController.php public function editAction($id) { $form = ArticlesForm::create($this-get('form.context'), 'articles'); $request = $this-get('request'); $metodo=$request-getMethod(); switch ($metodo) { case 'GET': $em = $this-get('doctrine.orm.entity_manager'); $article = $em-find('MyBackBundle:Articles, $id); if (!$article) { throw new NotFoundHttpException(Article not found.); } // I think, here I should bind the data retrieved to the form. But How return array('form'=$form); break; case 'POST': // Here, I should get the submitted data, validate and save to the database. How break; } } I’ve made a lot of change and I’m so tired. Any answer will be welcome. Thanks Un saludo Sergio Pérez Informática ALBATRONIC, SL Av. Blas Otero, 10 Local 1 18200 Maracena - Granada Tlf: +34 958410343 Fax: +34 958421504 www.albatronic.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] help how to get current user object while using UserBundle
Hi I am trying to get the user object within my controller action but i am having a hard time finding the method to fetch current user If I use findUserByConfirmationToken($token) then where do I get the $token from? I don't want to bypass ACL checks so I need to find the correct way to fetch current user anyone please help or hint how can I do this, thanks! Luis -- 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] HELP generate admin from view table
Hi, all I want to generate admin page by select from view table, how can i do this? ex. i have a view table vw_report , then i want to generate admin by selecting from that, i use doctrine, and plugin sfAdminThemejRollerPlugin. #anyway, i just want to have a page which generate by selecting from view anyone can help me? sorry for my poor english. -- 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] help with translation?
hi- i am trying to use translation in the twig file generated by a controller. it doesn't work (the page is generated as normal, with no translation). here are the things i have done: in app/config/config.yml i added this line: translator: { fallback: en } i created MyBundle/Resources/translations and put messages.fr_FR.php there. that file contains: ?php return array( 'Symfony2 is great' = 'J\'aime Symfony2', 'Welcome'= 'Bienvenue', ); ? in my controller, i include: use Symfony\Component\Translation\Translator; use Symfony\Component\Locale\Locale; also, in my controller, i manually set the locale as follows: $this-container-get('request')-getSession()-setLocale('fr_FR'); in the twig file generated by the controller i made, i have: {% trans %}Welcome{% endtrans %} However, it displays as Welcome when I use the controller to render the twig file instead of the translated version. I have read doc carefully, but I can't tell what I am missing. Can someone please help me? -- 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
Re: [symfony-users] help with translation?
Le 14/02/2011 21:18, violyn a écrit : hi- i am trying to use translation in the twig file generated by a controller. it doesn't work (the page is generated as normal, with no translation). here are the things i have done: in app/config/config.yml i added this line: translator: { fallback: en } i created MyBundle/Resources/translations and put messages.fr_FR.php there. that file contains: ?php return array( 'Symfony2 is great' = 'J\'aime Symfony2', 'Welcome'= 'Bienvenue', ); ? in my controller, i include: use Symfony\Component\Translation\Translator; use Symfony\Component\Locale\Locale; This is not needed if you don't use the class in your controller. also, in my controller, i manually set the locale as follows: $this-container-get('request')-getSession()-setLocale('fr_FR'); in the twig file generated by the controller i made, i have: {% trans %}Welcome{% endtrans %} However, it displays as Welcome when I use the controller to render the twig file instead of the translated version. I have read doc carefully, but I can't tell what I am missing. Can someone please help me? Do your clear your cache after enabling the translator ? This requires to re-compile the Twig templates to call the translator. -- Christophe | Stof -- 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] Help with form validators
Hi, This is probably a basic question, and yet I can't seem to figure out the best way to do this. I have a registration form that has several fields, including 2 dependent ones: - Country - State. If Country == Canada, then I want the state field to have a drop down of all provinces If Country == US, then I want the state field to have a drop down of all states If Country == anything else, then I want the state field to be a text field I can figure out how to do it using jQuery (and use an onchange event on the Country drop down), however, am not sure if there isn't a better solution. I know there is a DoctrineChain plugin, but my list of provinces/states is not coming from the database. Additionally, I'm very stumped as to how to do validation for these fields. If Country == Canada or US, then state is required. If Country == antyhgin else then state is optional. I've considered using the PostValidator for the form, but am really not quite sure how to do this properly. Any advice or suggestions would be greatly appreciated. I tried looking through the manuals, but haven't found anything that has helped point me in the right direction. Thanks! Eric -- 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
Re: [symfony-users] Help getting the autoloader working within a component class?
Stick that form into either root/lib or into root/apps/frontend/lib On Mon, Jan 10, 2011 at 10:01 PM, Eric B ebenza...@gmail.com wrote: Hi, I've run into a problem with a component instantiating an existing form, so it has prompted me to look into the autoloader to figure out why it isn't seeing the class. I've come to the conclusion that I can't seem to figure either out. So I guess this becomes a 2 part question; one is just a request for help to see how/why to instantiate a form within my component, and one to get a little more info on how the autoloader is supposed to find the class. Part 1: My component is fairly simple: frontend/modules/secure/actions/components.class.php: class secureComponents extends sfComponents { public function executeLogin() { // instantiate the login form $this-login = new LoginForm(); } } frontend/modules/secure/lib/form/LoginForm.class.php: class LoginForm extends sfForm { public function configure() { $this-setWidgets( array( 'email' = new sfWidgetFormInputText( array(), array( required = true ) ), 'password' = new sfWidgetFormInputPassword( array(), array( required = true ) ), ) ); $this-setValidators( array( 'email' = new sfValidatorEmail( array(), array( invalid = Invalid email entered) ), 'password' = new sfValidatorString(), ) ); $this-getWidgetSchema()-setNameFormat('login[%s]'); } } My call to the component from within the layout template: frontend/templates/layout.php: ?php include_component( secure, login )? When I try to view any page, I get the following error message: *Fatal error*: Class 'LoginForm' not found in * E:\Dev\Projects\MIPP\apps\frontend\modules\secure\actions\components.class.php * on line *13* And thus, I started looking at the autoloader to determine why it isn't finding the LoginForm in my component class. But I can't figure out how the autoloader is supposed to find the LoginForm class. When I look at the autoload/getClassPath() method in sfCoreAutoload I don't see how it is searching for the LoginForm class. I see the component calling the getClassPath method by stepping through the code when it tries to instantiate the LoginForm class, but it never finds it. Am I overseeing something simple somewhere? Am I searching for something in the wrong place? Thanks, Eric -- 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.comsymfony-users%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc -- 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
Re: [symfony-users] Help getting the autoloader working within a component class?
Thanks. That seems to work much better. Although I'm still not sure I understand exactly why, considering that the component is part of the same module that is trying to instantiate the LoginForm. I am, however, having difficulty getting my component template to use a slot. Should it be able to? I've included use_helper( partial ) at the top of the component template, and have the appropriate slot()/end_slot() calls, but the content doesn't seem to be pushed into the appropriate slot of the global layout.php template. Is that expected behaviour from a component, or is there a problem with my code? Thx, Eric On Tue, Jan 11, 2011 at 11:32 AM, Gareth McCumskey gmccums...@gmail.comwrote: Stick that form into either root/lib or into root/apps/frontend/lib On Mon, Jan 10, 2011 at 10:01 PM, Eric B ebenza...@gmail.com wrote: Hi, I've run into a problem with a component instantiating an existing form, so it has prompted me to look into the autoloader to figure out why it isn't seeing the class. I've come to the conclusion that I can't seem to figure either out. So I guess this becomes a 2 part question; one is just a request for help to see how/why to instantiate a form within my component, and one to get a little more info on how the autoloader is supposed to find the class. Part 1: My component is fairly simple: frontend/modules/secure/actions/components.class.php: class secureComponents extends sfComponents { public function executeLogin() { // instantiate the login form $this-login = new LoginForm(); } } frontend/modules/secure/lib/form/LoginForm.class.php: class LoginForm extends sfForm { public function configure() { $this-setWidgets( array( 'email' = new sfWidgetFormInputText( array(), array( required = true ) ), 'password' = new sfWidgetFormInputPassword( array(), array( required = true ) ), ) ); $this-setValidators( array( 'email' = new sfValidatorEmail( array(), array( invalid = Invalid email entered) ), 'password' = new sfValidatorString(), ) ); $this-getWidgetSchema()-setNameFormat('login[%s]'); } } My call to the component from within the layout template: frontend/templates/layout.php: ?php include_component( secure, login )? When I try to view any page, I get the following error message: *Fatal error*: Class 'LoginForm' not found in * E:\Dev\Projects\MIPP\apps\frontend\modules\secure\actions\components.class.php * on line *13* And thus, I started looking at the autoloader to determine why it isn't finding the LoginForm in my component class. But I can't figure out how the autoloader is supposed to find the LoginForm class. When I look at the autoload/getClassPath() method in sfCoreAutoload I don't see how it is searching for the LoginForm class. I see the component calling the getClassPath method by stepping through the code when it tries to instantiate the LoginForm class, but it never finds it. Am I overseeing something simple somewhere? Am I searching for something in the wrong place? Thanks, Eric -- 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.comsymfony-users%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc -- 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.comsymfony-users%2bunsubscr...@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] Help getting the autoloader working within a component class?
Hi, I've run into a problem with a component instantiating an existing form, so it has prompted me to look into the autoloader to figure out why it isn't seeing the class. I've come to the conclusion that I can't seem to figure either out. So I guess this becomes a 2 part question; one is just a request for help to see how/why to instantiate a form within my component, and one to get a little more info on how the autoloader is supposed to find the class. Part 1: My component is fairly simple: frontend/modules/secure/actions/components.class.php: class secureComponents extends sfComponents { public function executeLogin() { // instantiate the login form $this-login = new LoginForm(); } } frontend/modules/secure/lib/form/LoginForm.class.php: class LoginForm extends sfForm { public function configure() { $this-setWidgets( array( 'email' = new sfWidgetFormInputText( array(), array( required = true ) ), 'password' = new sfWidgetFormInputPassword( array(), array( required = true ) ), ) ); $this-setValidators( array( 'email' = new sfValidatorEmail( array(), array( invalid = Invalid email entered) ), 'password' = new sfValidatorString(), ) ); $this-getWidgetSchema()-setNameFormat('login[%s]'); } } My call to the component from within the layout template: frontend/templates/layout.php: ?php include_component( secure, login )? When I try to view any page, I get the following error message: *Fatal error*: Class 'LoginForm' not found in * E:\Dev\Projects\MIPP\apps\frontend\modules\secure\actions\components.class.php * on line *13* And thus, I started looking at the autoloader to determine why it isn't finding the LoginForm in my component class. But I can't figure out how the autoloader is supposed to find the LoginForm class. When I look at the autoload/getClassPath() method in sfCoreAutoload I don't see how it is searching for the LoginForm class. I see the component calling the getClassPath method by stepping through the code when it tries to instantiate the LoginForm class, but it never finds it. Am I overseeing something simple somewhere? Am I searching for something in the wrong place? Thanks, Eric -- 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] Help with sfDoctrineGuardPlugin
I want to embed the login form of the DoctrineGuardPlugIn into my layout.php. I could do this with the following code in layout.php. $class = sfConfig::get('app_sf_guard_plugin_signin_form', 'sfGuardFormSignin'); $form = new $class();? form action=?php echo url_for('@sf_guard_signin') ? method=post table tbody ?php echo $form ? /tbody tfoot tr td colspan=2 input type=submit value=?php echo __('Signin', null, 'sf_guard') ? / /td /tr /tfoot /table /form But when my login fails, I don't want to navigate to any sign in page. I want the page to be the same with the Invalid username/password shown above my login block. Also when I write the above code and click on a link bound to a secure action, it takes me to a signup page where i have the login block form my layout as well as the one in the sign up form. Please help!!! -- 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] Help with Routing
Hello first, my english is very basic. well, I need create a route for links like that http://domain/c/:slug/:node/filter1-value1|value2|..|valueN/.../filterN-valueN1|valueN2 i try it using this in routing.yml show: url: /c/:slug/:node/* param: { module: module1, action: action1 } requirements: node: \d+ but the values that i obtan in my action are like that: filter1-value1|value2|...|valueN = something I wish to obtain filter1 = value1|value2|...valueN filterN = valueN1|valueN2... how i can recover the tokens for filters? please help me, Greetings -- 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] [help] one to many relationship on admin generator
Hi all, I want to ask question, how to show relation on admin generator. example: in backend i have article list (which generated by admin gen), i want if i click each of one article, i get list of comment for that article.. I use symfony 1.4, doctrine, and sfAdminThemeJrollerPlugin (jquery). maybe,laiguAdminThemeplugin can be inspiration. but it is extJs based. -- 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] Help Optimization Loading Symfony
Hi, My company started a web service project using symfony 1.4.x + Doctrine + MySQL (FYI: I upgraded the project to 1.4.8) few months ago. Just to let you know what we are doing it's kind of openfeint (http:// openfeint.com/) webservices to handle a community, leaderboards, game profile (level, xp, ...), virtual currency and items. The system is hosted on Amazon EC2 we are using 1 server for MySQL (ubuntu 10.10 large 64bits percona server 5.1) and many servers (ec2 large 64bits ubuntu 9.04 + Nginx 0.7 + PPHP-FPM 5.3 + Memcached + APC) depending of the number of users using the services, they are behind a load balancer. Our main problem is the variance of the response time for example a service returning the timestamp of the server (http:// services.yagasp.com/time/get.json) is between 85-200ms. The 2nd problem is the latency from chrome dev tool we have almost at each request 100-200ms of latency and I have no idea of the reason (the load average of the server is always under 1.0). The request time can be checked easily from a facebook games we developped: Masterchef (http://apps.facebook.com/mastercheflejeu) Now I'm assigned to the project to debug and optimize it. You will see below all the tests, modifications I did to solve those problems, without real success. 1. I thought that it was linked to our system: sclar (https:// www.scalr.net/) that wasn't fast enough to launch new instances but after many tests I saw that i wasn't the case and our settings where good. 2. Then I noticed that symfony open a connection to db at each request so I'd changed the server:mysql to percona (http://www.percona.com/ software/percona-server/) to be sure that the db server is able to handle high number of connections (stat from the db max 30 connections) but I'm pretty sure that php driver are optimized to keep a pool of connection opened. It didn't change anything about time response or latency. 3. Log of slow queries, all our sql queries are executed in less than 100ms, I know that we are using a lot of join with doctrine and it's not recommended for performance but right now I'm not sure that it explains our time response for services not doing any sql requests like time :D (I checked with symfony debug consol) 4. Log execution time of each request from nginx. It seems that there are all under 200ms so it means the info returned by chrome dev tools are not false. Great news but it's doesn't really help us in our case. 5. Using ab to see the time response the only information that it gave me is that with concurrency the time response is increasing but at a specific level (that I didn't defined) it's not the case. It doesn't make any sense but you will see the charts at this urls: http://www.megaupload.com/?d=SVR7T690 and http://www.megaupload.com/?d=IDYZCMAX 6. Profiling with XHProf (http://www.megaupload.com/?d=FCK266ZW) TI saw which methods are consuming a lot of time at each request (I'used the service time in prod environment) and it seems that it's the initialization and the loading of the classes so we are probably messing with parameters making the framework slower than it should be. Thanks for all the users that will spend the time to read and if you have any hints that could help me optimize the loading of symfony please let me know. Cheers, Mathieu -- 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
Re: [symfony-users] Help Optimization Loading Symfony
Hello, About loading performances: for doctrine : http://www.doctrine-project.org/documentation/manual/1_0/en/improving-performance:compile for symfony : http://www.symfony-project.org/book/1_0/18-performance search for Optimizing your code Regards, Before Printing, Think about Your Environmental Responsibility! Avant d'Imprimer, Pensez à Votre Responsabilitée Environnementale! On Thu, Dec 30, 2010 at 2:54 PM, Wizermil mathieu.gar...@gmail.com wrote: Hi, My company started a web service project using symfony 1.4.x + Doctrine + MySQL (FYI: I upgraded the project to 1.4.8) few months ago. Just to let you know what we are doing it's kind of openfeint (http:// openfeint.com/) webservices to handle a community, leaderboards, game profile (level, xp, ...), virtual currency and items. The system is hosted on Amazon EC2 we are using 1 server for MySQL (ubuntu 10.10 large 64bits percona server 5.1) and many servers (ec2 large 64bits ubuntu 9.04 + Nginx 0.7 + PPHP-FPM 5.3 + Memcached + APC) depending of the number of users using the services, they are behind a load balancer. Our main problem is the variance of the response time for example a service returning the timestamp of the server (http:// services.yagasp.com/time/get.json) is between 85-200ms. The 2nd problem is the latency from chrome dev tool we have almost at each request 100-200ms of latency and I have no idea of the reason (the load average of the server is always under 1.0). The request time can be checked easily from a facebook games we developped: Masterchef (http://apps.facebook.com/mastercheflejeu) Now I'm assigned to the project to debug and optimize it. You will see below all the tests, modifications I did to solve those problems, without real success. 1. I thought that it was linked to our system: sclar (https:// www.scalr.net/) that wasn't fast enough to launch new instances but after many tests I saw that i wasn't the case and our settings where good. 2. Then I noticed that symfony open a connection to db at each request so I'd changed the server:mysql to percona (http://www.percona.com/ software/percona-server/) to be sure that the db server is able to handle high number of connections (stat from the db max 30 connections) but I'm pretty sure that php driver are optimized to keep a pool of connection opened. It didn't change anything about time response or latency. 3. Log of slow queries, all our sql queries are executed in less than 100ms, I know that we are using a lot of join with doctrine and it's not recommended for performance but right now I'm not sure that it explains our time response for services not doing any sql requests like time :D (I checked with symfony debug consol) 4. Log execution time of each request from nginx. It seems that there are all under 200ms so it means the info returned by chrome dev tools are not false. Great news but it's doesn't really help us in our case. 5. Using ab to see the time response the only information that it gave me is that with concurrency the time response is increasing but at a specific level (that I didn't defined) it's not the case. It doesn't make any sense but you will see the charts at this urls: http://www.megaupload.com/?d=SVR7T690 and http://www.megaupload.com/?d=IDYZCMAX 6. Profiling with XHProf (http://www.megaupload.com/?d=FCK266ZW) TI saw which methods are consuming a lot of time at each request (I'used the service time in prod environment) and it seems that it's the initialization and the loading of the classes so we are probably messing with parameters making the framework slower than it should be. Thanks for all the users that will spend the time to read and if you have any hints that could help me optimize the loading of symfony please let me know. Cheers, Mathieu -- 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.comsymfony-users%2bunsubscr...@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
Re: [symfony-users] help with symfony chapter 3...data model
Of course, feel free to create that directory web/uploads/jobs/ ;) That should gonna make it. 2010/12/22 Wiynn wiynn...@gmail.com in the data model chapter this is explaind but i donot get it The job fixture file references two images. You can download them (http://www.symfony-project.org/get/jobeet/sensio-labs.gif, http://www.symfony-project.org/get/jobeet/extreme-sensio.gif) and put them under the web/uploads/jobs/ directory. i realise that i donot have this path but mine is web/uploads should i create the jobs as a new folder and then put those images ? when i run my stuff in a browser i only get the text but the images are donot appear in the layout..am vey new to this what should ido 2 download these pictures. pliz help -- 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.comsymfony-users%2bunsubscr...@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] help with symfony chapter 3...data model
in the data model chapter this is explaind but i donot get it The job fixture file references two images. You can download them (http://www.symfony-project.org/get/jobeet/sensio-labs.gif, http://www.symfony-project.org/get/jobeet/extreme-sensio.gif) and put them under the web/uploads/jobs/ directory. i realise that i donot have this path but mine is web/uploads should i create the jobs as a new folder and then put those images ? when i run my stuff in a browser i only get the text but the images are donot appear in the layout..am vey new to this what should ido 2 download these pictures. pliz help -- 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] help needed for newbie
I am a bit new to this symfony framework. I am having a problem seeing the images on the Symfony Project Created page. I can see all the writing but no pictures. I installed the project using netbeans. I am attempting to do the project described on the main site http://www.symfony-project.org/. I am on day one. It says, if I get no images that I should check that my server can see the path symfony_data/web/sf/directory. How do i do this Any help much appreciated Reto -- 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
Re: [symfony-users] help needed for newbie
2 solutions : copy and paste the folder lib/vendor/symfony/data/web/sf/ in web/ or in web/ , do : ln -s yourproject/lib/vendor/symfony/data/web/sf . Jérémie Le vendredi 22 octobre 2010 à 11:11 -0700, apc...@dsl.pipex.com a écrit : I am a bit new to this symfony framework. I am having a problem seeing the images on the Symfony Project Created page. I can see all the writing but no pictures. I installed the project using netbeans. I am attempting to do the project described on the main site http://www.symfony-project.org/. I am on day one. It says, if I get no images that I should check that my server can see the path symfony_data/web/sf/directory. How do i do this Any help much appreciated Reto -- 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
Re: [symfony-users] help needed for newbie
or u can add this line in ur web server config file alias sf yourproject/lib/vendor/symfony/data/web/sf this sud work .. ashish On Sat, Oct 23, 2010 at 12:10 AM, Jérémie jeremie.symf...@gmail.com wrote: 2 solutions : copy and paste the folder lib/vendor/symfony/data/web/sf/ in web/ or in web/ , do : ln -s yourproject/lib/vendor/symfony/data/web/sf . Jérémie Le vendredi 22 octobre 2010 à 11:11 -0700, apc...@dsl.pipex.com a écrit : I am a bit new to this symfony framework. I am having a problem seeing the images on the Symfony Project Created page. I can see all the writing but no pictures. I installed the project using netbeans. I am attempting to do the project described on the main site http://www.symfony-project.org/. I am on day one. It says, if I get no images that I should check that my server can see the path symfony_data/web/sf/directory. How do i do this Any help much appreciated Reto -- 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.comsymfony-users%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- Regards Ashish Kumar +919916810048 ash...@hobit.in -- 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] Help on sfValidatorDoctrineUnique during UPDATE please
Hi, I have this validator that works great when doing an INSERT but it fails on UPDATE. During UPDATE it returns that the URL is a duplicate. I know I should use $this-validatorSchema-setPostValidator, however, I'm having a tough time getting it to work due to the way I'm using sfValidatorDoctrineUnique. I'm basically checking the URL on five different columns at a time. Anyone know how to make it work for setPostValidator? Thank you! $error = This URL has already been reported - this is a duplicate; $this-validatorSchema[url] = new sfValidatorAnd(array( new sfValidatorUrl(), new sfValidatorDoctrineUnique(array('model' = 'TetCase','column'= array('url'),'throw_global_error' = true), array('invalid' = $error)), new sfValidatorDoctrineUnique(array('model' = 'TetCase','column'= array('url1'),'throw_global_error' = true), array('invalid' = $error)), new sfValidatorDoctrineUnique(array('model' = 'TetCase','column'= array('url2'),'throw_global_error' = true), array('invalid' = $error)), new sfValidatorDoctrineUnique(array('model' = 'TetCase','column'= array('url3'),'throw_global_error' = true), array('invalid' = $error)), new sfValidatorDoctrineUnique(array('model' = 'TetCase','column'= array('url4'),'throw_global_error' = true), array('invalid' = $error))), array('halt_on_error' = true, 'required' = false)); -- 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] help with action preExecute() and forward()
Hello, After read some posts, I'd learned the rule that one action for one template. So I now need some architect's ideas to solve a case. To fill a slot used in the layout, I call a DB Query in the action::preExecute(). But when there is an action::forward(), this preExecute() is called twice, and so the DB Query too. That's the problem : - Where may I put the DB Query ? - Where to fill the slot ? thanks a lot for your lights ;-) Cyrille. -- 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
Re: [symfony-users] help with action preExecute() and forward()
Fill the slot using an action? No need to use preExecute(). preExecute is usually only called when every action in your module has some pre-processing that needs doing. On Wed, Sep 1, 2010 at 10:10 AM, Cyrille37 cyrill...@gmail.com wrote: Hello, After read some posts, I'd learned the rule that one action for one template. So I now need some architect's ideas to solve a case. To fill a slot used in the layout, I call a DB Query in the action::preExecute(). But when there is an action::forward(), this preExecute() is called twice, and so the DB Query too. That's the problem : - Where may I put the DB Query ? - Where to fill the slot ? thanks a lot for your lights ;-) Cyrille. -- 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.comsymfony-users%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc -- 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
Re: [symfony-users] help with action preExecute() and forward()
Hi, You should use a component slot. Regards, On 09/01/2010 10:10 AM, Cyrille37 wrote: Hello, After read some posts, I'd learned the rule that one action for one template. So I now need some architect's ideas to solve a case. To fill a slot used in the layout, I call a DB Query in the action::preExecute(). But when there is an action::forward(), this preExecute() is called twice, and so the DB Query too. That's the problem : - Where may I put the DB Query ? - Where to fill the slot ? thanks a lot for your lights ;-) Cyrille. -- 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] Help with model
Hi, I'm trying to over ride a base model value. Its super simple but im not sure how it should be done? /** * This class has been auto-generated by the Doctrine ORM Framework */ class Customer extends BaseCustomer { public function getFirstname() { return strtoupper($this-firstname); } } -- 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] HELP: error sending mail
When i try send a email i get the next error: Catchable fatal error: Argument 1 passed to Swift_Transport_AbstractSmtpTransport::registerPlugin() must be an instance of Swift_Events_EventListener, instance of sfMailerMessageLoggerPlugin given, called in /SGF_All/SGF/lib/ symfony13/lib/mailer/sfMailer.class.php on line 140 and defined in / SGF_All/SGF/lib/symfony13/lib/vendor/swiftmailer/classes/Swift/ Transport/AbstractSmtpTransport.php on line 247 i searched in google but I'm don't know what is bad. I send the email: $message = $this-getMailer()-compose(); $message-setSubject('Asunto'); $message-setTo($email); $message-setFrom('server...@mail.cu'); $message-setBody($mailBody); $this-getMailer()-send($message); And in my factories.yml file I have: mailer: class: sfMailer param: logging: %SF_LOGGING_ENABLED% charset: %SF_CHARSET% delivery_strategy: realtime transport: class: Swift_SmtpTransport param: host: 10.8.5.5 port: 25 encryption: ~ username: u...@mail.es password: pass Please I need your help -- 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
Re: [symfony-users] Help me in this problem starting symfony on ubuntu and xampp
First of all, as has been said, do not work as root EVER on a linux system. Users are there for your protection. Secondly, this problem is simply because you are trying to access your newly created symfony application from a browser as a user trying to get to a directory with the user for that directory being www-data. The best way to resolve this in Ubuntu is to add your user (that you browse with) to the www- data user group. You can also then add the www-data user to your group. This means that as a user you can access web apps you create under /var/www as if you were the www-data user. There are applets within Ubuntu under System Administration to help make that easy so no need really to use command line to do this. Hope that helps :) On Thursday 17 June 2010 20:27:40 Dina aquarius wrote: Dear Symfony Users, You are users and me is just a beginner who can't start the using until now because of the errors. I installed ubuntu and xampp using the root user not sudo or gksudo. Also, did the same for installing symfony. I created the projects directory in the /root ( the directory of the root user not /home directory of the local users). I created the project app and frontend. I configured the Httpd.conf like this: *VirtualHost *:80 * *ServerName localhost * *DocumentRoot /root/myproject/web * *DirectoryIndex index.php * *Alias /sf /usr/share/php/data/symfony/web/sf * *Directory /usr/share/php/data/symfony/web/sf * * AllowOverride All * * Allow from All * */Directory * *Directory /root/myproject/web * * AllowOverride All * * Allow from All * */Directory * */VirtualHost * the http://localhost; works fine ( i.e the Xampp). But the *http://localhost/frontend_dev.php/; don't works and says * Access forbidden! You don't have permission to access the requested directory. There is either no index document or the directory is read-protected. If you think this is a server error, please contact the webmastery...@example.com. Error 403 Will it be solved if I repeat the steps but create the project folder outside the root? Please, help me urgently. Thanks for your time, Dina -- 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] Help me in this problem starting symfony on ubuntu and xampp
Dear Symfony Users, You are users and me is just a beginner who can't start the using until now because of the errors. I installed ubuntu and xampp using the root user not sudo or gksudo. Also, did the same for installing symfony. I created the projects directory in the /root ( the directory of the root user not /home directory of the local users). I created the project app and frontend. I configured the Httpd.conf like this: *VirtualHost *:80 * *ServerName localhost * *DocumentRoot /root/myproject/web * *DirectoryIndex index.php * *Alias /sf /usr/share/php/data/symfony/web/sf * *Directory /usr/share/php/data/symfony/web/sf * * AllowOverride All * * Allow from All * */Directory * *Directory /root/myproject/web * * AllowOverride All * * Allow from All * */Directory * */VirtualHost * the http://localhost; works fine ( i.e the Xampp). But the *http://localhost/frontend_dev.php/; don't works and says * Access forbidden! You don't have permission to access the requested directory. There is either no index document or the directory is read-protected. If you think this is a server error, please contact the webmastery...@example.com. Error 403 Will it be solved if I repeat the steps but create the project folder outside the root? Please, help me urgently. Thanks for your time, Dina -- 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
Re: [symfony-users] Help me in this problem starting symfony on ubuntu and xampp
On Thu, Jun 17, 2010 at 2:27 PM, Dina aquarius dina.aquariu...@gmail.com wrote: Dear Symfony Users, You are users and me is just a beginner who can't start the using until now because of the errors. I installed ubuntu and xampp using the root user not sudo or gksudo. Also, did the same for installing symfony. I created the projects directory in the /root ( the directory of the root user not /home directory of the local users). I created the project app and frontend. I configured the Httpd.conf like this: VirtualHost *:80 ServerName localhost DocumentRoot /root/myproject/web DirectoryIndex index.php Alias /sf /usr/share/php/data/symfony/web/sf Directory /usr/share/php/data/symfony/web/sf AllowOverride All Allow from All /Directory Directory /root/myproject/web AllowOverride All Allow from All /Directory /VirtualHost the http://localhost; works fine ( i.e the Xampp). But the http://localhost/frontend_dev.php/ don't works and says Access forbidden! You don't have permission to access the requested directory. There is either no index document or the directory is read-protected. If you think this is a server error, please contact the webmaster. Error 403 Will it be solved if I repeat the steps but create the project folder outside the root? Please, help me urgently. Thanks for your time, Dina -- 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 Do never work as root! That will never work because the webserver can not access any directory inside the root directory. Try moving the code to a user directory and make sure that his home directory has read permissions for everybody. Regards. -- Diego Bello Carreño -- 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
Re: [symfony-users] Help me in this problem starting symfony on ubuntu and xampp
test with ./symfony project:permissions if is don't work your web file must be www-data chmod -R www-data:www-data but i'am not sure 2010/6/17 Diego Bello dbe...@gmail.com On Thu, Jun 17, 2010 at 2:27 PM, Dina aquarius dina.aquariu...@gmail.com wrote: Dear Symfony Users, You are users and me is just a beginner who can't start the using until now because of the errors. I installed ubuntu and xampp using the root user not sudo or gksudo. Also, did the same for installing symfony. I created the projects directory in the /root ( the directory of the root user not /home directory of the local users). I created the project app and frontend. I configured the Httpd.conf like this: VirtualHost *:80 ServerName localhost DocumentRoot /root/myproject/web DirectoryIndex index.php Alias /sf /usr/share/php/data/symfony/web/sf Directory /usr/share/php/data/symfony/web/sf AllowOverride All Allow from All /Directory Directory /root/myproject/web AllowOverride All Allow from All /Directory /VirtualHost the http://localhost; works fine ( i.e the Xampp). But the http://localhost/frontend_dev.php/; don't works and says Access forbidden! You don't have permission to access the requested directory. There is either no index document or the directory is read-protected. If you think this is a server error, please contact the webmaster. Error 403 Will it be solved if I repeat the steps but create the project folder outside the root? Please, help me urgently. Thanks for your time, Dina -- 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.comsymfony-users%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en Do never work as root! That will never work because the webserver can not access any directory inside the root directory. Try moving the code to a user directory and make sure that his home directory has read permissions for everybody. Regards. -- Diego Bello Carreño -- 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.comsymfony-users%2bunsubscr...@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
Re: [symfony-users] Help with doctrine SQL
Not a collection ? so you should probably use a limit 1 statement ... but if you want to get back multiple entrys the collection should be the right thing !? 2010/5/24 Simone Fumagalli simone.fumaga...@gmail.com: Hello. I'm trying to write this SQL statement in DQL ! The SQL looks like : SELECT SUM(col1), SUM(col2), SUM(col3) FROM slave_table WHERE master_id = ? AND ( (year = ? and month ? and priority = ?) OR (year = ? and month ? and priority = ?) ) I also would to get back a SlaveTable object and not a Doctrine_collection Is this possible ? Thanks -- Simone -- 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] help
hello every body i put this code public function executeCreate(sfWebRequest $request) { $this - formpersonne= new personneForm(); $this-form = $this-configuration-getForm($this-personne); if ($request-isMethod('post')) { $this-form-bind($request-getParameter($this-form-getName())); if ($this-form-isValid()) { $head = From: Admin .$email_admin.\n; $object = 'inscription reussite'; $message='je vous informe que vous êtes inscrit dans votre association'; $email=$this-form-getValue('Email'); mail($email, $object, $message, $head); sfView::NONE; return $this-redirect($this-getRequest()-getReferer()); } the MSG has be send successfuly but the data doest add in the database 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
Re: [symfony-users] help
Hi again, you forgot to call $this-form-save(); Hope this helps, Pietro hello every body i put this code public function executeCreate(sfWebRequest $request) { $this - formpersonne= new personneForm(); $this-form = $this-configuration-getForm($this-personne); if ($request-isMethod('post')) { $this-form-bind($request-getParameter($this-form-getName())); if ($this-form-isValid()) { $head = From: Admin.$email_admin.\n; $object = 'inscription reussite'; $message='je vous informe que vous êtes inscrit dans votre association'; $email=$this-form-getValue('Email'); mail($email, $object, $message, $head); sfView::NONE; return $this-redirect($this-getRequest()-getReferer()); } the MSG has be send successfuly but the data doest add in the database 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
RE: [symfony-users] help
You need to save the 'personne' object before sending the mail $this-form-getObject()-save(); -Original Message- From: symfony-users@googlegroups.com [mailto:symfony-us...@googlegroups.com] On Behalf Of safa boubekri Sent: donderdag 13 mei 2010 11:27 To: symfony-users Subject: [symfony-users] help hello every body i put this code public function executeCreate(sfWebRequest $request) { $this - formpersonne= new personneForm(); $this-form = $this-configuration-getForm($this-personne); if ($request-isMethod('post')) { $this-form-bind($request-getParameter($this-form-getName())); if ($this-form-isValid()) { $head = From: Admin .$email_admin.\n; $object = 'inscription reussite'; $message='je vous informe que vous êtes inscrit dans votre association'; $email=$this-form-getValue('Email'); mail($email, $object, $message, $head); sfView::NONE; return $this-redirect($this-getRequest()-getReferer()); } the MSG has be send successfuly but the data doest add in the database 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 -- 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
Re: [symfony-users] help
than you a lot it's resolved -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because 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: [symfony-users] help
Don't take this the wrong way, but all the questions you have asked so far have been very basic features of symfony. Perhaps spend some more time learning symfony with the documentation provided (even do the tutorials) and you will find you wont be asking questions as much :) On Thursday 13 May 2010 11:50:28 safa boubekri wrote: than you a lot it's resolved -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because 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] help with sfWidgetFormChoice and forms
Hi, Two questions here, any advice will be apreciatted: 1- I'm using sfWidgetFormChoice in a form. The problem that i'm having is that i need to place the options tags generated by de widget into tr of a table instead using ul that the widget generates by default. Is there any way of rendering this options tags using tr/ tr? this is the line that generates the options: ... 'rdb_rooms' = new sfWidgetFormChoice(array( 'choices' = array(, ,,),'expanded' = true)), ... 2- My second doubt is about form posting, i have a form with some widgets(options, selects and text inputs) when the user submits the form and there is any validation error, the form re display the page and all the widgets display the values entered by the user as well, if the form does not present any validation problem it redirects to another page of the site. Now if the user hit the back button of the browser, the textbox inputs display the values entered by the user previusly, but all the selects and radios buttons losts it's original entered value. Why the text inputs conservers the value entered by the user and the combo+radios does not? Regards -- 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] Help - transfer of projects brings up errors
Hi, i recently trained on symfony and wanted to install the same projects we did to my ubuntu box back at home. i have already done the webserver configuration but when i try to access the jobeet application i get the following error: my previous user was symfony and current user is phpfreakcgithinji Warning: require(/home/symfony/Projects/jobeet/lib/vendor/symfony/lib/ plugins/sfDoctrinePlugin/lib/database/sfDoctrineDatabase.class.php) [function.require]: failed to open stream: No such file or directory in /home/phpfreakcgithinji/Projects/jobeet/lib/vendor/symfony/lib/ autoload/sfAutoload.class.php on line 188 please help me so that i may proceed with using symfony -- 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 To unsubscribe, reply using remove me as the subject.
Re: [symfony-users] Help - transfer of projects brings up errors
On Tue, 13 Apr 2010, xris wrote: i recently trained on symfony and wanted to install the same projects we did to my ubuntu box back at home. i have already done the webserver configuration but when i try to access the jobeet application i get the following error: my previous user was symfony and current user is phpfreakcgithinji Warning: require(/home/symfony/Projects/jobeet/lib/vendor/symfony/lib/ plugins/sfDoctrinePlugin/lib/database/sfDoctrineDatabase.class.php) [function.require]: failed to open stream: No such file or directory in /home/phpfreakcgithinji/Projects/jobeet/lib/vendor/symfony/lib/ autoload/sfAutoload.class.php on line 188 please help me so that i may proceed with using symfony DYCC? (Did You Clear Cache?) -- -- 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 To unsubscribe, reply using remove me as the subject.
[symfony-users] help
HELLO how to change username password in the form of secure authentication in an other language 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 To unsubscribe, reply using remove me as the subject.
Re: [symfony-users] help
hello i cant double the user because it must be one but for the username et password i put exactly i m sure 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 To unsubscribe, reply using remove me as the subject.
[symfony-users] help
hello i follow http://www.symfony-project.org/jobeet/1_2/Doctrine/en/13 i need your help i create an administrator user but in the exuction i have The username and/or password is invalid. i cant access to my apps backend 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 To unsubscribe, reply using remove me as the subject.
Re: [symfony-users] help
the only thing i can tell you, is to double check the username you create and be sure you remember the password exactly as you typed it iwhe you create the user. But if you need to work on the backend, you just have to edit your security.yml file and say 'off' 2010/4/5 safa boubekri boubekri.s...@gmail.com hello i follow http://www.symfony-project.org/jobeet/1_2/Doctrine/en/13 i need your help i create an administrator user but in the exuction i have The username and/or password is invalid. i cant access to my apps backend 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.comsymfony-users%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- Germana Oliveira germanaoliveirab arroba gmail punto com http://626f67.wordpress.com http://slcarabobo.wordpress.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 To unsubscribe, reply using remove me as the subject.
Re: [symfony-users] Help with Symfony routing problem.
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 /product_:brand_:name route near :name. When my url is like: http://64.13.224.188/frontend_dev.php/product_1_test I think someone alreacy answered this a few days ago. You need to configure the underscore character as a parameter separator - see the earlier answers. -- -- 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 To unsubscribe from this group, send email to symfony-users+unsubscribegooglegroups.com or reply to this email with the words REMOVE ME as the subject.
[symfony-users] Help with Symfony routing problem.
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 /product_:brand_:name route near :name. When my url is like: http://64.13.224.188/frontend_dev.php/product_1_test Does anyone know why? Thanks, Darren -- 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 To unsubscribe from this group, send email to symfony-users+unsubscribegooglegroups.com or reply to this email with the words REMOVE ME as the subject.
Re: [symfony-users] help il list
I am not sure to understand, You want to retreive category from the existing job ? right ? But if this is the case, what about the first record ? You won't have any existing category, does not make sense ... (or you have to display a select input and a free text input, then get the value from one of the two fields ...) I think you should create a jobCategory model whith one-to-many relation to your job model, this is a simplier way and faster to execute : job: connection: doctrine tableName: job columns: id_marchandise: type: integer(4) primary: true autoincrement: true job_category_id: integer sub_category: type: string(50) relations: jobCategory: type: one foreignType: many onDelete: SET NULL jobCategory: columns: name: string(128) Belgacem TLILI wrote: i have this class job: connection: doctrine tableName: job columns: id_marchandise: type: integer(4) primary: true autoincrement: true category: type: string(50) sub_category: type: string(50) i would like have the data of this table in (of my database) like a list of option in indexSuccess.php like this in html select name=job[category] id=job_category option value=1Petit Colis/option option value=2Moyen Colis/option option value=3Grand Colis/option //the data from database option value=7Petite Palette/option option value=8Moyenne Palette/option option value=9Grande Palette/option /select how can i do this how can i build a doctrine request (DQL) -- 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] Help required for generating custom templates (Symfony 1.4.3 with Doctrine)
Hi, I am a new comer to Symfony world. I am building a web application for our organisation with Symfony 1.4.3+Doctrine. I came across a problem. The default templates generated from Symfony CLI display the 'ID' column as a link to showSuccess template by default. But i don't want that. Instead I have manually modified some of my templates to include one more column called 'Actions' which displays 'View' and 'Edit' as links to showSuccess and editSuccess templates respectively. Moreover I have removed the 'ID' column completely from the templates and instead added a general 'Serial Number' column without any link. I feel this would be more user friendly than the usual template. Now how can I generate the templates automatically, by default, with my customisations from the Symfony CLI ? Do I have to modify any source files or do I have to include any configuration files ? I can't modify all my templates manually one by one, it will consume a lot of time. Please help. -- Parijatha Kumar -- 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] help
Guys i am looking for a good tutorial on how to use symfony for use feedback form example where it uses mysql database? pls send some link or tutorials on how to do it . -- 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
Re: [symfony-users] help
2010/3/8 Buddhika Perera budd...@gmail.com: Guys i am looking for a good tutorial on how to use symfony for use feedback form example where it uses mysql database? pls send some link or tutorials on how to do it . schema Notification: actAs: Signable: created: name: created_by type: integer updated: name: updated_by type: integer Timestampable: columns: user_id: { type: integer(5), notnull: true } content: { type: string(8096), notnull: true } state: { type: integer(1), notnull: true, default: 0 } indexes: notification_myindex: fields: [user_id, state, created_at] relations: User: class:sfGuardUser local:user_id foreign: id onDelete: CASCADE action ?php /** * notification actions. * * @packageportal * @subpackage notification * @author Michał Piotrowski mic...@dio.pl * @versionSVN: $Id: actions.class.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $ */ class notificationActions extends sfActions { public function executeNew(sfWebRequest $request) { $this-form = new NotificationForm(); } public function executeCreate(sfWebRequest $request) { $this-forward404Unless($request-isMethod(sfRequest::POST)); $this-form = new NotificationForm(); $this-processForm($request, $this-form); $this-setTemplate('new'); } protected function processForm(sfWebRequest $request, sfForm $form) { $form-bind($request-getParameter($form-getName()), $request-getFiles($form-getName())); if ($form-isValid()) { $this-UserData = $this-getUser()-getUserData(); $this-logged_user_id = $this-UserData['logged_user_id']; $this-logged_username = $this-UserData['logged_username']; $form-updateObject(array('user_id' = $this-logged_user_id)); $notification = $form-save(); $this-redirect('main', array('username' = $this-logged_username)); } } } _form.php ?php use_stylesheet('notification.css') ? ?php use_stylesheets_for_form($form) ? ?php use_javascripts_for_form($form) ? form action=?php echo url_for('@notification_create') ? method=post ?php $form-isMultipart() and print 'enctype=multipart/form-data ' ? table tfoot tr td colspan=2 div class=notification_submit br / input type=submit value=Wyślij / /div /td /tr /tfoot tbody ?php echo $form ? /tbody /table /form newSuccess.php ?php slot('title') ? ?php echo sprintf('%s - zgłoszenie problemu z działaniem portalu', sfConfig::get('app_portal_title')) ? ?php end_slot(); ? div id=lx6 div class=h6 div class=ht6 Zgłoszenie problemu z działaniem portalu /div /div div class=b6 div class=bt6 W treści zgłoszenia problemu z działaniem portalu prosimy o podanie jak największej ilości szczegółów dotyczących problemu - pozwoli to na szybkie jego rozwiązanie. Dziękujemy za współpracę :) br / br / ?php include_partial('form', array('form' = $form)) ? /div /div br / br / /div div id=rx3 ?php include_partial('ad/show_ad_taily', array('width' = 3)) ? br / ?php include_partial('ad/show_ad_sense', array('width' = 3)) ? br / br / /div routing notification_create: url: /portal/notification/c options: { model: Notification } param: { module: notification, action: create } notification_new: url: /portal/notification options: { model: Notification } param: { module: notification, action: new } -- 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] Help with titles in template? A global title?
Hi guys I am able to define per page and I have, however I have defined them like New Article Edit Article But in my template it does include_title(). I don't want to have to define: Site Name :: New Article Site Name :: Edit Article in every yml file. Is there a way I could do Site Name in 1 file and have it display next to the defined title? Is this possible or am I going to have to be redundant throughout all my code? Thanks, Darren -- You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-us...@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] Help with Schema
I am trying to create the following schema with the following requirements. * One to one Organization to sfGuardUser * Each organization, may have multiple campaigns. * Each campaign may have multiple addressbooks. * MessageQueue holds general information for all organizations/campaigns/addressbooks Please let me know what should I do to make it correct... thank you. # config/doctrine/schema.yml Organization: actAs: { Timestampable: ~ } columns: sf_guard_user_id: { type: integer(4) } name: { type: string(255), notnull: true, unique: true } first_name: { type: string(255) } last_name:{ type: string(255), notnull: true } phone:{ type: string(20) } mobile: { type: string(20) } email:{ type: string(255), notnull: true } logo: { type: string(255) } is_active:{ type: boolean, notnull: true, default: 1 } relations: sfGuardUser: foreign: id local: sf_guard_user_id owningSide: true type: one foreignType: one Campaign: actAs: { Timestampable: ~ } columns: organization_id: { type: integer, notnull: true } name: { type: string(255), notnull: true, unique: false } keyword: { type: string(8), notnull: true, unique: true } relations: Organization: local: organization_id foreign: id foreignType: many AddressBook: actAs: { Timestampable: ~ } columns: organization_id: { type: integer, notnull: true } campaign_id: { type: integer, notnull: true } first_name: { type: string(255) } last_name: { type: string(255), notnull: true } mobile: { type: string(20) } email: { type: string(255) } is_active: { type: boolean, notnull: true, default: 1 } relations: Organization: local: organization_id foreign: id foreignType: many CampaignAddressBook: columns: campaign_id: { type: integer, primary: true } address_book_id: { type: integer, primary: true } relations: Campaign: { onDelete: CASCADE, local: campaign_id, foreign: id } AddressBook: { onDelete: CASCADE, local: address_book_id, foreign: id } MessageQueue: actAs: { Timestampable: ~ } columns: organization_id: { type: integer, notnull: true } address_book_id: { type: integer, notnull: false } msg_from:{ type: string(255) } msg_to: { type: string(255) } message_content: { type: string(255) } status: type: enum values: [Pending,Delivered,Processed,Failed] notnull: true result_code: { type: string(255) } direction: type: enum values: [Inbound,Outbound] notnull: true keyword: { type: string(20) } message_option: { type: string(255) } data:{ type: string(255) } response_type: type: enum values: [NORMAL,UNKNOWN] notnull: false delivery_type: type: enum values: [SMS,Email] carrier: { type: string(100) } network_type: type: enum values: [gsm,cdma,tdma,iden] notnull: false received_at: { type: timestamp, notnull: false } relations: Organization:{ local: organization_id, foreign: id } AddressBook: { local: address_book_id, foreign: id } -- You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-us...@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] Help please! json_encode problem in symfony
Hi everyone, I passed many hours for this strange thing, in fact I got a problem when using json_encode in symfony. In my front-end module, method executeIndex() as below: public function executeIndex(sfWebRequest $request) { $this-test = $this-getRoute()-getObject(); // Call json_encode, but return '{}' $json = json_encode($this-test); // this simple test works $test = new stdClass(); $test-id = new stdClass(); var_dump(json_encode($test)); } I get my object from routing, and call json_encode, but in $json value, I got always '{}', So I tried another simple test with stdClass, the result is ok. My object is not null, but why after json_encode, the value is empty? Can you help me please ? Thank u so much. JoJo -- You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-us...@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: [symfony-users] Help please! json_encode problem in symfony
On Thu, 28 Jan 2010, Dong YANG wrote: Hi everyone, I passed many hours for this strange thing, in fact I got a problem when using json_encode in symfony. In my front-end module, method executeIndex() as below: public function executeIndex(sfWebRequest $request) { $this-test = $this-getRoute()-getObject(); // Call json_encode, but return '{}' $json = json_encode($this-test); // this simple test works $test = new stdClass(); $test-id = new stdClass(); var_dump(json_encode($test)); } What happens if you do this? $test = $this-getRoute()-getObject(); $json = json_encode($test); $this-test = $test; -- -- You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-us...@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] Help with should be simple stuff...
Hello, I am having trouble with the following: I am trying to override my setPassword method for my employee model but everytime I try to overwrite it I get nothing from it. I was using: public function setPassword($password) { parent::setPassword(sh1($password)); } Also is it possible to define that a column in the doctrine YAML should be unique? And also is it possible to define a MySQL function on a column? Thank You, Darren -- You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-us...@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: [symfony-users] Help with should be simple stuff...
On 12 Jan 2010, at 00:24, Darren884 wrote: I am trying to override my setPassword method for my employee model but everytime I try to overwrite it I get nothing from it. I was using: public function setPassword($password) { parent::setPassword(sh1($password)); } try... return parent::setPassword(sh1($password)); -- You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-us...@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] Help
Hi, I want to open a certain hyperlink to the desired div. I mean I don't want refresh the complate page with the hyperlink. The below one is not working. ?php echo link_to_remote('HCL OMS', array( 'update' = 'feedback', 'url' = 'http://10.0.0.4/QAPortal/', 'class' = 'yuimenuitemlabel')) ? Thanks Deepak -- You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-us...@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: [symfony-users] Help A Newbie! sfdoctrineapply - setting group id upon registration
Override the save method in your sfGuardUser class. Sf creates 3 files in the case of the plugins. A base class, a plugin class and the instantiated class I will be more verbose in around 1 hour sent via htc magic On Dec 17, 2009 5:33 AM, Billy Paradise billyparad...@gmail.com wrote: Hi all, I've been spinning for a few hours on this - admittedly I'm a very junior programmer at this point. Could you please point me in the direction so I can auto-assign all new registrations through /apply to sfGuardUserGroup 1 (for example)? I have different classes of user, and all auto-created users need to be be given a group, rather than left as NULL. I believe the magic happens in apps/frontend/modules/sfApply/lib/ BasesfApplyActions.class.php, in the executeApply function. 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-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en. -- You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-us...@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: [symfony-users] Help with display of doctrine float numbers
Hi, Which value do you have in your database ? (PHPMyAdmin or SQL client) What is the type of column defined in your schema ? 2009/12/13 PhiKapJames phikapja...@gmail.com I'm running into the issue where when I'm trying to use the default getValue() method that was automatically generated from a model, that it's not giving the correct place value. I have for examply .4123 in my database, but it is only displaying .41. When i look at the query log, it's not doing anything special to format the number. How can I get the correct full value of .4123? -- You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en. -- Alexandre Salomé http://alexandre-salome.fr -- You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-us...@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] Help with display of doctrine float numbers
I'm running into the issue where when I'm trying to use the default getValue() method that was automatically generated from a model, that it's not giving the correct place value. I have for examply .4123 in my database, but it is only displaying .41. When i look at the query log, it's not doing anything special to format the number. How can I get the correct full value of .4123? -- You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-us...@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] Help with Doctrine: yml vs. sql
Hi all, First post, great to be here and looking forward to a long successful story with Symfony. I'm just starting a project with Symfony 1.4, learning the ropes (coming from a pure SQL background, I can tell you this is a steep curve but the ol' instinct tells me this is all worth it, pressing on...) My situation in a nutshell: I have two tables, both have multiple-column primary keys and one has a multiple-column foreign key to the second. In SQL: CREATE TABLE supplier_subsector ( supplier_id integer NOT NULL, subsector_id integer NOT NULL ); ALTER TABLE ONLY supplier_subsector ADD CONSTRAINT supplier_subsectors_pkey PRIMARY KEY (supplier_id, subsector_id); CREATE TABLE supplier_request ( supplier_id integer NOT NULL, subsector_id integer NOT NULL, request_id integer NOT NULL, ); ALTER TABLE ONLY supplier_request ADD CONSTRAINT supplier_request_pkey PRIMARY KEY (supplier_id, subsector_id, request_id); ALTER TABLE ONLY supplier_request ADD CONSTRAINT supplier_request_supplier_id_fkey FOREIGN KEY (supplier_id, subsector_id) REFERENCES supplier_subsector(supplier_id, subsector_id); My /config/doctrine/schema.yml model looks like this (this was all generated by the doctrine:build-sql command, I flipped the order for clarity): SupplierSubsector: connection: doctrine tableName: supplier_subsector columns: supplier_id: type: integer(4) fixed: false unsigned: false primary: true subsector_id: type: integer(4) fixed: false unsigned: false primary: true relations: Subsector: local: subsector_id foreign: id type: one Supplier: local: supplier_id foreign: id type: one SupplierRequest: local: 'supplier_id, subsector_id' foreign: 'supplier_id, subsector_id' type: many SupplierRequest: connection: doctrine tableName: supplier_request columns: supplier_id: type: integer(4) fixed: false unsigned: false primary: true subsector_id: type: integer(4) fixed: false unsigned: false primary: true request_id: type: integer(4) fixed: false unsigned: false primary: true relations: Request: local: request_id foreign: id type: one SupplierSubsector: local: 'supplier_id, subsector_id' foreign: 'supplier_id, subsector_id' type: one When trying to build this with doctrine:build --all, I get: SQLSTATE[42601]: Syntax error: 7 ERROR: syntax error at or near , LINE 1: CREATE INDEX supplier_id, subsector_id ON supplier_request (... ^. Failing Query: CREATE INDEX supplier_id, subsector_id ON supplier_request (supplier_id, subsector_id). Failing Query: CREATE INDEX supplier_id, subsector_id ON supplier_request (supplier_id, subsector_id) with reason, seeing that it's trying to create an index with two names. The data/sql/schema.sql has: CREATE TABLE supplier_subsector (supplier_id INT, subsector_id INT, PRIMARY KEY(supplier_id, subsector_id)); CREATE TABLE supplier_request (supplier_id INT, subsector_id INT, request_id INT PRIMARY KEY(supplier_id, subsector_id, request_id)); CREATE INDEX supplier_id, subsector_id ON supplier_request (supplier_id, subsector_id); CREATE INDEX supplier_id, subsector_id ON supplier_subsector (supplier_id, subsector_id); ALTER TABLE supplier_request ADD CONSTRAINT _1 FOREIGN KEY (supplier_id, subsector_id) REFERENCES supplier_subsector(supplier_id, subsector_id) NOT DEFERRABLE INITIALLY IMMEDIATE; ALTER TABLE supplier_subsector ADD CONSTRAINT _4 FOREIGN KEY (supplier_id, subsector_id) REFERENCES supplier_request(supplier_id, subsector_id) NOT DEFERRABLE INITIALLY IMMEDIATE; Looking at this, I notice that: 1) the multiple-column primary keys are created ok 2) there are (wrongly syntaxed) indexes created on the column pairs given as foreign key references 3) the foreign keys are created with the proper syntax 4) the foreign keys are created both-ways (side question here: is this because their are defined in both classes in the yml file, or because symfony would have done it anyway?) So what's wrong here? À r'voyure, Burt. -- You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-us...@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] Help with Doctrine Model and Joins
I've just started getting into Symfony / Doctrine, but I'm running into an issue creating the join. I have a pre-existing database that I'm trying to create a new site around, so I have used doctrine:build- schema to create the model, forms, etc off of MySQL. It's using INNODB and here's the two tables sql: CREATE TABLE `Address` ( `AddressID` int(10) unsigned NOT NULL auto_increment, `StreetNumber` int(10) unsigned NOT NULL, `StreetName` varchar(100) NOT NULL, `StreetSuffix` varchar(40) NOT NULL, PRIMARY KEY (`AddressID`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE IF NOT EXISTS `House` ( `HouseID` int(10) unsigned NOT NULL auto_increment, `AddressID` int(10) unsigned NOT NULL, `Taxes` decimal(6,2) default NULL, `Active` enum('y','n') NOT NULL default 'y', PRIMARY KEY (`HouseID`), KEY `AddressID` (`AddressID`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; ALTER TABLE `House` ADD CONSTRAINT `House_ibfk_1` FOREIGN KEY (`AddressID`) REFERENCES `Address` (`AddressID`) ON DELETE CASCADE ON UPDATE CASCADE; This produced the following model (config/doctrine/schema.yml): Address: tableName: Address columns: addressid: type: integer(4) fixed: false unsigned: true primary: true autoincrement: true streetnumber: type: integer(4) fixed: false unsigned: true primary: false notnull: true autoincrement: false streetname: type: string(100) fixed: false unsigned: false primary: false notnull: true autoincrement: false streetsuffix: type: string(40) fixed: false unsigned: false primary: false notnull: true autoincrement: false relations: House: local: addressid foreign: addressid type: many House: tableName: House columns: houseid: type: integer(4) fixed: false unsigned: true primary: true autoincrement: true addressid: type: integer(4) fixed: false unsigned: true primary: false notnull: true autoincrement: false taxes: type: decimal(6) fixed: false unsigned: false primary: false notnull: false autoincrement: false scale: false active: type: enum(1) fixed: false unsigned: false values: ['y', 'n'] primary: false default: 'y' notnull: true autoincrement: false relations: Address: local: addressid foreign: addressid type: one So when I try to do: public function executeIndex(sfWebRequest $request) { $q = Doctrine_Query::create() -from('House h') -leftJoin('h.addressid a') -where('h.active = ?', 'y'); $this-house_list = $q-execute(); } I get this error: Unknown relation alias addressid I'm still learning doctrine for the first time, so I have a feeling it might be in the model where I will need to fix the schema.yml relations and the generate the model over again, but I'm not sure who it's supposed to look. All examples I've seen have the column names with two different names where both my tables have the same name for the same value, addressid. I'm also not sure when I imported the schema in, if it was smart enough to take into the acount of the innodb foreign keys. Any help would be greatly appreciated. --~--~-~--~~~---~--~~ 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] Help Criteria, Last index
Hello, i want to know how I can select last 6 rows of my table named 'users' I want to show last 6 users registred on website. But didnt know how with criteria.. Thanks all. --~--~-~--~~~---~--~~ 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] Help me for writing criteria
Hi I have 1 table in my project, called sf_guard_user_profile. In which, there are 2 fields, 1. first_name 2. last_name I m working on search module in table, suppose there is 1 entry firstname = 'John' lastname = 'Lee' In search if any body searches for 'john lee', how to match ? bcoz query should be like.. first_name+' '+last_name = 'john lee' If user searches for john or lee than I can display records, $k-getNewCriterion(sfGuardUserProfilePeer::FIRST_NAME,%.$this- query.%,Criteria::LIKE) $k-getNewCriterion(sfGuardUserProfilePeer::LAST_NAME,%.$this- query.%,Criteria::LIKE) but I dont know how to write for 'first_name' + ' ' + 'last_name' Pls help me... 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] Help with sfWidgetFormInputSWFUploadPlugin and admin generator
Hello, I'm working on a project where i require multiple file upload and i am using sfWidgetFormInputSWFUploadPlugin. All works well except that after the upload finishes i get an Errors occured during upload, An HTTP error occured: 401 Unauthorized, after looking into I saw that in the widget i am redirected to the Login page. My question is how should i fix it? How can i pass the session to the flash. Any help is appreciated. Thank you --~--~-~--~~~---~--~~ 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] Help with mixins!! Adding new actions in a module with the event dispatcher (MIXINS)
Hi! I'm trying to add new actions to some modules with mixins and the event dispatcher. I find the controller.page_not_found notify, but it didn't work. Someone knows if there is a way to add new actions with some mixin?? --~--~-~--~~~---~--~~ 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] Help-- Fatal Error Creating Forms with Symfony 1.2
Hello everyone: I'm trying to create my first form with symfony 1.2, I am following the instruction by http://www.librosweb.es/symfony_formularios/. So I created a ContactoForm class that extends of sfForms like this one and I placed it at /var/www/myfirstproject/lib/form/ContactoForm.class.php class ContactoForm extends sfForm { public function configure() { $this-setWidgets(array( 'nombre'= new sfWidgetFormInput(), 'email' = new sfWidgetFormInput(), 'mensaje' = new sfWidgetFormTextarea(), )); } } I also created a module at frontend called contacto frontend/modules/contacto and this is my action.class.php class contactoActions extends sfActions { public function executeIndex() { $this-formulario = new ContactoForm(); //this is the line that launches the Fatal error } } and in frontend/modules/contacto/templates/indexSuccess.php form action=?php echo url_for('contacto/enviar') ? method=POST table ?php echo $formulario ? tr td colspan=2 input type=submit / /td /tr /table /form But here is the problem, I did it exactly as I was told to but now in the navigator I got this error: *Fatal error*: Class 'ContactoForm' not found in */var/www/myfirstproject/apps/frontend/modules/contacto/actions/actions.class.php* on line *15* , could someone please help me --~--~-~--~~~---~--~~ 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] help
please healpme i need to install symfony with informix but a cannot install --~--~-~--~~~---~--~~ 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] Help Please! - Error with Jobeet
I´m new with symfony, and I´m trying to start with Jobeet but I have an error when trying to insert-sql with doctrine. I run the command below with this error: D:\AppServ\www\symfony\sfprojectsymfony doctrine:build-sql doctrine generating sql for models While exporting model class 'JobeetAffiliate' to SQL: Couldn't locate driver n amed mysql D:\AppServ\www\symfony\sfproject I´m stopped here. Please help me! Thanks! martin --~--~-~--~~~---~--~~ 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] help on Virtual columns display in List view of symfony demo setup tutorial day 12
Hi All If anybody has idea on how Virtual columns functionality works in day 12 of symfony demo setup tutorial(http://www.symfony-project.org/ jobeet/1_2/Doctrine/en/12#chapter_12_sub_virtual_columns). I think I followed the guide as per described and changing in file 'apps\backend \modules\job\config\generator.yml'. But still job list in admin section appears tabular. Please suggest Thanks in advance --~--~-~--~~~---~--~~ 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] help with customizing sfguard
I created sfGuardAuth folder in my app-name-here/modules here. I then create the foldesr actions and templates inside sfGuardAuth. In actions folder, I created a new actions.class.php and place the following contents: http://pastebin.ca/1551008 In templates, I created my own signinSuccess.php: http://www.pastebin.ca/1551011 (just snippet) -- If you look at the new template file, I am trying to display a variable (applicationName) that I have declared in the actions.class.php. It ways displays as blank. Any ideas? Thank you very much --~--~-~--~~~---~--~~ 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] Help text for nested form fields
Hi, Been looking around for answers to this but couldn't find one. Does anyone know how to get the help text from generator.yml to pull through to a nested form field? If that's not possible what's the best way to manually set the help text for a nested form field? 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] help needed
how to display uploaded image in template! i used img width=200px src=/civil/web/uploads/assets/abc.jpg/ it works but img width=200px src=var/www/civil/web/uploads/assets/abc.jpg/ this not works!! need help new to symfony --~--~-~--~~~---~--~~ 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] Help For Nested Form
Hi All. It's my project plan. I have *league* table. Each *league* table has many *Week* and also has many *Team* . *Week* has many *Game* , And each *Game* has two* Team* . In *Game* table i set two foreign key to *Team* table,But In my *Game* form It doesn't show two Combo box for my two foreign keys!! I Have another problem. I wanna to show all child in each parent form,User can edit and new child to this parent.And when inserting new child automatically add current parent to this child(don't show all parent). This scenario are necessary for nested model. Another problem is :When I want to add a *Game *I* *need to show all *Team *that not assigned for current *Week *and belong to the *league * of the current *Week *. Where I should define to fetch these *Team* ? --~--~-~--~~~---~--~~ 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] Help day 12
When I entered this part (jobeet day 12, section batch_actions) batch_actions: _delete: ~ extend: ~ in /jobeet/apps/backend/modules/job/config/generator.yml, i then I see the browser I do not obtained the extend parameter, why?, this my action class /jobeet/apps/backend/modules/job/actions/ actions.class.php ?php require_once dirname(__FILE__).'/../lib/ jobGeneratorConfiguration.class.php'; require_once dirname(__FILE__).'/../lib/jobGeneratorHelper.class.php'; /** * job actions. * * @packagejobeet * @subpackage job * @author Your name here * @versionSVN: $Id: actions.class.php 12474 2008-10-31 10:41:27Z fabien $ */ class jobActions extends autoJobActions { public function executeBatchExtend(sfWebRequest $request) { $ids = $request-getParameter('ids'); $jobs = JobeetJobPeer::retrieveByPks($ids); foreach ($jobs as $job) { $job-extend(true); } $this-getUser()-setFlash('notice', 'The selected jobs have been extended successfully.'); $this-redirect('@jobeet_job'); } } this my jobeet job ?php class JobeetJob extends BaseJobeetJob { public function __toString() { return sprintf('%s at %s (%s)', $this-getPosition(), $this- getCompany(), $this-getLocation()); } public function extend($force = false) { if (!$force !$this-expiresSoon()) { return false; } $this-setExpiresAt(time() + 86400 * sfConfig::get ('app_active_days')); $this-save(); return true; } help me please --~--~-~--~~~---~--~~ 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] Help with link cross applications
Hi every: I read this great article[1] wrote by Fabien and try to create a link between frontend and backend applications. For that I modified some parts of the original code from Fabien and now looks like this: class frontendConfiguration extends sfApplicationConfiguration { protected $backendRouting = null; public function configure() { $this-getActive()-loadHelpers(array('Form','I18N','Javascript','Date','Url','Tag','Asset','Partial')); } public function generateBackendURL($name, $parameters = array()) { return sfConfig::get('app_aplication_url').$this-getBackendRouting()-generate($name, $parameters); } public function getBackendRouting() { if (!$this-backendRouting) { $this-backendRouting = new sfPatternRouting(new sfEventDispatcher()); $config = new sfRoutingConfigHandler(); $routes = $config-evaluate(array(sfConfig::get('sf_apps_dir').'/backend/config/routing.yml')); $this-backendRouting-setRoutes($routes); } return $this-backendRouting; } } Also I create a Helper called LinkCrossApplicationHelper.php and put it inside /frontend/module/lib directory. The helper contains this piece of code: function link_to_backend($name, $parameters) { return sfProjectConfiguration::getActive()-generateBackendURL($name, $parameters); } Then in my template I call the helper method: ?php link_to_backend('hello', array('name' = 'Bar')) ? But I get this error: 500 | Internal Server Error | InvalidArgumentException Unable to load LinkCrossApplicationHelper.php helper in: D:\Server\www\residencia\apps\frontend\modules/reservacion/lib/helper, D:\Server\www\residencia\apps\frontend\lib/helper, D:\Server\www\residencia\lib/helper, D:/Server/SF/lib/plugins/sfProtoculousPlugin/lib/helper, D:/Server/www/residencia/plugins/sfPagerNavigationPlugin/lib/helper, D:\Server\SF\lib/helper, D:\Server\SF\lib\plugins\sfPropelPlugin\lib\vendor, D:\Server\www\residencia, D:\Server\SF\lib, ., C:\php5\pear. Can any help me at this point? Cheers and thanks in advance Ing. Reynier Pérez Mira Dirección Técnica IP --~--~-~--~~~---~--~~ 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] Help with sfGuard and LDAP external method
Hi every: I'm trying to integrate sfGuard with my LDAP. For that I add this lines to my app.yml file: /frontend/config/app.yml all: sf_guard_plugin: check_password_callable: [LDAP, checkLDAPPassword] Then I create a file called LDAP.class.php and put inside /frontend/lib directory. The method content is this: class LDAPclass extends sfGuardSecurityUser { public static function checkLDAPPassword($username, $password) { $options = array('account_suffix'='@uci.cu','base_dn'='DC=uci,DC=cu','domain_controllers'=array('10.0.0.3','10.0.0.4')); $ldap = new adLDAP($options); $authenticated = $ldap-authenticate($username, $password); if ($authenticated) { return true; } else { return false; } } } The adLDAP is another class placed also in /frontend/lib directory. When I try to execute the authentication I get this errors: Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'LDAP::checkLDAPPassword' was given in D:\Server\www\residencia\plugins\sfGuardPlugin\lib\model\plugin\PluginsfGuardUser.php on line 79 Warning: Cannot modify header information - headers already sent by (output started at D:\Server\www\residencia\plugins\sfGuardPlugin\lib\model\plugin\PluginsfGuardUser.php:79) in D:\Server\SF\lib\response\sfWebResponse.class.php on line 335 Warning: Cannot modify header information - headers already sent by (output started at D:\Server\www\residencia\plugins\sfGuardPlugin\lib\model\plugin\PluginsfGuardUser.php:79) in D:\Server\SF\lib\response\sfWebResponse.class.php on line 349 Why? What I'm doing wrong? Cheers and thanks in advance Ing. Reynier Pérez Mira Dirección Técnica IP --~--~-~--~~~---~--~~ 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] Help with admin module actions
Hi guys. I got a little question for you, hope anyone can help me. I got two tables in my model. One is called contenido, the other is called recurso. They got a many to many association which is made by the table recurso_contenido. The schema.yml part of these tables is here: http://pastebin.com/m781b2762 I want the admin page of 'recurso' to delete all records of recurso_contenido whenever I delete a recurso record. The ideal behaviour would be a flash warning that the 'recurso' and all 'recurso_contenido' references will be deleted and then -after user confirmation- delete all. At first I created an action executeListDelete() which did the delete, but couln't manage to add the javascript alert like the _delete () action does (I followed day 12 of jobeet tutorial here). So, I created an action called executeDelete() that overrides the default delete behaviour. The code for this is here: http://pastebin.com/m4ae8addf By the way, I am not using any self made template, just the auto generated by symfony. I also thought of creating a file recursoGeneratorHelper.class.php and override the linkToDeleteAll HTML output, but had no success. As I am recently starting with symfony and the second thing was something that just crossed my mind, I would like any advise possible so I follow the *correct* (or better) method. Thanks in advance, Guido Sanchez --~--~-~--~~~---~--~~ 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] Help with sfDoctrineGuard
I have used sfGuard before, but I would like to start taking advantage of Doctrine. I installed sfDoctrineGuard http://www.symfony-project.org/plugins/sfDoctrineGuardPlugin/3_0_0 and followed the README and got a basic setup working. Next I wanted to add a custom profile. The README docs still use the Propel schema format, so I created this: sfGuardUserProfile: actAs: { Timestampable: ~ } tableName: sf_guard_user_profile columns: user_id: { type: integer, primary: true } email: { type: varchar(128), notnull: true } relations: sfGuardUser: local: user_id foreign: id onDelete: CASCADE This works, but no foreign reference is setup for that table. Any ideas why that is? Next I created a fixture for the profile: sfGuardUserProfile: admin_profile: user_id: 1 email: f...@bar.com When I run ./symfony doctrine:build-all-reload I receive the following error message: Validation failed in class sfGuardUserProfile 1 field had validation error: * 1 validator failed on email (type) If I remove the email from the fixture(and set emails to allow null) a row gets inserted. If I manually try and insert those values into the database they get inserted. So if anyone can shed some light one why this fixture doesn't work, and why the foreign key reference doesn't get inserted I would appreciate it! -- *Brian Racer * Lead Developer JetPack Web Development, LLC (715) 834-3349 office br...@jetpackweb.com mailto:br...@jetpackweb.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] Help : How do you extend the admin generator (doctrine one in sf1.2) ?
I am trying to create a plugin to extend the admin generator but it seems difficult to do so. Hereafter what I did: * Installed sfTaskExtraPlugin * Used 'symfony generate:plugin myDoctrineGeneratorPlugin' in command line. * Copied data/generator folder from the sfDoctrinePlugin and lib/ generator to myDoctrineGeneratorPlugin folder. * Opened sfDoctrineGenerator class under myDoctrineGeneratorPlugin/lib/ generator and changed : - class name to : class kissDoctrineGenerator extends sfModelGenerator - $this-setGeneratorClass('sfDoctrineModule'); to $this- setGeneratorClass('kissDoctrineModule'); * changed folder name kissDoctrineGeneratorPlugin\data\generator \sfDoctrineModule to kissDoctrineGeneratorPlugin\data\generator \kissDoctrineModule. * Modifier indexsucces.php under kissDoctrineGeneratorPlugin\data \generator\kissDoctrineModule\admin\template\templates folder (added a text to display Myplugin) so that I can check the generator use the righ template files. * Opened generator.yml file of one of my simple module (created with the doctrine generate-admin task) but without any modification of any file and changed class option to kissDoctrineGenerator. * Cleared cache (symfony cc). = everything works fine. * Opened generator.yml file of a module where I set the table_method to retrieveBackendSiteList (because I use a stacked layout and wanted to have the site manager name appears instead of the manager_id in my stacked layout). = then I got an error message : Your generator configuration contains some errors for the list context. The following configuration cannot be parsed: array( 'table_method' = 'retrieveBackendSiteList',). * If I keep $this-setGeneratorClass('sfDoctrineModule') above, then I get : Unknown record property / related component plant_manager on SolveetSite (plant_manager i what I have in my stacked layout instead of plant_manager_id). * If I go back to sfDoctrineGenerator in my generator.yml file, everything works fine. = Do you have any idea what is not done correctly ? I found many tutos on the web but for the propel admin generator and not for the 1.2 one. = If anyone succeed to extend the admin generator (doctrine one), can he write a tutorial ? Thanks in advance. Frédéric --~--~-~--~~~---~--~~ 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] Help symfony newbie
Hi, I just started to use Symfony 1.1 under linux box. I have been following My First Project tutorial [1] and I am stuck in the middle of it. First of all, .htaccess were giving out errors, so I renamed it temporarily. but it wasn't a major problem. Creating tables from yaml, creating models forms were very straight. However, after clearing caches, I visited http://internal-host/control_dev.php/customer [2], it looked as I expected. Clicked on create, filled out the form clicked on save button. It went to a blank page [3]. I checked the database (mysql), and there was no record. Then I went back to [2], it showed a blank page. I checked the log file, it doesn't show much... It seems if I want to see a page, I need to clear cache. Help will be appreciated. Thanks in advance! Calvin Version: symfony version 1.1.6 (/usr/share/php/symfony) PHP 5.2.3-1ubuntu6.4 (cli) (built: Jul 23 2008 06:20:11) Copyright (c) 1997-2007 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies with Xdebug v2.0.2, Copyright (c) 2002-2007, by Derick Rethans Log: Dec 19 17:22:39 symfony [info] {sfPatternRouting} Connect / Dec 19 17:22:39 symfony [info] {sfPatternRouting} Connect / symfony/:action/* Dec 19 17:22:39 symfony [info] {sfPatternRouting} Connect /:module Dec 19 17:22:39 symfony [info] {sfPatternRouting} Connect /:module/:action/* Dec 19 17:22:39 symfony [info] {sfFrontWebController} Initialization Dec 19 17:22:39 symfony [info] {sfPatternRouting} Match route [default_index] for /:module Dec 19 17:22:39 symfony [info] {sfWebRequest} Request parameters array ( 'action' = 'index', 'module' = 'customer',) Dec 19 17:22:39 symfony [info] {myUser} Automatic user logout due to timeout Dec 19 17:22:39 symfony [info] {myUser} User is not authenticated Dec 19 17:22:39 symfony [info] {sfContext} Initialization Dec 19 17:22:39 symfony [info] {sfFrontWebController} Dispatch request Dec 19 17:22:39 symfony [info] {sfFilterChain} Executing filter sfRenderingFilter Dec 19 17:22:39 symfony [info] {sfFilterChain} Executing filter sfCommonFilter Dec 19 17:22:39 symfony [info] {sfFilterChain} Executing filter sfExecutionFilter Dec 19 17:22:39 symfony [info] {customerActions} Call customerActions-executeIndex() Dec 19 17:22:39 symfony [info] {sfDebugConnection} connect(): DSN: array ( 'compat_assoc_lower' = NULL, 'compat_rtrim_string' = NULL, 'database' = 'control-o', 'encoding' = NULL, 'hostspec' = 'localhost', 'password' = 'calvin-pma', 'persistent' = NULL, 'phptype' = 'mysql', 'port' = NULL, 'protocol' = NULL, 'socket' = NULL, 'username' = 'calvin-pma', ), FLAGS: 0 Dec 19 17:22:39 symfony [info] {sfDebugConnection} prepareStatement (): SELECT customer.ID, customer.COMPANY, customer.CONTACT_PERSON, customer.PHONE, customer.MOBILE, customer.EMAIL, customer.BILLING1, customer.BILLING2, customer.BILLING3, customer.TERM, customer.PLAN_TYPE, customer.STATUS, customer.CREATED_AT FROM customer Dec 19 17:22:39 symfony [info] {sfDebugConnection} executeQuery(): [0.78 ms] SELECT customer.ID, customer.COMPANY, customer.CONTACT_PERSON, customer.PHONE, customer.MOBILE, customer.EMAIL, customer.BILLING1, customer.BILLING2, customer.BILLING3, customer.TERM, customer.PLAN_TYPE, customer.STATUS, customer.CREATED_AT FROM customer Dec 19 17:22:39 symfony [info] {sfPHPView} Initialize view for customer/index Dec 19 17:22:39 symfony [info] {sfPHPView} Render /home/calvin/ sandbox/control-o/apps/control/modules/customer/templates/ indexSuccess.php Dec 19 17:22:39 symfony [info] {sfPHPView} Decorate content with / home/calvin/sandbox/control-o/apps/control/templates/layout.php Dec 19 17:22:39 symfony [info] {sfPHPView} Render /home/calvin/ sandbox/control-o/apps/control/templates/layout.php Dec 19 17:22:39 symfony [info] {sfRenderingFilter} Render to the client Dec 19 17:22:39 symfony [info] {sfWebResponse} Send status HTTP/1.1 200 OK Dec 19 17:22:39 symfony [info] {sfWebResponse} Send header Content- Type: text/html; charset=utf-8 Dec 19 17:22:39 symfony [info] {sfWebDebugLogger} Configuration 17.07 ms (9) Dec 19 17:22:39 symfony [info] {sfWebDebugLogger} Action customer/ index 70.34 ms (1) Dec 19 17:22:39 symfony [info] {sfWebDebugLogger} Database 0.77 ms (1) Dec 19 17:22:39 symfony [info] {sfWebDebugLogger} View Success for customer/index 45.19 ms (1) Dec 19 17:22:40 symfony [info] {sfWebResponse} Send content (128322 o) Dec 19 17:22:43 symfony [info] {sfPatternRouting} Connect / Dec 19 17:22:43 symfony [info] {sfPatternRouting} Connect / symfony/:action/* Dec 19 17:22:43 symfony [info] {sfPatternRouting} Connect /:module Dec 19 17:22:43 symfony [info] {sfPatternRouting} Connect /:module/:action/* Dec 19 17:22:43 symfony [info] {sfFrontWebController} Initialization Dec 19 17:22:43 symfony [info] {sfPatternRouting} Match route [default] for /:module/:action/* Dec 19 17:22:43 symfony [info] {sfWebRequest}
[symfony-users] Help Netbeans developers write symfony support !
Hello, There's gonna be symfony support in Netbeans 7.0. Now netbeans developers are gathering requirements and usecases from symfony developers. More details here: http://blogs.sun.com/netbeansphp/entry/evaluating_of_symfony _support --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Help SQL Query how in Criteria
Hello. How can i write this query with Criteria ? $sql = SELECT Chat.SENDER, Chat.RECIEVER FROM Chat WHERE Chat.OWNER=38 AND Chat.SENDER NOT IN(14) AND Chat.SENDDT='2008-08-20 10:19:06' AND Chat.STAT='0' GROUP BY Chat.SENDER This $sql works. When i try it with Criteria it is not working. What is the problem ? I guess problem is with Chat.SENDER NOT IN(14) = $c-add(ChatPeer::SENDER, $rsender, Criteria::NOT_EQUAL ); How can i correct the mistake ? Thanks. $c = new Criteria(); $c-addSelectColumn(MinchatPeer::R); $this-minrs = ChatPeer::doSelectRS($c); $rsender = array(); while ($this-minrs-next()) { $rsender[] = $this-minrs-getInt(1); } $c = new Criteria(); $c-clearSelectColumns(); $c-addSelectColumn(ChatPeer::SENDER ); $c-add(ChatPeer::SENDER, $rsender, Criteria::NOT_EQUAL ); $c-add(ChatPeer::SENDDT ,date('Y-m-d H:i:s',strtotime(now -$check minutes)),Criteria::GREATER_EQUAL ); $c-add(ChatPeer::STAT , '0'); __ Yahoo! kullanıyor musunuz? İstenmeyen postadan bıktınız mı? Yahoo! Posta'da piyasanın en iyi istenmeyen posta korunması var http://tr.mail.yahoo.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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] [help] amfphp, sabreamf, symfony
Hi, i need to create a simple application. My application has a simple modules that reads and writes on a db using propel and symfony crud tools. Now i need to create a flash frontend. I found 2 libraries: AMFPHP and SABREAMF. There is also a symfony plugin for AMFPHP. How can i use them? Do you have some examples? Thanks M. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Help the core team save time!
All, Recently there have been a few emails about donating towards a community token of appreciation for Fabien and Francois. I think this is a great initiative. An even better way to help the community and core team is to help them save time day to day. There are many ways to help the core team: 1. Participate and help others on the mailing list, forum, and in irc. 2. Own your tickets If you have ever opened a bug and it is still open, you should see it through until it is marked as fixed, wontfix, or invalid. 3. Write and update documentation. If you find a typo or if you want a section expanded or a note added, file a ticket and write the documentation. If you have svn access, commit an update. With that I ask that everyone follows up on tickets they have filled, checking that the problem still exists in the latest stable release, and updating or closing the ticket accordingly. When possible, please attach a patch and update documentation and tests. While the last sprint day was an incredible success, we shouldn¹t all wait for a specific day. We should try to help day to day. If we all work together, we can save Fabien Francois a lot of time so they can spend it on more important things (like family!).. - Dustin --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Help needed with XML-RPC controller
Hi folks, I have a strange request, and need some help please. I want to add an xml-rpc interface into my system, and have done this: In factories.yml, I've added: xmlrpc: controller: class: sfXmlRpcController sfXmlRpcController.class.php is in my apps/mymodule/lib/ directory This class is basically: class sfXmlRpcController extends sfController { public function initialize($context) { parent::initialize($context); $this-setRenderMode(sfView::RENDER_NONE); } public function dispatch() { try { $xmlrpc_server = xmlrpc_server_create(); $actionInstance = $this-getAction(xmlrpc, userLogin); $actionInstance-initialize($this-context); xmlrpc_server_register_method($xmlrpc_server, login_user, array( $actionInstance,execute)); ... where apps/mymodule/modules/xmlrpc/lib/userLoginAction.class.php is: class userLoginAction extends sfAction { public function execute() { sfContext::getInstance()-getLogger()-debug(Inside userLogin); return array(status = 0); } } Question: 1) I appear to be up and running. Anybody see any issues with what I'm doing? 2) How could I improve this? TIA Mike --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Help with Ajax and select tags
Hi all, my problem is occurring with creating a dropdown box that when selected, AJAX will place another dropdown box below it filled with choices according to the value chosen in box 1. I use the following code to generate the first dropdown box: ?php echo select_tag('department_choice', objects_for_select($depts, 'getName', 'getName'), array( 'onchange' = remote_function( array( 'update' = 'classSelection', 'url' = 'departments/GetCourses', 'with' = 'id=' + this.options[this.selectedindex].value, 'loading' = Element.show('indicator'), 'complete' = Element.hide('indicator') )) )); ? div id=classSelection /div executeGetCourses in action.class.php, which will take the value from Box 1 and retrieve only the values from the CRN column of my 3 column table that have the same Name column value as the id chosen: public function executeGetCourses() { $CRNcrit = new Criteria(); $CRNcrit - clearSelectColumns(); $CRNcrit - addSelectColumn( OfferedPeer::CRN ); $CRNcrit-add( OfferedPeer::Name, $this- getRequestParameter('id') ); $this-crns = OfferedPeer::doSelect( $deptCrns ); } and this is getCoursesSuccess.php: ?php use_helper('Object'); echo select_tag( 'classes', objects_for_select($crns, 'getCRN', 'getCRN') ); ? Is there anything wrong with this code, because when i execute it in my web page, nothing happens when i choose an option in box 1? --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Help: problem with accessing request parameter
My URL is: http://localhost/project1/web/admin_dev.php/myPicture/list/propertyId/3 But I can't get any value when I call $sf_request-getParameter('propertyId') from the template Any idea? --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Help understanding logging (sfAdvancedLoggerPlugin)
Hi folks, Logging is giving me fits, and I don't understand why. FWIW, I've tried both with and without sfAdvancedLogger, and I can't tell a difference. Right now, I'm getting lots of info() logging entries from Symfony. I want to disable that, so that I only get debugging output. using this logging.yml: all: enabled: on level: debug rotate: off period: 7 history: 10 purge: on loggers: sf_web_debug: class: sfWebDebugLogger param: condition: %SF_WEB_DEBUG% sf_file_debug: class: sfFileLogger param: file: %SF_LOG_DIR%/%SF_APP%_%SF_ENVIRONMENT%.log My log file is full of: Nov 05 09:03:04 symfony [info] {sfRouting} connect /login Nov 05 09:03:04 symfony [info] {sfRouting} connect /logout Nov 05 09:03:04 symfony [info] {sfRouting} connect /request_password Nov 05 09:03:04 symfony [info] {sfContext} initialization Nov 05 09:03:04 symfony [info] {sfController} initialization What am I missing here? I've also tried sfAdvancedLoggerPlugin (which I want to use). I want to implement this ideally with that. Here's that logging.yml file: all: enabled: on loggers: sf_advanced_logger: class: sfAdvancedLogger param: php_level: 4095 # E_ALL | E_STRICT exception: on # log uncaught exceptions file: - level: 0 # SF_LOG_EMERG file: %SF_LOG_DIR%/emerg.log - min_level: 5 # SF_LOG_NOTICE and up file: %SF_LOG_DIR%/notice_and_up.log - type: [PHP, Exception] # Only PHP and uncaught exception file: %SF_LOG_DIR%/php.log - min_level: 5 # SF_LOG_NOTICE and up type: View file: %SF_LOG_DIR%/view.log --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---