[symfony-users] Versionable behavior not working for Doctrine query

2011-06-08 Thread Raju
hi , versionable not working on this query public function updateUserBankBranch($userid,$bank_branch_id){ $q = $this->createQuery() ->update('BankUser b') ->set('b.bank_branch_id', $bank_branch_id) ->where("b.user_id = '$userid'") ->

[symfony-users] Re: Symfony2: Recursive Form Errors

2011-06-08 Thread Ricky
Hi, there I met the same problem , i googles lots of resource, found that there is someone who hack the Form component. you can find it here: https://gist.github.com/968857 But i really hope that someone who can add an function which can return all errors message which defined in validtion.yml,

[symfony-users] [sf2] Problem with Field type Entity in Form

2011-06-08 Thread agomez
Hi: I'm using entity Field Type in Form. But, its say error: Warning: spl_object_hash() expects parameter 1 to be object, integer given in C:\xampp\htdocs\SymfonyBeta4\vendor\doctrine\lib\Doctrine\ORM \UnitOfWork.php line 1170 LOG: at ErrorHandler ->handle ('2', 'spl_object_hash() expects para

[symfony-users] Object action and staying on page

2011-06-08 Thread Peter Ross
Hi all, I have a list where I can collect items. What it should do: - taking an item_id - getting the sfGuardUser id and - creating a new record in an item table (with this two ids) At the moment every item has a object_action "Collect" Unfortunately the action leaves the page. I tried a rero

[symfony-users] Re: Symfony2 Beta1: Handling session timeout in JSON

2011-06-08 Thread Ricky
sorry about that, it seemed not work , as I could not get any token from unsecured router , and i still struggling about this problem, hope someone who can give any suggestion. On Jun 8, 4:55 pm, Ricky wrote: > I have the same problem with yours, because symfony2 internal security > mechanism, wh

Re: [symfony-users] Re: Any chance of creating a new Google group for Symfony2 only?

2011-06-08 Thread Anton Patrikeyev
+1 2011/5/18 mepk > +1 > > marcelo > > On 18 mayo, 05:05, Leo Jokinen wrote: > > +1 since only interested of SF2 > > > > -Leo- > > > > From: symfony-users@googlegroups.com [mailto: > symfony-users@googlegroups.com] On Behalf Of Marco Pivetta > > Sent: 18. toukokuuta 2011 10:39 > > To: symfony-u

[symfony-users] Re: Disable form validation of entity or dynamically add form constraint after form posting.

2011-06-08 Thread yethee
You can use validation group. Every constraint may relate to one or more groups. When you create a form, you can specify validation group. For example: # validation.yml Acme\DefaultBundle\Entity\Blog: properties: title: - NotBlank: mes

[symfony-users] Re: Symfony2 Beta1: Handling session timeout in JSON

2011-06-08 Thread Ricky
I find a solution for that, but seems be very silly way, as symfony2 automatically redirect to /login rourter if page is secured and after session is timeout. I still could not find how to detect if user's session under controlller, but I can do something with AJAX error process, hope this can help

[symfony-users] Re: Protecting AJAX action from CSRF attack

2011-06-08 Thread winzou
I'm very interested as well in this issue. 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 s

Re: [symfony-users] [sf2] Custom User Provider

2011-06-08 Thread Christophe COEVOET
Le 07/06/2011 20:52, Marco Oliveira a écrit : Hi everyone, I'm currently implementing an authentication mechanism that relies on a REST webservice. All this webservice allows me to do is to make a call like http://host.com/login/username/password, and the webservice either returns a success or f

Re: [symfony-users] Re: [symfony2] how i can run a post logout routine?

2011-06-08 Thread Diego Henrique Oliveira
Nice solution :) thanks guys. Diego On Wed, Jun 8, 2011 at 4:12 PM, Illya Klymov wrote: > In security.yml: > > security: > ... > firewalls: > main: > ... > logout: { path: /logout, target: /, handlers: > [prodrep.security.logoutlistener] } > > (put a

Re: [symfony-users] [symfony2] many to one relation in form

2011-06-08 Thread Rigoberto Reyes sv
class ProductType extends AbstractType { public function buildForm(FormBuilder $builder, array $options) { $builder->add('name'); $builder->add('price','money',array('currency'=>'EUR')) $builder->add('description'); $builder->add('idCategory','entity',

Re: [symfony-users] Limit results with Doctrine

2011-06-08 Thread Matt Robinson
Generate your own repository, then create a method in it that contains the DQL. In your entity definition (if you're using annotations): /* * @orm\Table(name="thing") * @orm\Entity(repositoryClass="Me\MyBundle\Repositories\ThingRepository") */ Then re-run app/console doctrine:generate:entitie

[symfony-users] Event Listeners on ORM

2011-06-08 Thread ymadh
Is there a way (or any good documentation) on how to setup an event listener for saving a record to a particular table / entity? Thanks for any info! Amy -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message beca

[symfony-users] Protecting AJAX action from CSRF attack

2011-06-08 Thread Chris M. Welsh
I was wondering if someone could help me figure out how to use the CSRF Provider to secure an AJAX request. I see that SessionCSRFProvider is probably what I want to use in this case, but I'm really lacking in the documentation department to figure out how to get the provider and validate tokens w

[symfony-users] [symfony2] many to one relation in form

2011-06-08 Thread Thijs
Hi there, I'm new to Symfony and I'm playing with the product/category-example from the doctrine book entry. Everything works fine. A product belongs to one category. This relationship is defined with annotations in the entity objects. I'm creating a product-form like this: class ProductType ext

[symfony-users] not a valid document or mapped super class

2011-06-08 Thread nicholas
Has any one met this problem? Class Wonder\TimelineBundle\Document\Article is not a valid document or mapped super class. which is thrown from lib/Doctrine/ODM/MongoDB/Mapping/Driver/AnnotationDriver.php as this function try to check the annotations. but I have import Doctrine\ODM\MongoDB\Map

[symfony-users] Re: Symfony2 Beta1: Handling session timeout in JSON

2011-06-08 Thread Ricky
I have the same problem with yours, because symfony2 internal security mechanism, when the session time out, it automatically redirect the page to /login, but for loginAction, I didn't response JSON format. i searched google, there is few resource i could find, but I finally have a solution for tha

[symfony-users] Getting object info from an admin generator component

2011-06-08 Thread Yan Hudon
Hi, I've read a lot about it and the symfony doc is pretty clear : "Notice that the partial template of a partial field has access to the current object through a variable named by the class ($BlogComment in this example)." It also says that it is the same thing when dealing with components. Ho

[symfony-users] Re: Custom Authentication Provider

2011-06-08 Thread robertoNR
Nobody can help me? Roberto. On May 23, 5:02 pm, robertoNR wrote: > Hi to all, >  I am new about Symfony2, I started using it about a month ago, and I > have never used Symfony(1). > I must authenticate users from ActiveDirectory so I must write my own > AuthenticationProvider, I guess. > I have

[symfony-users] [sf2] Custom User Provider

2011-06-08 Thread Marco Oliveira
Hi everyone, I'm currently implementing an authentication mechanism that relies on a REST webservice. All this webservice allows me to do is to make a call like http://host.com/login/username/password, and the webservice either returns a success or failure message. How do you suggest I do this? Af

[symfony-users] Re: [symfony2] how i can run a post logout routine?

2011-06-08 Thread Illya Klymov
In security.yml: security: ... firewalls: main: ... logout: { path: /logout, target: /, handlers: [prodrep.security.logoutlistener] } (put a handler) Your handler should implement LogoutHandlerInterface -- If you want to report a vulnerability issue o

Re: [symfony-users] [symfony2:beta4] where has gone doctrine:generate:repositories ?

2011-06-08 Thread Matt Robinson
It's now built-in to the doctrine:generate:entities command - as long as you declare the repository class name in your @orm\entity declaration, generate:entities will also generate the repository. On 8 Jun 2011, at 12:05, spider wrote: > Hello, > > I just upgraded to BETA4 and tried to generat

[symfony-users] Re: Limit results with Doctrine

2011-06-08 Thread E.Adel
You can use: Query::setMaxResults($maxResults) Query::setFirstResult($offset) http://www.doctrine-project.org/docs/orm/2.0/en/reference/dql-doctrine-query-language.html#first-and-max-result-items-dql-query-only On 8 juin, 08:54, Thomas wrote: > Hi all, > > I didn't found in the doctrine documen

[symfony-users] Redirect any request to definite controller or action depending on user status

2011-06-08 Thread Illya Klymov
I'm using FOSUserBundle and my User model has "isForcedPasswordChange" field, which means that user is forced to change his password immediately (he can't use system anymore) To implement that, i'm hooking core.controller event, where i perform setController, pointing to changepassword controlle

[symfony-users] Re: Assetic and php template

2011-06-08 Thread John Blobsmith
Hi, it doesn't work, I'm the same error, you have another solution ? On 5 juin, 19:55, Kris Wallsmith wrote: > It may be getting confused because you’re referencing your asset source files > incorrectly. You need to use the following syntax to include an asset from a > bundle: > > ($view['asse

[symfony-users] Disable form validation of entity or dynamically add form constraint after form posting.

2011-06-08 Thread Ricky
hi, everyone I set validation.yml to an entity like below: Acme\DefaultBundle\Entity\Blog: properties: title: - NotBlank: {message: Title field is required.} so when I create a form, it automatically validate the form input, it always stop posting if title field is empty, as i set t

[symfony-users] How to get proper image relative path under controller?

2011-06-08 Thread Ricky
Hi, there I am going to fetch image relative url under controller, but not sure is there any way i can do that like under template which can use {{ asset('bundle/xxx/.gif') }} to fetch the relative url of image file. or maybe it's the problem of how to manage assetic .. thanks for help. --

[symfony-users] Mater-detail with admin generator

2011-06-08 Thread theo
Hi friends: I have this schema.yml : Expediente: actAs: Timestampable: ~ columns: codigo:{ type: string(12), notnull: true, unique: true} resumen: { type: string(1000) } organismo_id: { type: integer } relations: Organismo: class: Or

[symfony-users] sfDoctrineActAsTaggablePlugin Tag Widget Renderer

2011-06-08 Thread Ido Schacham
I'd like to use sfDoctrineActAsTaggablePlugin for my current project. In the documentation it says as follows: If you have a Symfony form with a 'tags' field, just replace your $form['tags']->render() call with this to get an attractive and user friendly widget for managing the list of tags:

Re: [symfony-users] Why does Symfony2 change config file formats - why not standardize?

2011-06-08 Thread Matt Robinson
I agree that it makes things a little more fractured. It's certainly not my preference either. My two cents is that having multiple formats forces coders to learn all the formats just to be able to debug or learn the framework and third party bundles properly. But it's an issue that's been debat

[symfony-users] Re: problem with console commands list

2011-06-08 Thread Eric Clemmons
Mahmoud, I've also had several issues with having my VM access/execute files that reside on my primary machine via a shared folder. Can you confirm that everything works correctly when the application resides on the VM's filesystem? On Jun 4, 5:17 pm, "Mahmoud M. Abdel-Fattah" wrote: > I've jus

[symfony-users] Re: How to load Security Users from the Database (the entity Provider)

2011-06-08 Thread renegare
Hey, have you considered using the UserBundle (https://github.com/ FriendsOfSymfony/UserBundle). You just need to create your own User Entity (follow the configuration settings) and your away... Also I'm sure they will have in their code the answer to what you need. M. On Jun 5, 3:03 am, pw wr

[symfony-users] Symfony2: Recursive Form Errors

2011-06-08 Thread renegare
I am very new to this so hoping there is a simple solution. Using the Form Classes as advised in the symfony2 documentation, I need a way for $form->getErrors() to return ALL errors. I find it confusing that the $form->isValid() checks all children elements, but when you call $form->getErrors() it

[symfony-users] [symfony2] many to one relation in form

2011-06-08 Thread Thijs
Hi there, I'm new to Symfony and I'm playing with the product/category-example from the doctrine book entry. Everything works fine. A product belongs to one category. This relationship is defined with annotations in the entity objects. I'm creating a product-form like this: class ProductType ext

[symfony-users] Re: Assetic and php template

2011-06-08 Thread John Blobsmith
Hi, i tried to use this : stylesheets(array('MyBundle/Resources/ public/css/*')) as $url): ?> but it doesn't work. I have the following error : Route "_assetic_291f3a4" does not exist. Maybe I forgot to set a configuration ? On 5 juin, 19:55, Kris Wallsmith wrote: > It may be getting con

[symfony-users] How do I exclude a directory from config scan?

2011-06-08 Thread Jesse Greathosuse
The problem is that I have my deployment cache in my ./build folder and symfony is loading the config file from that folder every time the kernel is booted. Cannot import resource "'database_dev.yml'" from "'/home/jesse/ myProject/build/cached-copy/app/config/config_dev.yml'". Is there some silv

[symfony-users] Problem with Repository

2011-06-08 Thread agomez
What is the problem with the Repository? Error message: Entity 'Ed\PortalBundle\Entity\Rol' has no field 'cuentaRoles'. You can therefore not call 'findByCuentaRoles' on the entities' repository Entity Rol.php -- getEntityManager()->createQuery('SELECT SELECT COUNT(r.rol_id) FROM Ed

Re: [symfony-users] symfony1 + Symfony2

2011-06-08 Thread Justin Hilles
I feel like that would be the same amount of work then just upgrading the project to symfony2. But at least with the upgrading way you don't back yourself into a corner -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received t

Re: [symfony-users] [Symfony 2] Doctrine Proxies throws annotation exceptions

2011-06-08 Thread Gustavo Adrian
Ok. I'll try it now. Thanks a lot! 2011/6/8 Christophe COEVOET > Le 08/06/2011 20:43, Gustavo Adrian a écrit : > > Hi, >> >> Using Symfony's master branch, Doctrine's master branch, Doctrine Common's >> 3.0.x branch and Doctrine Dbal's master branch, I'm getting: >> >> "[Semantical Error] The

Re: [symfony-users] [Symfony 2] Doctrine Proxies throws annotation exceptions

2011-06-08 Thread Christophe COEVOET
Le 08/06/2011 20:43, Gustavo Adrian a écrit : Hi, Using Symfony's master branch, Doctrine's master branch, Doctrine Common's 3.0.x branch and Doctrine Dbal's master branch, I'm getting: "[Semantical Error] The annotation "@private" in method Proxies\StateModuleBundleEntityStateProxy::__load(

[symfony-users] [Symfony 2] Doctrine Proxies throws annotation exceptions

2011-06-08 Thread Gustavo Adrian
Hi, Using Symfony's master branch, Doctrine's master branch, Doctrine Common's 3.0.x branch and Doctrine Dbal's master branch, I'm getting: "[Semantical Error] The annotation "@private" in method Proxies\StateModuleBundleEntityStateProxy::__load() was never imported" I suppose this error is beca

Re: [symfony-users] Autoloading from shared php include path

2011-06-08 Thread cleve
Tried empty string but it still can't find Zend classes: $app['autoloader']->registerPrefixes(array( 'Zend' => '', )); $client = new Zend_Http_Client(); Fatal error: Class 'Zend_Http_Client' not fou. -- If you want to report a vulnerability issue on symfony, please send it to security

Re: [symfony-users] Autoloading from shared php include path

2011-06-08 Thread Christophe COEVOET
Le 08/06/2011 16:52, cleve a écrit : Hi All, I'm trying to load some zend libs from a shared php include folder and can't seem to get it to load properly. Include path is: /usr/share/php Contents of include path: Zend/Http Zend/Pdf etc Should this work $app['autoloader']->registe

[symfony-users] Re: [Symfony 2] Session problem at login, except with Firefox

2011-06-08 Thread Gustavo Adrian
Nevermind. I'm having odd problems with my local development server. It seems that some of the strange problems are directly related with this. Thanks. 2011/6/8 Gustavo Adrian > Hi, > > Yesterday I've updated symfony. I was using beta1 (or previous one, don't > remember). I could login to my a

[symfony-users] Autoloading from shared php include path

2011-06-08 Thread cleve
Hi All, I'm trying to load some zend libs from a shared php include folder and can't seem to get it to load properly. Include path is: /usr/share/php Contents of include path: Zend/Http Zend/Pdf etc Should this work $app['autoloader']->registerPrefixes(array( 'Zend' => '/Zend

[symfony-users] [Symfony 2] Session problem at login, except with Firefox

2011-06-08 Thread Gustavo Adrian
Hi, Yesterday I've updated symfony. I was using beta1 (or previous one, don't remember). I could login to my app with other browsers like chrome without problems, but now when I try it, it throws: "Your session has timed-out, or you have disabled cookies." This happens with IE, Chrome, Safari an

[symfony-users] Re: [Symfony 2] After updating vendors: [notice] child pid xxxxx exit signal Segmentation fault (11)

2011-06-08 Thread Gustavo Adrian
Well, in case anyone had the same problem: After updating vendors again (there were some commits after my last update), and updating apc from 3.1.3 to 3.1.9 the issue is no longer appearing. I still don't know what caused it though. Thanks 2011/6/7 Gustavo Adrian > Hi all, > > I've updated all

[symfony-users] Re: Limit results with Doctrine

2011-06-08 Thread Michel Salib
You can create a queryBuilder from the repository using ->createQuyeryBuilder(), then you can use the limit methods as seen here : http://www.doctrine-project.org/docs/orm/2.0/en/reference/query-builder.html#limiting-the-result -- If you want to report a vulnerability issue on symfony, please s

Re: [symfony-users] Re: - [beta3] Empty values on the page that exists in database

2011-06-08 Thread Christophe COEVOET
Le 08/06/2011 13:58, seven seven a écrit : Thanks for your answer ! Actually I will have to raise this again as I have updated to beta4 and still the same issue. It is definitely because of one of the > beta1 release and most likely because of the DoctrineCommon 3.0 annotations changes. May

Re: [symfony-users] Re: - [beta3] Empty values on the page that exists in database

2011-06-08 Thread seven seven
Thanks for your answer ! Actually I will have to raise this again as I have updated to beta4 and still the same issue. It is definitely because of one of the > beta1 release and most likely because of the DoctrineCommon 3.0 annotations changes. Maybe there is someone here how can give me a hand w

Re: [symfony-users] Re: [symfony2:beta4] where has gone doctrine:generate:repositories ?

2011-06-08 Thread Christophe COEVOET
Le 08/06/2011 13:07, spider a écrit : I'm sorry, I didn't find the command, but generate:entities does generate repositories too, if defined in the XML, as I did. Anyway, I'm pretty sure the explicit command was there once :-D Regards. Lorenzo Yeah it was there and the generation has been mov

[symfony-users] Re: [symfony2:beta4] where has gone doctrine:generate:repositories ?

2011-06-08 Thread spider
I'm sorry, I didn't find the command, but generate:entities does generate repositories too, if defined in the XML, as I did. Anyway, I'm pretty sure the explicit command was there once :-D Regards. Lorenzo -- If you want to report a vulnerability issue on symfony, please send it to security a

[symfony-users] [symfony2:beta4] where has gone doctrine:generate:repositories ?

2011-06-08 Thread spider
Hello, I just upgraded to BETA4 and tried to generate some repositories (defined in my XML mapping) but, wait, I cannot find anymore the command doctrine:generate:repositories Where has it gone? It's not a big problem, of course, cause the repository class is pretty simple to write by hand (a

Re : Re: [symfony-users] Bundle does not contain any mapped entities.

2011-06-08 Thread Jérémy Simonklein
In fact, it's wrong ^^ doctrine:generate:entities is also used for "annotation" method. -- 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.

[symfony-users] Aw: Re: not a valid document or mapped super class

2011-06-08 Thread Conrad
you probably forgot to add the bundle name in config.yml to your mappings array: doctrine: dbal: default_connection: default connections: default: driver: %database_driver% host: %database_host% dbname: %datab

Re: [symfony-users] How can I validate drop down select boxes in symfony2?

2011-06-08 Thread Gareth McCumskey
The link you posted is invalid On Tue, Jun 7, 2011 at 4:58 PM, Psychonetics wrote: > How can I validate drop down select boxes in symfony2? > > Please refer to this post: > http://forum.symfony-project.org/posting.php?mode=edit&f=23&p=118736 > > For some reason it won't allow me to post here. >

[symfony-users] Re : Problem with doctrine:generate:entities

2011-06-08 Thread Jérémy Simonklein
After a day of research, I think well sleeping during all the night can help ^^ I've founded where my problem came from : *A metadata file for Doctrine which stayed in the "MyBundle/Resources/config/doctrine/orm/" folder. * *I'**ve r**emoved it, and it works perfectly =D* -- If you want to re

[symfony-users] Limit results with Doctrine

2011-06-08 Thread Thomas
Hi all, I didn't found in the doctrine documentation how to limit my results when i'm fetching all my news. I want to limit my results with only 5 news (like in SQL LIMIT 0,5). I've done this : $news = new News(); $news = $this->get('doctrine') ->getEntityManager() ->getRepository('CompanySite

[symfony-users] Problem with doctrine:generate:entities

2011-06-08 Thread Jérémy Simonklein
Hi, Here is my problem :* *- I've generated entities classes and their methods with "doctrine:generate:entity" and "doctrine:generate:entities" in my Symfony 2 application. - I've generated the schema with "doctrine:schema:create". - I've made some modification, adding methods and associations

[symfony-users] Form_row and a lot of parameters

2011-06-08 Thread Christophe Beyer
Hi, Is it possible to use the form_row block instead of this 3 lines, with the good parameters ? : {{ form_label(form.nom, 'MyName') }} {{ form_errors(form.nom) }} {{ form_widget(form.nom, { 'attr': {'class': 'red'}, 'help': 'MyHelp' }) }} I tried this : {{ form_row(form.nom, { 'label':'MyName

[symfony-users] Re: not a valid document or mapped super class

2011-06-08 Thread winzou
Hi, Please give us the source of your Article document. -- 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 emai