[symfony-users] Changing the validator of an embedded form field
Hi, I have this schema: propel: autor: id: ~ nombre: { type: varchar, size: 255, required: true } libro: id: ~ autor_id: { type: integer, size: 11, foreignTable: autor, foreignReference: id} titulo: { type: varchar, size: 255 } paginas:{ type: varchar, size: 255, required: true } and this form class: class AutorForm extends BaseAutorForm { public function configure() { $this->embedRelation('Libro'); } public function foo() { $this->validatorSchema['Libro']['newLibro1']['paginas'] = new sfValidatorPass(); return $this; } } I'm calling foo() before the bind() (inside processForm()). After submiting the Auto-Libro form, if I don't insert anything in the field 'paginas' of the first embedded form (Libro), it shows "Required". But.. why if paginas has a validator-pass? sf 1.4/propel 1.6 Javi -- 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] ODM insisting ... Problems with data / load
forget to mention that the vendor has a library folder doctrine-common El 27 de marzo de 2011 17:28, César Hernández escribió: > Excuse my ignorance ... > my autoload.php contains the following code > > > use Symfony\Component\ClassLoader\UniversalClassLoader; > > $loader = new UniversalClassLoader(); > $loader->registerNamespaces(array( > 'Symfony' => array(__DIR__.'/../vendor/symfony/src', > __DIR__.'/../vendor/bundles'), > 'Sensio' => __DIR__.'/../vendor/bundles', > 'JMS' => __DIR__.'/../vendor/bundles', > 'Doctrine\\Common' => __DIR__.'/../vendor/doctrine-common/lib', > 'Doctrine\\DBAL' => __DIR__.'/../vendor/doctrine-dbal/lib', > 'Doctrine' => __DIR__.'/../vendor/doctrine/lib', > 'Zend\\Log'=> __DIR__.'/../vendor/zend-log', > 'Assetic' => __DIR__.'/../vendor/assetic/src', > > 'Doctrine\\MongoDB' => > __DIR__.'/../vendor/doctrine-mongodb/lib', > 'Doctrine\\ODM\\MongoDB' => > __DIR__.'/../vendor/doctrine-mongodb-odm/lib', > 'Acme' => __DIR__.'/../src', > 'MiEmpresa'=> __DIR__.'/../src', > )); > $loader->registerPrefixes(array( > 'Twig_Extensions_' => __DIR__.'/../vendor/twig-extensions/lib', > 'Twig_'=> __DIR__.'/../vendor/twig/lib', > 'Swift_' => __DIR__.'/../vendor/swiftmailer/lib/classes', > )); > $loader->register(); > $loader->registerPrefixFallback(array( > > __DIR__.'/../vendor/symfony/src/Symfony/Component/Locale/Resources/stubs', > )); > > not quite understand what you mean when you say > I need the master branch of Doctrine Common > > 2011/3/27 Christophe COEVOET > >> Le 26/03/2011 22:29, César Hernández a écrit : >> >> just registered in the autoload >>>'Doctrine\\MongoDB' => >>> __DIR__.'/../vendor/doctrine-mongodb/lib', >>>'Doctrine\\ODM\\MongoDB' => >>> __DIR__.'/../vendor/doctrine-mongodb-odm/lib', >>> >>> But it shows me the following messages >>> >>> PHP Fatal error: Interface 'Doctrine\Common\Persistence\ObjectManager' >>> not found in >>> /var/www/sf2-pr8-02/vendor/doctrine-mongodb-odm/lib/Doctrine/ODM/MongoDB/DocumentManager.php >>> on line 49 >>> >>> Fatal error: Interface 'Doctrine\Common\Persistence\ObjectManager' not >>> found in >>> /var/www/sf2-pr8-02/vendor/doctrine-mongodb-odm/lib/Doctrine/ODM/MongoDB/DocumentManager.php >>> on line 49 >>> >>> >>> You need the master branch of Doctrine Common >> >> >> -- >> 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 >> > > > > -- > César Hernández > Anzoátegui - Venezuela > dpce...@gmail.com > > LinuxCounter: 285.345 > CIV: 122.539 > -- César Hernández Anzoátegui - Venezuela dpce...@gmail.com LinuxCounter: 285.345 CIV: 122.539 -- 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] ODM insisting ... Problems with data / load
Excuse my ignorance ... my autoload.php contains the following code registerNamespaces(array( 'Symfony' => array(__DIR__.'/../vendor/symfony/src', __DIR__.'/../vendor/bundles'), 'Sensio' => __DIR__.'/../vendor/bundles', 'JMS' => __DIR__.'/../vendor/bundles', 'Doctrine\\Common' => __DIR__.'/../vendor/doctrine-common/lib', 'Doctrine\\DBAL' => __DIR__.'/../vendor/doctrine-dbal/lib', 'Doctrine' => __DIR__.'/../vendor/doctrine/lib', 'Zend\\Log'=> __DIR__.'/../vendor/zend-log', 'Assetic' => __DIR__.'/../vendor/assetic/src', 'Doctrine\\MongoDB' => __DIR__.'/../vendor/doctrine-mongodb/lib', 'Doctrine\\ODM\\MongoDB' => __DIR__.'/../vendor/doctrine-mongodb-odm/lib', 'Acme' => __DIR__.'/../src', 'MiEmpresa'=> __DIR__.'/../src', )); $loader->registerPrefixes(array( 'Twig_Extensions_' => __DIR__.'/../vendor/twig-extensions/lib', 'Twig_'=> __DIR__.'/../vendor/twig/lib', 'Swift_' => __DIR__.'/../vendor/swiftmailer/lib/classes', )); $loader->register(); $loader->registerPrefixFallback(array( __DIR__.'/../vendor/symfony/src/Symfony/Component/Locale/Resources/stubs', )); not quite understand what you mean when you say I need the master branch of Doctrine Common 2011/3/27 Christophe COEVOET > Le 26/03/2011 22:29, César Hernández a écrit : > > just registered in the autoload >>'Doctrine\\MongoDB' => >> __DIR__.'/../vendor/doctrine-mongodb/lib', >>'Doctrine\\ODM\\MongoDB' => >> __DIR__.'/../vendor/doctrine-mongodb-odm/lib', >> >> But it shows me the following messages >> >> PHP Fatal error: Interface 'Doctrine\Common\Persistence\ObjectManager' >> not found in >> /var/www/sf2-pr8-02/vendor/doctrine-mongodb-odm/lib/Doctrine/ODM/MongoDB/DocumentManager.php >> on line 49 >> >> Fatal error: Interface 'Doctrine\Common\Persistence\ObjectManager' not >> found in >> /var/www/sf2-pr8-02/vendor/doctrine-mongodb-odm/lib/Doctrine/ODM/MongoDB/DocumentManager.php >> on line 49 >> >> >> You need the master branch of Doctrine Common > > > -- > 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 > -- César Hernández Anzoátegui - Venezuela dpce...@gmail.com LinuxCounter: 285.345 CIV: 122.539 -- 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] ODM insisting ... Problems with data / load
Le 26/03/2011 22:29, César Hernández a écrit : just registered in the autoload 'Doctrine\\MongoDB' => __DIR__.'/../vendor/doctrine-mongodb/lib', 'Doctrine\\ODM\\MongoDB' => __DIR__.'/../vendor/doctrine-mongodb-odm/lib', But it shows me the following messages PHP Fatal error: Interface 'Doctrine\Common\Persistence\ObjectManager' not found in /var/www/sf2-pr8-02/vendor/doctrine-mongodb-odm/lib/Doctrine/ODM/MongoDB/DocumentManager.php on line 49 Fatal error: Interface 'Doctrine\Common\Persistence\ObjectManager' not found in /var/www/sf2-pr8-02/vendor/doctrine-mongodb-odm/lib/Doctrine/ODM/MongoDB/DocumentManager.php on line 49 You need the master branch of Doctrine Common -- 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
Re: [symfony-users] ODM insisting ... Problems with data / load
just registered in the autoload 'Doctrine\\MongoDB' => __DIR__.'/../vendor/doctrine-mongodb/lib', 'Doctrine\\ODM\\MongoDB' => __DIR__.'/../vendor/doctrine-mongodb-odm/lib', But it shows me the following messages PHP Fatal error: Interface 'Doctrine\Common\Persistence\ObjectManager' not found in /var/www/sf2-pr8-02/vendor/doctrine-mongodb-odm/lib/Doctrine/ODM/MongoDB/DocumentManager.php on line 49 Fatal error: Interface 'Doctrine\Common\Persistence\ObjectManager' not found in /var/www/sf2-pr8-02/vendor/doctrine-mongodb-odm/lib/Doctrine/ODM/MongoDB/DocumentManager.php on line 49 2011/3/27 Christophe COEVOET > Le 26/03/2011 21:49, César Hernández a écrit : > > in ORM with the command: >> php app/console doctrine:data:load >> >> y initial data in the database >> that I have defined in the folder ...Bundle/DataFixtures/ORM / >> >> My question is, how do the same with ODM? >> en route >> MiEmpresa\MiPrimerNOSQLBundle\DataFixtures/ODM >> I have the following code >> >> > >> namespace MiEmpresa\MiPrimerNOSQLBundle\Controller; >> >> use Symfony\Bundle\FrameworkBundle\Controller\Controller; >> use MiEmpresa\MiPrimerNOSQLBundle\Document\User; >> >> class Loadclientes implements FixtureInterface >> { >>public function load($em) >>{ >> $user1 = new User(); >> $user1->setName('Cesar Hernandez'); >> $dm = $this->get('doctrine.odm.mongodb.document_manager'); >> $dm->persist($user); >> >> $user2 = new User(); >> $user2->setName('May-lhing Sanchez'); >> $dm = $this->get('doctrine.odm.mongodb.document_manager'); >> $dm->persist($user); >> >> $user3 = new User(); >> $user3->setName('Sebastian Hernandez Sanchez'); >> $dm = $this->get('doctrine.odm.mongodb.document_manager'); >> $dm->persist($user); >> >> $dm->flush(); >>} >> } >> >> but when I run >> php app/console doctrine:data:load >> me the following error >> >> PHP Fatal error: Class >> 'Doctrine\ODM\MongoDB\Tools\Console\Command\Schema\DropCommand' not found in >> /var/www/sf2-pr8-02/vendor/symfony/src/Symfony/Bundle/DoctrineMongoDBBundle/Command/DropSchemaDoctrineODMCommand.php >> on line 27 >> >> Fatal error: Class >> 'Doctrine\ODM\MongoDB\Tools\Console\Command\Schema\DropCommand' not found in >> /var/www/sf2-pr8-02/vendor/symfony/src/Symfony/Bundle/DoctrineMongoDBBundle/Command/DropSchemaDoctrineODMCommand.php >> on line 27 >> > did you register the autoloader for the ODM classes ? > > >> >> An additional comment >> to prepare my portfolio work >> run the following commands >> >> git clone https://github.com/symfony/symfony-standard.git sf2-pr8-01 >> cd sf2-pr8-01 >> ./bin/vendors.sh >> ./bin/build_bootstrap.php >> php app/console assets:install web/ >> cd vendor >> git clone https://github.com/doctrine/mongodb.git doctrine-mongodb >> git clone https://github.com/doctrine/mongodb-odm.git doctrine-mongodb >> > You should not clone in the same directory. > > >> Some oriención about ? >> data: load only for ORM? >> if not with "data: load" there is a "best practice" to load initial data >> in ODM? >> >> Waiting for their comments on >> Greetings ...! >> > For the ODM, use the doctrine:mongodb:data:load command. > > Btw, you have a typo in your class as you use a parameter named "$em" and > then use it as "$dm" > > -- > 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 > -- César Hernández Anzoátegui - Venezuela dpce...@gmail.com LinuxCounter: 285.345 CIV: 122.539 -- 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] ODM insisting ... Problems with data / load
Le 26/03/2011 21:49, César Hernández a écrit : in ORM with the command: php app/console doctrine:data:load y initial data in the database that I have defined in the folder ...Bundle/DataFixtures/ORM / My question is, how do the same with ODM? en route MiEmpresa\MiPrimerNOSQLBundle\DataFixtures/ODM I have the following code setName('Cesar Hernandez'); $dm = $this->get('doctrine.odm.mongodb.document_manager'); $dm->persist($user); $user2 = new User(); $user2->setName('May-lhing Sanchez'); $dm = $this->get('doctrine.odm.mongodb.document_manager'); $dm->persist($user); $user3 = new User(); $user3->setName('Sebastian Hernandez Sanchez'); $dm = $this->get('doctrine.odm.mongodb.document_manager'); $dm->persist($user); $dm->flush(); } } but when I run php app/console doctrine:data:load me the following error PHP Fatal error: Class 'Doctrine\ODM\MongoDB\Tools\Console\Command\Schema\DropCommand' not found in /var/www/sf2-pr8-02/vendor/symfony/src/Symfony/Bundle/DoctrineMongoDBBundle/Command/DropSchemaDoctrineODMCommand.php on line 27 Fatal error: Class 'Doctrine\ODM\MongoDB\Tools\Console\Command\Schema\DropCommand' not found in /var/www/sf2-pr8-02/vendor/symfony/src/Symfony/Bundle/DoctrineMongoDBBundle/Command/DropSchemaDoctrineODMCommand.php on line 27 did you register the autoloader for the ODM classes ? An additional comment to prepare my portfolio work run the following commands git clone https://github.com/symfony/symfony-standard.git sf2-pr8-01 cd sf2-pr8-01 ./bin/vendors.sh ./bin/build_bootstrap.php php app/console assets:install web/ cd vendor git clone https://github.com/doctrine/mongodb.git doctrine-mongodb git clone https://github.com/doctrine/mongodb-odm.git doctrine-mongodb You should not clone in the same directory. Some oriención about ? data: load only for ORM? if not with "data: load" there is a "best practice" to load initial data in ODM? Waiting for their comments on Greetings ...! For the ODM, use the doctrine:mongodb:data:load command. Btw, you have a typo in your class as you use a parameter named "$em" and then use it as "$dm" -- 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] ODM insisting ... Problems with data / load
in ORM with the command: php app/console doctrine:data:load y initial data in the database that I have defined in the folder ...Bundle/DataFixtures/ORM / My question is, how do the same with ODM? en route MiEmpresa\MiPrimerNOSQLBundle\DataFixtures/ODM I have the following code setName('Cesar Hernandez'); $dm = $this->get('doctrine.odm.mongodb.document_manager'); $dm->persist($user); $user2 = new User(); $user2->setName('May-lhing Sanchez'); $dm = $this->get('doctrine.odm.mongodb.document_manager'); $dm->persist($user); $user3 = new User(); $user3->setName('Sebastian Hernandez Sanchez'); $dm = $this->get('doctrine.odm.mongodb.document_manager'); $dm->persist($user); $dm->flush(); } } but when I run php app/console doctrine:data:load me the following error PHP Fatal error: Class 'Doctrine\ODM\MongoDB\Tools\Console\Command\Schema\DropCommand' not found in /var/www/sf2-pr8-02/vendor/symfony/src/Symfony/Bundle/DoctrineMongoDBBundle/Command/DropSchemaDoctrineODMCommand.php on line 27 Fatal error: Class 'Doctrine\ODM\MongoDB\Tools\Console\Command\Schema\DropCommand' not found in /var/www/sf2-pr8-02/vendor/symfony/src/Symfony/Bundle/DoctrineMongoDBBundle/Command/DropSchemaDoctrineODMCommand.php on line 27 An additional comment to prepare my portfolio work run the following commands git clone https://github.com/symfony/symfony-standard.git sf2-pr8-01 cd sf2-pr8-01 ./bin/vendors.sh ./bin/build_bootstrap.php php app/console assets:install web/ cd vendor git clone https://github.com/doctrine/mongodb.git doctrine-mongodb git clone https://github.com/doctrine/mongodb-odm.git doctrine-mongodb Some oriención about ? data: load only for ORM? if not with "data: load" there is a "best practice" to load initial data in ODM? Waiting for their comments on Greetings ...! -- César Hernández Anzoátegui - Venezuela dpce...@gmail.com LinuxCounter: 285.345 CIV: 122.539 -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] [Symfony2] Redirect to especific route after login (_security_check)
Hi everybody. [?] I want to redirect a user to an especific route after login/authentication according to his roles. I'm aware that Symfony2 authenticates users through _securty_check route and it does't require you to write a securityCheckAction() controller; also, if you request something like /admin and you are not authenticated, it will prompt the login page, and then redirect to the requested url. But I want a custom redirect, because if I request /login route directly Symfony2 will redirect me to the same login page (now logged in). How can I accomplish this??? Is there a way to override the security_check action? Do I have to use a listener? how? Thanks in advance [?] -- 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 <<349.gif>><<330.gif>>
[symfony-users] Re: Upgrade from sf 1.3 to sf 1.4: Fatal error: Class 'sfMessageSource' not found
Thank you Carl. Yes I checked if the file exists. Strangely however, after a reboot the problem vanished. Am 2011-03-25 21:10, schrieb Carl: Have you verified that sfMessageSource.class.php exists in your install? It should be located in lib/vendor/symfony/lib/i18n/. This is an abstract class that all of the other sfMessageSource_* classes inherit from either directly or indirectly. So if that's missing it would generate an error similar to that one. I'm not sure of the exact solution to this if that particular class exists. But verifying that the file is there is probably a good place to start if you haven't checked that already. -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] Re: AJAX and ESI problems
Can anyone shed some light on this? It's quite a problem for anyone that wants to build an ajax application and use the Symfony2 caching system (ESI). If it can't be done I need to re-assess how I build this Symfony2 app. Thanks On Mar 25, 8:04 pm, Marc MacLeod wrote: > Hi Guys, > > I'm trying to build an ajax application and am running into troubles > with ESI. Here's a simple version of what I'm trying to do: > > 4 content areas: > - Header > - Footer > - Sidebar > - Content > > When a link is clicked, an ajax request is fired that gets the content > and updates the relevant page areas. > > In my controller: > > // If it's an ajax request, return a JSON structure with the seperate > page parts to update. > if ($request->isXmlHttpRequest()) > { > $result = array(); > $result['title'] = $title; > $result['page_header'] = > $templating->render('LimelightBundle:Core:home_header.html.twig'); > > $result['page_content'] = > $templating->render('LimelightBundle:Core:home_content.html.twig'); > > $response = new Response(json_encode($result)); > $response->headers->set('Content-Type', 'application/ > json'); > return $response; > } > > // Else it's a normal request, return the full response. > return > $this->container->get('templating')->renderResponse('LimelightBundle:Core:home.html.twig', > array('title' > > => $title), $response); > > As you can see, I'm trying to return a JSON object with the relevant > properties filled with the relevant page sections. Now, in the > home_content.html.twig template I call a few ESI tags. They work fine > on a regular page load, but do not work when I try to use the method > above to return parts of the page via JSON. > > It simply returns the json structure with the tags > without replacing the ESI tags with their actual content. > > Any thoughts on how to fix this or the best way to go about doing > this? If anyone needs any clarification please let me know. > > Thanks! > Marc -- 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][Symfony2]Multiple routes in annotations
On 3/26/11 5:55 PM, georg wrote: Hi, has this been solved or has a solution been found? I'm also very interested in achieving the same thing as Mark. /** * @extra:Routes({ * @extra:Route("/index"), * @extra:Route("/index.{_format}") * }) */ public function indexAction() { return array(); } Fabien thanks georg -- 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][Symfony2]Multiple routes in annotations
Hi, has this been solved or has a solution been found? I'm also very interested in achieving the same thing as Mark. thanks georg -- 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] Re: Overriding Error Templates
On 3/26/11 2:36 PM, weaverryan wrote: Hey guys- The docs are correct for the latest master. If you're using PR8 (and probably PR7), use the following path: app/FrameworkBundle/view/Exception/error.html.twig This is the right path but unfortunately it was not working under PR7 and PR8. Fabien I want to STRESS however that the correct going forward (after PR8) will be: app/Resources/FrameworkBundle/views/Exception/error.html.twig: I hope that helps guys - these types of changes are beginning to less and less frequent. Thanks! On Mar 25, 9:42 am, Damon Jones wrote: I've not been able to get this to work either and I've been trying since at least PR7 through to PR8 (with the new path). On Mar 25, 9:50 am, weaverryan wrote: Hey Sam! There could be a problem with the documentation, but it also depends on how up-to-date the Symfony that you're using is. The code and documentation was updated recently to use a new path (the path that you're trying to use). If you have older code, however, you may need to place the file at "app/views/FrameworkBundle/Exception/ error.html.twig". If neither work, let me know - as the Symfony2 core solidifies, we're going through the docs to be sure that everything is fully up-to-date. Thanks! On Mar 24, 9:57 am, Sam wrote: I'm starting to explore Symfony2 and I love what I've seen so far. I'm having issues overriding error templates. I've followed the instructions on this page (http://symfony.com/doc/2.0/cookbook/ controller/error_pages.html) which lists the location to put my error template at (app/Resources/FrameworkBundle/views/Exception/ error.html.twig). However it is still using the default template. I'm making sure to clear my cache using both "app/console cache:clear" as well as "rm -rf app/cache/*". I've also tried having the page at (app/Resources/FrameworkBundle/ Exception/error.html.twig). When I have it at (app/views/FrameworkBundle/views/Exception/ error.html.twig) or (app/views/FrameworkBundle/Exception/ error.html.twig) I was able to get symfony to throw an error when I introduced an error into the template so it is seeing it there but still not using it. Is this a bug? Or am I doing something wrong? -- 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] about the 'return null' issue in php
Thank you for you reply. I've discussed this topic with people in #symfony-dev channel on Freenode, and get answer from there. Symfony is doing things right, it's just some of my misunderstanding. :) On Thu, Mar 24, 2011 at 10:03 PM, Jeremiah Dodds wrote: > > > On Tue, Mar 22, 2011 at 11:35 PM, Lixin Yu wrote: > >> >> So, is 'return null' a good/bad practice in php? >> > > If you return null consistently as a "none" value, it's not a bad one. If > you're inconsistent about it, or if you use it in places where it wouldn't > make much sense, it would be a bad one. > > Did the book you read give any reasons other than clarity for returning > null being considered a bad practice? > > -- > 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 > -- *Never say die* -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] Re: Overriding Error Templates
Hey guys- The docs are correct for the latest master. If you're using PR8 (and probably PR7), use the following path: app/FrameworkBundle/view/Exception/error.html.twig I want to STRESS however that the correct going forward (after PR8) will be: app/Resources/FrameworkBundle/views/Exception/error.html.twig: I hope that helps guys - these types of changes are beginning to less and less frequent. Thanks! On Mar 25, 9:42 am, Damon Jones wrote: > I've not been able to get this to work either and I've been trying > since at least PR7 through to PR8 (with the new path). > > On Mar 25, 9:50 am, weaverryan wrote: > > > > > > > > > Hey Sam! > > > There could be a problem with the documentation, but it also depends > > on how up-to-date the Symfony that you're using is. The code and > > documentation was updated recently to use a new path (the path that > > you're trying to use). If you have older code, however, you may need > > to place the file at "app/views/FrameworkBundle/Exception/ > > error.html.twig". > > > If neither work, let me know - as the Symfony2 core solidifies, we're > > going through the docs to be sure that everything is fully up-to-date. > > > Thanks! > > > On Mar 24, 9:57 am, Sam wrote: > > > > I'm starting to explore Symfony2 and I love what I've seen so far. I'm > > > having issues overriding error templates. I've followed the > > > instructions on this page (http://symfony.com/doc/2.0/cookbook/ > > > controller/error_pages.html) which lists the location to put my error > > > template at (app/Resources/FrameworkBundle/views/Exception/ > > > error.html.twig). However it is still using the default template. > > > > I'm making sure to clear my cache using both "app/console cache:clear" > > > as well as "rm -rf app/cache/*". > > > > I've also tried having the page at (app/Resources/FrameworkBundle/ > > > Exception/error.html.twig). > > > > When I have it at (app/views/FrameworkBundle/views/Exception/ > > > error.html.twig) or (app/views/FrameworkBundle/Exception/ > > > error.html.twig) I was able to get symfony to throw an error when I > > > introduced an error into the template so it is seeing it there but > > > still not using it. > > > > Is this a bug? Or am I doing something wrong? -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] Re: cli memory problem...
Gabriel, you were right! It was a problem with jailshell / cpanel. We fixed it by disabling fork bomb protection. For anybody else with this problem, look here... http://www.mickgenie.com/blog/jailed-shell-memory-issue/ http://forums.cpanel.net/f5/memory-issue-running-php-scripts-jailshell-account-126837.html Thanks for your help! Regards Jonathan On 23 Mar 2011, at 15:12, Gabriel Petchesi wrote: > My suspicion is that the limitation is not related to PHP or Apche in any > way, it's probably some setting on a system level that affects all running > processes. > That is why I said that you should try also with a compiled C program this > test to verify that the limitation affects all processes. > > Best regards, > >gabriel > > > > On Wednesday, March 23, 2011 12:43:57 PM UTC+2, Jonathan Franks wrote: > Hi Gabriel. Thanks! Following ur advice, I used a script to test memory usage > that I found here... > http://magazine.joomla.org/issues/Issue-Dec-2010/item/295-Are-you-getting-your-fair-share-of-PHP-memory?tmpl=component&print=1 > > And you were right! Through the web, the script happily gets up to 128mb but > from the cli it maxes out at 5mb. > > I've now emailed my host asking them to look at this. > > Do you or anyone else have any idea what settings other than memory_limit > might be effecting the, erm... memory limit?! > > I read online that the apache directive RLimitMEM also limits memory but I'm > not sure if the cli version of php works with apache or not? > > Any advice would be super helpful! Thanks! > > > On 22 Mar 2011, at 15:46, Gabriel Petchesi wrote: > > > Just a wild guess, maybe there is something on the hosting provider side > > that still limits process memory usage, so it may only look like it's not > > limited for PHP script. > > My suggestion is to test this assumption, create a simple PHP scripts that > > consumes memory and see how much memory it can consume before it reaches > > the limit. > > Also you could check by using a C program that malloc()-s some memory. > > > > In in both cases if there is some limitation to 5 MB the hosting provider > > will have to solve it. > > > >gabriel > > > > > > > > > > > > > -- 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] Pagination using routing
Hi All, In my routing i have used setting_master: url: /setting/master class: sfPropelRoute options: { model: master, type: list } param: { module: setting, action: index } requirements: { sf_method: get } and in my action i am using public function executeIndex(sfWebRequest $request) { $this->masterList = $this->getRoute()->getObjects(); } i am getting all the objects of this model, but do i paginate using this technique ? -- Thanks & Regards Srivatsa -- 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