[symfony-users] Re: Admin generator - removing all delete links
maybe it's because my pages are secured by sfDoctrineGuardPlugin ? -- 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] Admin generator - Using different forms for edit and for new
Hi all, How do I configure generator.yml so that it will use one form for the new action, and another for the edit action ? -- 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] Admin generator - Using different forms for edit and for new
2010/11/24 Manu emmanuel.parf...@gmail.com: Hi all, How do I configure generator.yml so that it will use one form for the new action, and another for the edit action ? You need to override actions. You can find action templates in cache dir. Best regards, Michal -- 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] Admin generator - Using different forms for edit and for new
W dniu 24 listopada 2010 12:37 użytkownik Michał Piotrowski mkkp...@gmail.com napisał: 2010/11/24 Manu emmanuel.parf...@gmail.com: Hi all, How do I configure generator.yml so that it will use one form for the new action, and another for the edit action ? You need to override actions. You can find action templates in cache dir. BTW. You can configure form to display diferent fields for new and edit $this-isNew() -- 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] Pass variables through actions
Is it possible to pass variables through actions ? Because I use some vars in new action, but if the form is invalid it will stop on create action to fix the erros and then I get the undefined variables ps: The values of these variables in new action is requested by url (new/someid/3) which by the way is hard coded. Or is there another (correct) way to do that ? Thanks! -- 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: Admin generator - Using different forms for edit and for new
$this-isNew() is what I was looking for, thanks ! -- 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: Creating a new tinyMCE widget
On 23 Nov, 17:33, Manu emmanuel.parf...@gmail.com wrote: Hi, I'm using tinyMCE in my forms and have noticed that I only use two configurations : a very limited one, for things like comments, and a more complex one, for the administators of the site. Don't rely on bad things such sfWidgetFormTextareaTinyMCE. Use plain textareas and give them an id or a class (in a semantic way). Then put your tinyMCE configuration in javascript file (javascript should be always stay separated from the rest) and declare two different cofiguration, based on your ids (or classes, as appropriate). cheers Massimiliano -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] 1.4 routing .html problem
Hi, i am trying to route. This is my routing role : about_us: url: /about_us.:sf_format param: { module: pages, action: aboutus, sf_format: html } requirements: sf_format: (html|xml) And here is my link : ?php echo link_to(__('About Us'), url_for('@about_us?sf_format=html'), array('class'='latestnews')) ? I want my output : www.mydomain.com/aboutus.html -- 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: Enable partial caching on pages with query string
I appreciate your comment, normally I use APC or redis, however for the project I am working on it is not always an option as it has no ORM and instead uses API calls to an external data source which encapsulates a lot of business logic (this is due to legacy systems). So I desperately need to know if it would be possible to enable partials caching for requests that contain a query string? On Nov 23, 7:38 pm, Gareth McCumskey gmccums...@gmail.com wrote: Have you considered looking at memory caching mechanisms (using APC Cache for example) to reduce queries to database? Quite simple really by overriding the doSelect, doSelectOne, retrieveByPk and other database retrieval methods. In other words, when a query is sent to the database, check if the result is stored in APC Cache. If it is yank and return, if not, query database and store in memory cache. If a field is being altered (save() or delete() methods), remove the record from APC so that the next query gets the updated result. We use this quite extensively on one of our projects and has dropped a lot of db load off our server. On Tue, Nov 23, 2010 at 1:22 AM, Ken Golovin ken.golo...@gmail.com wrote: I would like to be able to cache a partial on a search results page that uses query strings, however symfony ignores caching settings. The page onhttp://www.symfony-project.org/reference/1_4/en/09-Cache says: An incoming request with GET parameters in the query string or submitted with the POST, PUT, or DELETE method will never be cached by symfony, regardless of the configuration. Is there any way to override this behaviour? -- 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...@goog legroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- Gareth McCumskeyhttp://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] [Symfony 2] Custom validator is not called on validation
I've just updated symfony 2 and now it works like a charm. Thanks. On Tue, Nov 23, 2010 at 1:05 PM, Gustavo Adrian comfortablynum...@gmail.com wrote: Hi Bernhard, I updated my config.yml and added: app.config: validation: enabled: true annotations: namespaces: mybundle: Application\MyBundle\Component\Validator\Constraints\ And now in my Entity: /** * @orm:Column(type=string, length=16) * @validation:NotBlank() * @mybundle:IpAddress() */ But I couldn't get it to work. I tried if NotBlank is still working but it doesn't work now. Did I miss something? I updated the pastebin codes correcting some typos just in case: Constraint: http://pastebin.com/gGJKpc3Z Constraint Validator: http://pastebin.com/U685DjV5 Checked if the isValid method is getting called on my custom constraint validator, but it's not. Thanks in advance for your help! On Tue, Nov 23, 2010 at 12:28 PM, Bernhard Schussek bschus...@gmail.comwrote: Hi Gustavo, Sorry, the documentation is lacking in that part. You need to register your constraint namespace to use it with the validation driver. Add this to your config.yml validation: enabled: true annotations: namespaces: myvalidation: Application\MyBundle\Component\Validator\Constraints\ Then you can refer to the constraint using @myvalidation:IpAddress. Bernhard -- Software Architect Engineer Blog: http://webmozarts.com Twitter: http://twitter.com/webmozart 2010/11/23 Gustavo Adrian comfortablynum...@gmail.com: Hi everyone, I've created a custom validator for IP Addresses but is not getting called. What I did is simply copy the existent Url validator files (Url and UrlValidator), changed the pattern accordingly and removing some stuff (protocols, etc). Then in my Entity via annotations: /** * @orm:Column(type=string, length=16) * @validation:NotBlank() * @validation:IpAddress() */ protected $primaryDns; NotBlank constraint is working, but my custom validator doesn't. I've put my files in Application/MyBundle/Component/Validator/Constraints/IpAddress.php Application/MyBundle/Component/Validator/Constraints/IpAddressValidator.php Am I missing some step? I've followed the docs from http://docs.symfony-reloaded.org/master/guides/validator/constraints.html My Constraint: http://pastebin.com/zcf8YQ3C My Constraint Validator: http://pastebin.com/uN9nqA6A 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.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.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] [Symfony 2] Custom validator with a boolean option?
Hi everyone, I've recently created a custom validator to validate IP. I have four fields that need a mandatory IP, and one field in that the IP is optional. So, I've added a boolean option required to my custom IpAddress validator to make this possible (by the way, is this the better way to do this? if I put @NotBlank @IpAddress obviusly it will be @NotBlank AND @IpAddress, and not @NotBlank OR @IpAddress as I needed for this field.). The thing is that, on the isValid method, checking for the required property of the constraint I've noticed that the value was indeed a string, and not a boolean. I'm using annotations to configure the constraints for my entities. Is there a way to configure the type of the option or they're always a string or I'm doing something wrong? Thanks. -- 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] I18nRoutingBundle
Hi all, I created a bundle for Symfony2 wich is called I18nRoutingBundle. With this bundle you can create an i18n routing if your website is multilingual. You can download at this address: https://github.com/francisbesset/I18nRoutingBundle A documentation is available in README.markdown Enjoy! -- 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: [Symfony 2] Custom validator is not called on validation
Hi Benrnard and everyone. This worked for me too. From annotations works fine, but how I would have to call it from validation.yml? #Application/MyBundle/Resources/config/validation.yml Application\MyBundle\Entity\Anything: getters: address: - NotBlank: ~ - IpAddress: ~ Thanks in advance. On 24 nov, 20:33, Gustavo Adrian comfortablynum...@gmail.com wrote: I've just updated symfony 2 and now it works like a charm. Thanks. On Tue, Nov 23, 2010 at 1:05 PM, Gustavo Adrian comfortablynum...@gmail.com wrote: Hi Bernhard, I updated my config.yml and added: app.config: validation: enabled: true annotations: namespaces: mybundle: Application\MyBundle\Component\Validator\Constraints\ And now in my Entity: /** * @orm:Column(type=string, length=16) * @validation:NotBlank() * @mybundle:IpAddress() */ But I couldn't get it to work. I tried if NotBlank is still working but it doesn't work now. Did I miss something? I updated the pastebin codes correcting some typos just in case: Constraint:http://pastebin.com/gGJKpc3Z Constraint Validator:http://pastebin.com/U685DjV5 Checked if the isValid method is getting called on my custom constraint validator, but it's not. Thanks in advance for your help! On Tue, Nov 23, 2010 at 12:28 PM, Bernhard Schussek bschus...@gmail.comwrote: Hi Gustavo, Sorry, the documentation is lacking in that part. You need to register your constraint namespace to use it with the validation driver. Add this to your config.yml validation: enabled: true annotations: namespaces: myvalidation: Application\MyBundle\Component\Validator\Constraints\ Then you can refer to the constraint using @myvalidation:IpAddress. Bernhard -- Software Architect Engineer Blog:http://webmozarts.com Twitter:http://twitter.com/webmozart 2010/11/23 Gustavo Adrian comfortablynum...@gmail.com: Hi everyone, I've created a custom validator for IP Addresses but is not getting called. What I did is simply copy the existent Url validator files (Url and UrlValidator), changed the pattern accordingly and removing some stuff (protocols, etc). Then in my Entity via annotations: /** * @orm:Column(type=string, length=16) * @validation:NotBlank() * @validation:IpAddress() */ protected $primaryDns; NotBlank constraint is working, but my custom validator doesn't. I've put my files in Application/MyBundle/Component/Validator/Constraints/IpAddress.php Application/MyBundle/Component/Validator/Constraints/IpAddressValidator.php Am I missing some step? I've followed the docs from http://docs.symfony-reloaded.org/master/guides/validator/constraints My Constraint: http://pastebin.com/zcf8YQ3C My Constraint Validator: http://pastebin.com/uN9nqA6A 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.comsymfony-users%2bunsubscr...@goog legroups.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.comsymfony-users%2bunsubscr...@goog legroups.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] Re: Enable partial caching on pages with query string
APC cache is not limited to database queries. You can still overwrite the API caller to get data from the memory cache if it has not been changed. Your problem will be whether other services access the same API and alter data meaning that your local cached copies will be out of date with no way to determine if you need to bypass that and get the updated data instead, and even there partial caching will also fall apart for the same reasons. If you have dev access to the API itself, your best method for efficiency is then to use caching mechanisms on the API side instead of the client side. On Wed, Nov 24, 2010 at 9:24 PM, Ken Golovin ken.golo...@gmail.com wrote: I appreciate your comment, normally I use APC or redis, however for the project I am working on it is not always an option as it has no ORM and instead uses API calls to an external data source which encapsulates a lot of business logic (this is due to legacy systems). So I desperately need to know if it would be possible to enable partials caching for requests that contain a query string? On Nov 23, 7:38 pm, Gareth McCumskey gmccums...@gmail.com wrote: Have you considered looking at memory caching mechanisms (using APC Cache for example) to reduce queries to database? Quite simple really by overriding the doSelect, doSelectOne, retrieveByPk and other database retrieval methods. In other words, when a query is sent to the database, check if the result is stored in APC Cache. If it is yank and return, if not, query database and store in memory cache. If a field is being altered (save() or delete() methods), remove the record from APC so that the next query gets the updated result. We use this quite extensively on one of our projects and has dropped a lot of db load off our server. On Tue, Nov 23, 2010 at 1:22 AM, Ken Golovin ken.golo...@gmail.com wrote: I would like to be able to cache a partial on a search results page that uses query strings, however symfony ignores caching settings. The page onhttp://www.symfony-project.org/reference/1_4/en/09-Cache says: An incoming request with GET parameters in the query string or submitted with the POST, PUT, or DELETE method will never be cached by symfony, regardless of the configuration. Is there any way to override this behaviour? -- 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 symfony-users%2bunsubscr...@goog legroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- Gareth McCumskeyhttp://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 -- 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: Yan: [symfony-users] Re: 06-Advanced-Forms Some Questions.
On 23 Nov., 13:43, Stéphane stephane.er...@gmail.com wrote: Of course, instead of using static variables, you can create getters to retrieve values from configurations, so it will be easier to change the number of allowed uploadable photos by simply changing a value in a config/app.yml. Something like public function getMaxUploadablePhotos(){ return sfConfig::get('app_max_uploadable_photos'); } Yes, sure, that's the next step. Thks -- 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: Yan: [symfony-users] Re: 06-Advanced-Forms Some Questions.
$subForm-getWidgetSchema()-setLabel($index, ); in embedRelation() function in sfFormDoctrine class. I am not sure if it the right way ? This may work (although rather a hack, beauty alone doesn't save your life), maybe only partially, as this is actually a topic of rendering the HTML. Means that you should use another sfWidgetFormFormatter that will omit rendering the title of embedded subform. Maybe someone else can help, as I am definitely not an expert on these form formatters classes? Cheers RAPHAEL -- 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