Re: [symfony-users] [Symfony 2] Is there anyone working on a bundle for backup - restore databases?

2011-06-22 Thread oscar balladares
+1 It would a very nice utility. I'm pretty sure it will catch community attention. Does It will be like the admin bundle? with a GUI for such task? Does it would have a command-line utility? Regards! 2011/6/22 Gustavo Adrian > Hi everyone, > > As far as I know, the best way to backup/restore

Re: [symfony-users] [s2][doctrine2] Update LifeCycleCallBack event not working [beta5]

2011-06-22 Thread oscar balladares
; > Did you use entity manager in the uploadFile()? > > In my case I would need to make some queries inside the "preEvent" > function. Do you know how? > > Marcelo > > > 2011/6/21 oscar balladares > >> Hi Marcelo; yes, of course: >> >> I'

Re: [symfony-users] [sf2] thinking of putting together a seed data bundle

2011-06-22 Thread oscar balladares
+1. It sounds great! Sadly, I'm very busy at the time, so I can't help right now :( 2011/6/22 Tac Tacelosky > +1 for interest. Not sure if I can contribute much to the development -- > still getting my head around bundles, src, vendors and third_party, and how > all this will fit into svn (my c

Re: [symfony-users] [symfony2] What is the best way to handle URLs in javascript files called by assetic

2011-06-22 Thread oscar balladares
I meant : 'if it is not a link-for-ajax-purpose, then you can use hidden fields'. 2011/6/22 oscar balladares > If you are calling another pages within tag, but using JS (i.e > ajax request) > you can get the link's url: > > $('#a-link').click(func

Re: [symfony-users] [symfony2] What is the best way to handle URLs in javascript files called by assetic

2011-06-22 Thread oscar balladares
If you are calling another pages within tag, but using JS (i.e ajax request) you can get the link's url: $('#a-link').click(function(e){ var $url = $(this).attr('href'); $(this).preventDefault; //request content based on the url, with ajax. }); If it is not a request, you could use a dirty tric

Re: [symfony-users] Jobeet Day 5 - Problem with Homepage

2011-06-22 Thread oscar balladares
Do you have it on a github repository? It would be great if you do. Not being able to see your code is a huge backdraw. I'm 99.99% that is a problem with your code, so we need to see it to figure out what is happening. But, you can post all your code from day 4, and day 5 here to take a look at it

Re: [symfony-users] Re: file upload example?

2011-06-22 Thread oscar balladares
Have you try a postPersist event? If that is working, and prePersist not, then you can use the postPersist. If the fileupload returns an exception, then the persist won't be commited anyway. Also, on a postPersist event you have access to the Entity's id, which is very useful for generating an un

Re: [symfony-users] Re: Jobeet Day 3 : problem with Doctrine folder

2011-06-21 Thread oscar balladares
I'm pretty sure there is a doctrine folder. I downloaded it 2 days ago ;) 2011/6/21 Tomasz Madeyski > I'm not sure if I remember well, but I think that actually there was > no "doctrine" folder. > > Anyway, try to create folder "doctrine" and put schema.yml in it (/ > config/doctrine/schema.yml)

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

2011-06-21 Thread oscar balladares
+1 For Fabien proposal (I would vote him for president of my nation if I could). Core developers, and Symfony Ninjas will still be able to suscribe to both lists and feel in peace with themselves :P Luis Cordoba: Very funny - muy gracioso :D S1 won't die as long as S1 projects owners/webmaster/pr

Re: [symfony-users] Request for Symfony 2 installation guide

2011-06-21 Thread oscar balladares
Mostly web servers are running UNIX kind of SO's. And it is very easy to install all dependencies: debian, ubuntu like ones have apt-get; Red Hat, Centos, Fedora have 'yum'. You should consider to learn unix based SO, your work become extremely maintenable when you get used to it (instead of blam

Re: [symfony-users] [s2][doctrine2] Update LifeCycleCallBack event not working [beta5]

2011-06-21 Thread oscar balladares
me that such method doesn't exist in the entity class; if I do the same for preUpdate, or postUpdate, it will be ignored, like it doesn't check the method. Regards! 2011/6/20 Marcelo Prizmic > Hi Oscar > Could you post some code about how to use per or post events? > Thanks

Re: [symfony-users] Re: Learn Symfony2 or switch to Zend ?

2011-06-21 Thread oscar balladares
Yes, de DI and Delivering Bundles as Plugins is so easy and powerful! 2011/6/21 dmitrybelyakov > Hi Manu. > > We're currently considering the same choice: wait for ZF2 or switch to > SF2. > Doing ZF development for several years and following ZF2 development > closely we're seriously > consideri

Re: [symfony-users] Jobeet Day 3 : problem with Doctrine folder

2011-06-20 Thread oscar balladares
You probably downloaded a previous version than 1.4. I've recently downloaded 1.4 and everything is ok. 2011/6/20 moolligan > Hi everybody, > > I'm doing the Jobeet tutorial whith Symfony 1.4. > On Day 3, I have to modify the schema.yml file (to build my database). > This file is supposed to be

Re: [symfony-users] Lazy loading in doctrine isn't working

2011-06-20 Thread oscar balladares
Hi. I won't give you the answer you are expecting, but an advice: Try to avoid lazy loading, always; you can do pretty much with DQL. 2011/6/20 jletellier > I updated to Symfony BETA5 and now lazy loading doesn't seem to work > anymore. > > In the controller I did the following: > > $em = $this

Re: [symfony-users] Learn Symfony2 or switch to Zend ?

2011-06-20 Thread oscar balladares
S2 is totally a different product from S1. Is a lot less complex. You could make a mini blog app, with both frameworks (ZF and S2) and point the advantages using S2 (if any :D). If you find out ZF is better then you can take the right decision. It could be a nice presentation with topic addressi

[symfony-users] [s2][doctrine2] Update LifeCycleCallBack event not working [beta5]

2011-06-20 Thread oscar balladares
Hi everybody!. I'm using Yaml configuration for doctrine metadata. All others events (prePersist, postPersist, preRemove, postRemove) are working properly, but not the preUpdate and PostUpdate. Of course, I'm just calling the 'persist' method of the $EntityManager: $em->persist($AlreadyInDataba

Re: [symfony-users] [Doctrine2] Delete query + JOIN. (How to translate this SQL query into DQL)

2011-06-18 Thread oscar balladares
t; > otherwise: > > DELETE > p, bp > FROM > photo p > INNER JOIN > bedroom_photo bp ON bp.id_photo = p.id > INNER JOIN > bedroom b ON b.id = bp.id_bedroom > WHERE > b.id = 1; > > > Hope this helps! > > Regards,* > David Mann

Re: [symfony-users] [SF2] Functional Testing and SF2 Security

2011-06-17 Thread oscar balladares
AFAIK, there is no test support for database driven authentication, yet, only 'In Memory' method. This is a big drawback, IMO. 2011/6/17 Roger Webb > Hello Everyone, > > I am starting down the road of functional testing with Symfony and am > wondering what is considered the "best practice" for

Re: [symfony-users] [Doctrine2] Delete query + JOIN. (How to translate this SQL query into DQL)

2011-06-16 Thread oscar balladares
Thanks, I'll try to digg into it. 2011/6/16 Gediminas Morkevicius > Hi, read a manual with MEMBER OF function, I think in your case it should > fit > > On Thu, Jun 16, 2011 at 6:04 AM, oscar balladares wrote: > >> Hi everybody! >> >> This might go in the Do

[symfony-users] [Doctrine2] Delete query + JOIN. (How to translate this SQL query into DQL)

2011-06-15 Thread oscar balladares
Hi everybody! This might go in the Doctrine's mailing list, but knowing you all S2 people are working with Doctrine 2, I'm feeling lucky that you could help me out. This is the kind of stuff I want to achieve: DQL: delete VendorBundle:Photo p JOIN p.bedrooms bp JOIN bp.bedroom b where b.id = 13

Re: [symfony-users] Symfony2 [beta 4] + Doctrine 2 - Unit Test and EntityManager

2011-06-15 Thread oscar balladares
Why when I asked same question no one could came up with a good answer like this one? [?] Thanks a lot. This will help me improve my current and first S2 production-meant app. [?] 2011/6/15 Jeremiah Dodds > > > On Tue, Jun 14, 2011 at 12:52 PM, waldo2188 wrote: > >> Hi, >> >> I wish to know ho

Re: [symfony-users] Re: [symfony2] file upload example?

2011-06-15 Thread oscar balladares
[?] It is a so ellegant implementation; and callbacks are so usefull. I would marry Fabien is he was a 'she' [?] 2011/6/15 Chris > > Thanks for these, though I'm trying to implement multiple files > upload: using a collection of a FileFormType that contains a file. > I am now stuck at the bindre

Re: [symfony-users] [sf2] Html Escaping

2011-06-13 Thread oscar balladares
Hi, if have worked with Twig or Symfony 1.4 way to pass variables from controllers to views, it is the same for all cases. In a controller you will return a view response like: return $this->render('YourBundle:Folder:view.html.php', array('viewBar' => $controllerBar, 'viewFoo' => $controllerFoo))

Re: [symfony-users] Re: [S2-Doctrine2] Get custom set of associated objects in lazy loading, not all related object (how to implement a filter ).

2011-06-13 Thread oscar balladares
;, 'p', \Doctrine\ORM\Query\Expr\Join::WITH, 'p.is_special = :is') ->setParameter('is', true) ; return $query->getQuery()->getResult(); That's it. Hope this helps if someone have a problem like mine's. 2011/6/7 o

Re: [symfony-users] [symfony2] file upload example?

2011-06-11 Thread oscar balladares
Thanks! 2011/6/11 Fabien Potencier > I'm working on updating the documentation to include an exmaple of a file > upload with and without Doctrine. > > It should be available on Monday. > > Fabien > > -- > Fabien Potencier > Sensio CEO - Symfony lead developer > sensiolabs.com | symfony.com | fab

Re: [symfony-users] Re: [symfony 2] app/cache and permissions

2011-06-10 Thread oscar balladares
Hi. This is for sure not the best answer, but it should work less painful than yours, Instead of: rm -rf app/cache mkdir app/cache chmod -R +w app/cache You can: rm -rf app/cache/* This will avoid app/cache from being removed, only its content will. then: chmod -R 777 . This will work if y

Re: [symfony-users] [symfony2] file permissions, difference between app/console and apache

2011-06-10 Thread oscar balladares
This is a common scenario in my case. The only advice I give you is to avoid working with other user than your regular user (don't work with the root account) if not, this will lead such file/dir permission issues. This is the thing. When you request a web url, i.e your app one, apache will crea

Re: [symfony-users] [sf2][Beta4], serialize object with relations

2011-06-10 Thread oscar balladares
his->categoria); return serialize($data); } public function unserialize($serilized) { $data = unserialize($serilized); $this->id = $data['id']; $this->nombre = $data['nombre']; $this->descripcion = $data['descripcion']; $this->cantidad = $data['cant

Re: [symfony-users] [sf2][Beta4], serialize object with relations

2011-06-10 Thread oscar balladares
It is not possible due to doctrine's proxies workflow. I had a discusion like about 30 responses within this mailing list looking for the same answer, without a practical success. Doctrine's official docs tells you can't serialize entities (when they are proxies). What I implemented is a backTo

Re: [symfony-users] Re: [S2-Doctrine2] Get custom set of associated objects in lazy loading, not all related object (how to implement a filter ).

2011-06-07 Thread oscar balladares
Hi! Thank you very much. I will try this query, though it will take me some time to merge to my app. For now thanks buddy, and have a good night! (It is very late for me :D ) 2011/6/7 winzou > Ok, you're stuck on an pure SQL issue. Check this query: > SELECT a, b FROM objectA a LEFT JOIN objec

Re: [symfony-users] Re: [S2-Doctrine2] Get custom set of associated objects in lazy loading, not all related object (how to implement a filter ).

2011-06-06 Thread oscar balladares
Hi Winzou! Thanks for that! But, I think that that approach won't do the trick. e.g : select a, b objecA A JOIN objectB b where b.is_public_content = true If that query is an INNER JOIN, then it will return only those objectA that has at least one related objectB which is_public_content attribu

Re: [symfony-users] Re: [S2-Doctrine2] Get custom set of associated objects in lazy loading, not all related object (how to implement a filter ).

2011-06-06 Thread oscar balladares
Sorry if I'm being buggy :D and thank you very much for helping, but I this approach won't solve my problem either. The thing is that I load a collection of ObjectA, and I'm accessing every objectA in a template, and also accessing objectB collection from every objectA like: {% for objectA in obj

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

2011-06-06 Thread oscar balladares
Have you tried changing file and folder permissions? chmod -R 777 path/to/your/project Have you cleared the cache? rm -rf path/to/your/project/app/cache/* 2011/6/4 Mahmoud M. Abdel-Fattah > I've just started symfony2 development on virtual machine and shared > folder. the problem that when I tr

Re: [symfony-users] Re: [S2-Doctrine2] Get custom set of associated objects in lazy loading, not all related object (how to implement a filter ).

2011-06-06 Thread oscar balladares
Hi Winzou. The problem I find with this approach is that all related objectB will be retrieved from database. I would want to optimize performance loading only necessary objects. Best practices doesn't allow the entity manager to be accessed from entities, but that would be very helpful!. 2011/6

[symfony-users] [S2-Doctrine2] Get custom set of associated objects in lazy loading, not all related object (how to implement a filter ).

2011-06-06 Thread oscar balladares
Hi everybody, hope you are doing well. The title might be confusing. This is the quickest explanation: objectA is related to objectB in a 1 to Many relation/association. With lazy load you can (in a template): {% for objectB in objectA.objectBCollection %} But objectA.objectBCollection (a lazy

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

2011-06-06 Thread oscar balladares
Hi. I faced the same problem. Official docs has no practical examples. I suggest you to read this article. http://www.dobervich.com/2011/03/21/symfony2-blog-application-tutorial-part-v-intro-to-security/ It may be outdated (when I read it first time, it was implementing Symfony2 PR8). But you can

Re: [symfony-users] Symfony 2.0 or Symfony 1.4

2011-06-06 Thread oscar balladares
ed > in 1.4 to 2.0 ? Understandably the upgrade is not very good , but since it > has a lot more to offer it could have been an interesting dilemma, right? > > > On Sun, Jun 5, 2011 at 11:34 AM, oscar balladares wrote: > >> I started with S1.4, then they announced that th

Re: [symfony-users] Symfony 2.0 or Symfony 1.4

2011-06-05 Thread oscar balladares
I started with S1.4, then they announced that there will be a 2.0 version. I achieved 1 major proyect with 1.4, then moved to 2.0. 1.4 has a lot of plugins and books and tutorials. 2.0 has good docs but there are much work to be done. 2.0 is moving fast, many changes has been commited, so you hav

Re: [symfony-users] How to upload images in symfony 2

2011-06-04 Thread oscar balladares
I'm trying to achieve the same. http://www.tnyholm.se/symfony2-beta-upload-file/ That guy did quite a good job, but it could be better, I will use that info anyway. If you find a better way, let us know please. 2011/6/3 Tomasz Leśniak > Hi ever

Re: [symfony-users] Can you please unsubscribe me

2011-06-01 Thread oscar balladares
The answer is right at the bottom. Can you spot it ? Ok, sorry, you should be anxious already so just click symfony-users+unsubscr...@googlegroups.com and send anything, they will catch the request. 2011/5/30 Chinthaka Rukshan Weerakkody > Hi, > > I need to unsubscribe from this group and can

Re: [symfony-users] [SF2] Question on security password encoding

2011-05-30 Thread oscar balladares
And it will work again when you remember to refactor the code because you are a good dev and have a well documented project. How many time you will be updating/changing the iterations? No flame war intented :D I was just trying to help IMHO. [?] 2011/5/30 Christophe COEVOET > > It will work un

Re: [symfony-users] [SF2] Question on security password encoding

2011-05-30 Thread oscar balladares
should work [?] 2011/5/30 oscar balladares > [?] Ok, I got your point. > > Of course, it is up to the developer to remember everything, and debug any > issue during the life cicle of the app. If not then he/she > wouldn't be a developer. > > But I'm pretty s

Re: [symfony-users] [SF2] Question on security password encoding

2011-05-30 Thread oscar balladares
[?] Ok, I got your point. Of course, it is up to the developer to remember everything, and debug any issue during the life cicle of the app. If not then he/she wouldn't be a developer. But I'm pretty sure that you mean that you want more abstraction. You could: salt = md5(time()); } } 2011/5/3

Re: [symfony-users] Re: Highlighting menu based on controller called

2011-05-29 Thread oscar balladares
ry to include it, I haven't check yet (that was about 1 month ago). Regards. 2011/5/30 oscar balladares > What I'm doing is to get the actual route in template, and if a route > matchs a category (lets say), > then print an "id='current'" > > for example:

Re: [symfony-users] Re: Highlighting menu based on controller called

2011-05-29 Thread oscar balladares
What I'm doing is to get the actual route in template, and if a route matchs a category (lets say), then print an "id='current'" for example: Home That's it. Of course it will become clumsy when you have many links cause it is hard to read through. I'll go with MenuBundle in my next project upda

Re: [symfony-users] [Symfony2] Deleting default security.yml file

2011-05-29 Thread oscar balladares
What I'm doing is to override the defaults, this is quicker/easier (for me at least) than option 2: Remove from appKernel any reference to "security": SecurityBundle, and SecurityExtraBundle, Also, comment out/remove reference to JMS in config.yml (The lasts lines of the file) and of course comme

Re: [symfony-users] [SF2] Question on security password encoding

2011-05-26 Thread oscar balladares
I'm doing it bypassing the entity from the form (obviously) to the entity's repository; the repo has a persistEntity(Entity entity) method, which encode the password and persist it with an entity_manager instance available in the repo context. This clears the controller from doing all that nasty

Re: [symfony-users] [S2] Project configuration onn a Shared hosting.

2011-05-26 Thread oscar balladares
Thank you very much! With those tips I fixed it !!! 2011/5/26 Matt Robinson > On 26 May 2011, at 06:37, oscar balladares wrote: > > I'm having troubles getting Symfony2 to work on a Shared Hosting > enviroment. > > […] > > My .htaccess file reads as follow

[symfony-users] [S2] Project configuration onn a Shared hosting.

2011-05-25 Thread oscar balladares
Hi Symfony family. I'm having troubles getting Symfony2 to work on a Shared Hosting enviroment. I would appreciate if you can point me how to set up a S2 application to be deployed on a shared hosting. If this helps in any way, this is what I have done so far without success: On my local box,

Re: [symfony-users] Re: Testing Symfony2 Doctrine2 Entities against Database

2011-05-20 Thread oscar balladares
Thanks so much. I was looking for this! 2011/5/18 defrag > Thank you! That solved the issue: Im pasting setUp code if anyone > would need this: > > public $entityManager = null; > public function setUp() >{ > $config = new \Doctrine\ORM\Configuration(); > $config->setMetadataCa

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

2011-05-16 Thread oscar balladares
"Legacy" sounds a little bit like "les misérables" hahaha. I'm pretty sure that S1 people will feel like the forgotten ones with this title. But the point is that we think that this list is becoming inmantainable. Symfony 1 y so different to Symfony 2, that this can be compared to having a CakePH

Re: [symfony-users] Re: notice: serialize() __sleep

2011-05-16 Thread oscar balladares
te about this case more clearly to explain to all > > This example is perfect, although one more could be added > > Even though is not sf2 related specifically I think that it has to be > explained since we are going to run into these kind of problems > > Thanks > > On Mon, M

Re: [symfony-users] Re: Role based redirect?

2011-05-16 Thread oscar balladares
Dobervich? the one from http://www.dobervich.com/ ??? Hey dude, I'm a big fan of your blog, hope you can update it!! I'll check your implementation to do things as they should. Regards! (Sorry for spaming :( 2011/5/14 dustin10 > I don't think it can be done using security.yml. I implemented s

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

2011-05-16 Thread oscar balladares
I vote + for this motion. Now, the list is full of Symfony2 emails. It is now turning hard for Sym1.x users. I'm a Symfony2 user and it is hard as well to navigate through, you have to be alert of "[symfony2]" or "[doctrine2]" tags on the email's subject. 2011/5/16 keymaster > Having all the sy

Re: [symfony-users] Re: notice: serialize() __sleep

2011-05-16 Thread oscar balladares
ethod does not return anything! > > Marco Pivetta > @Ocramius <http://twitter.com/Ocramius> > http://marco-pivetta.com > > > > On 16 May 2011 08:55, oscar balladares wrote: > >> According what I have read so far, serialize/unserialize $entities with >> pr

Re: [symfony-users] Re: notice: serialize() __sleep

2011-05-15 Thread oscar balladares
information back, you should $product = unserialize($SerializedProductContainer); $product = $em->merge($product); Then you should be able to use proxy information of $product to retrieve associated entities (Lazy load). 2011/5/16 oscar balladares > Hi Luis, I solved the problem. > &g

Re: [symfony-users] Re: notice: serialize() __sleep

2011-05-15 Thread oscar balladares
h the framework itself, but PHP ) Regards! 2011/5/15 Luis Cordova > nobody is doubting that Tim > > On Sun, May 15, 2011 at 7:48 PM, Tim Nagel wrote: > > They're talking about: http://php.net/manual/en/class.serializable.php > > > > Not the Serializer component in Sy

Re: [symfony-users] Re: notice: serialize() __sleep

2011-05-15 Thread oscar balladares
I'm having this problem too. Core Devs suggest to implement Serializable interface. Symfony has Serializer classes and Interfaces, but I still dont know how to implement it/them. If you are lucky, please share what you have found, if any. Regards! 2011/5/11 Luis Cordova > right but this was no

Re: [symfony-users] Re: How change error message in repeated form???

2011-05-15 Thread oscar balladares
I'm interested too. 2011/5/13 elcabong > Fellows, > > I see DefaultValidator: > > namespace Symfony\Component\Form\Extension\Core\Validator; > > use Symfony\Component\Form\FormInterface; > use Symfony\Component\Form\FormValidatorInterface; > use Symfony\Component\Form\FormError; > > class Defaul

Re: [symfony-users] Re: Form spread over multiple pages (wizard) ?

2011-05-15 Thread oscar balladares
If you use JQuery it should be easy. There is a way to hide/show elements. You can render the form in two render field 1 render field 2 Go to next page render field 3 render field 4 Go to previous page But I woul

Re: [symfony-users] Re: Doctrine Extensions Bundle - Wich one ?

2011-05-15 Thread oscar balladares
hehehehe. Never mind [?] 2011/5/15 Christophe Willemsen > Ok delete, didn't see that Stof is the implementation of l3pp4rd for > sf2. Shame on me damned :-( > > On 15 mai, 17:28, Christophe Willemsen > wrote: > > Hi all, > > > > I can see that there are 2 different DoctrineExtensions Bundle. Wh

Re: [symfony-users] Role based redirect?

2011-05-14 Thread oscar balladares
I think you can achieve this with FOSBundle ( the bundle meant for security) I've not implemented this bundle yet. But in the meanwhile I'm doing a redirection to /loginredirect route on login success whatever user is authenticated. This route has a simple controller that check the role of the us

Re: [symfony-users] Re: Testing your Doctrine Entities and Repositories

2011-05-11 Thread oscar balladares
Thanks! [?] 2011/5/11 Gediminas Morkevicius > As what relates to repository, you can make usually functional tests, > unless you have completely different logic in it, and instead of getting > entities your repository modifies them for instance.. Testing entities, you > can make a mock of it, an

Re: [symfony-users] Re : [Symfony2] Repeated Type Field for Password.

2011-05-10 Thread oscar balladares
Thank you s much!. Probably giving thanks may be some sort of spam, but I have to do it.! 2011/5/10 symfonyMan > Hello Matador, > > like this : > $builder->add('password','repeated', array('type'=>'password', > 'first_name'=>'password', 'second_name' =>'confirm you password')); > > or j

Re: [symfony-users] Re: Testing your Doctrine Entities and Repositories

2011-05-10 Thread oscar balladares
I have made this same question, and no answer given to current date :( I would even appreciate a "There is no way to accomplish it" answer, that would be better than nothing :'( 2011/5/10 Kevin > Would also like to know. > > On Mar 17, 10:04 am, Justin Fortier wrote: > > I'd like to know how

[symfony-users] [Symfony2] Repeated Type Field for Password.

2011-05-09 Thread oscar balladares
Hi community [?] Hope you are doing well. Do you know how to set a Repated Type Field for password? In old days I used to: $this->add(new RepeatedField(new PasswordField('password'))); But with the new Form Framework I can't figure out how to accomplish this. Thanks in advance.! -- If you wa

Re: [symfony-users] Update database row/entity

2011-05-09 Thread oscar balladares
I see some inconsistencies in routing. when you submit data with post, the data doesn't goes in the route, as you do. the route should be: pattern: /data-edit/update/ That's it. And the defaults for the controller should have not default parameters. (_controller: A10CrmBundle:Update:update,

Re: [symfony-users] Is there any way to retrieve UserId from current user in Symfony 2?

2011-05-08 Thread oscar balladares
Yep. That is the Deal as Chris said. What provider are you using?? Providers are set in app/config/security.yml something like: security: encoders: #you should have something here as well. providers: main: entity: { class: Company\SomeBundle\Entity\Customer, property

[symfony-users] [Symfony2] Redirection to Login page problem on Functional Tests and SHA512 encoder and entity provider

2011-05-08 Thread oscar balladares
Hi Symfony community [?] Hope you are doing well. I'm being redirected to the Login page in Functional test. I did: $client = $this->createClient(); $client->followRedirects(true); $crawler = $client->request('GET', '/cliente/', array(), array(), array('PHP_AUTH_US

[symfony-users] [Symfony2] unit testing entity repositories.

2011-04-26 Thread oscar balladares
Hi everybody. I've been searching how to test methods related to database functionality. I've found nothing on Doctrine 2 docs, nor PHPUnit docs, just some PDO basics. Can someone please point me the right direction??? I appreciate any kind of help! Regards! -- If you want to report a vulnera

Re: [symfony-users] Re: ajax in symfony 2

2011-04-19 Thread oscar balladares
; thanks you for the replays.. > > can you show me an exemple of sending an ajax request with jquery ?? > > i tried a lot of things (.ajax(), .get()...) but il my ajaxAction, > this test is skipped : (not an XMLHttpRequest()) > if ($this->container->get('request')-&g

Re: [symfony-users] Aw: Re: basic form validation

2011-04-19 Thread oscar balladares
I've have that same issues with yml validation configuration (with dataClass set correctly). It seems to be a cache problem, sometimes it is, but with PR10 I was unable to use yml validations, only annotations were working. Now that I upgrade to PR11, yml are working again. The two versions of co

[symfony-users] [Symfony2] PR11, DemoBundle error 'The controller must return a response ([array]() given)'

2011-04-18 Thread oscar balladares
Hi, I've just downloaded the PR11. When running the demo (when clicking the 'run the demo' button link) an error is trhown: "The controller must return a response ([array]() given)" Looking at the controller I found: /** * @extra:Route("/", name="_demo") * @extra:Template() */

[symfony-users] [Symfony2] The S2 blog is not being updated!!!

2011-04-17 Thread oscar balladares
:'( Anybody knows when 'A week of Symfony' is going to be updated?? I really enjoy reading 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 user

Re: [symfony-users] [Symfony2] validation of runtime generated object properties / dynamic forms

2011-04-16 Thread oscar balladares
I want to do the same. Any help??? 2011/4/16 Holger > Hi all, > > what I'm trying to achieve is to create fully dynamic forms out of a > yaml config. The generation of the form-object itself should not be a > problem utilizing Form::add() according to the yaml config. > The problem I'm running i

Re: [symfony-users] twig check for array field existence

2011-04-16 Thread oscar balladares
Hi. You must use the 'length' filter: {{ entry|length }} That must do the trick. 2011/4/13 David Buchmann > hi, > for a symfony2 project, i use twig. i have a template that outputs a > tree (nested php array) > > what i try to do is: check if there is a 'children' field on the entry, > then if

Re: [symfony-users] Re: ajax in symfony 2

2011-04-16 Thread oscar balladares
2011/4/15 symfonyMan > Hello, > > thanks for all this responses. > > the controller must return a template ? > > Me, I need ajax just for validate email, and print "ok" next to the > email field... > > sorry i have a bad english :) > > thnaks > > On 15

Re: [symfony-users] __check_login controller should return a response

2011-04-14 Thread oscar balladares
Hi. What about if you show us your code? Magic would be if we could help you out without one line of your code. [?] 2011/4/11 Yasmany Cubela Medina > hi, i read every day all mesages in this mail list search for a solution to > this error, many have the same problem and find the solution in on

Re: [symfony-users] Re: ajax in symfony 2

2011-04-14 Thread oscar balladares
The controller should return a template response, a common template (without inheritance of course) 2011/4/14 oscar balladares > With JQuery you can request Marc's controller's route. That should do the > trick. > > > 2011/4/14 Marc MacLeod > >> In your co

Re: [symfony-users] Re: ajax in symfony 2

2011-04-14 Thread oscar balladares
With JQuery you can request Marc's controller's route. That should do the trick. 2011/4/14 Marc MacLeod > In your controller: > >public function fooAction() >{ >// Is this an ajax request? >if ($this->container->get('request')->isXmlHttpRequest()) >{ >

Re: [symfony-users] Symfony2 and Netbeans

2011-04-07 Thread oscar balladares
As far as I know there is no support for S2 in Netbeans. The file you are liooking for is ~/app/console Regards. 2011/4/7 JC > where did data/bin/symfony file go? > It is required by NetBeans as part of the Symfony/Tools setup. > > It was there and assumed to be there by Netbeans in the 1.x ve

Re: [symfony-users] Errors in "Creating pages in Symfony 2" chapter of the book

2011-04-06 Thread oscar balladares
Hi. May be they won't pay attention to the ticket as documentation is always changing. Posting it here is the best way. Regards! 2011/4/5 Mike Angstadt > Hi all, > > I found some errors in the "Creating pages in Symfony 2" chapter of > the documentation (http://symfony.com/doc/2.0/book/ > page

Re: [symfony-users] The CSRF token is invalid. Please try to resubmit the form

2011-04-05 Thread oscar balladares
hidden fields. Hope this solve your issue. Regards! 2011/4/5 oscar balladares > You must render the hiddens fields. > > twig: > > {{ form_hidden(form) }} > . > > > > > 2011/4/5 symfonyMan > >> Hello, >> >> i got this error when i try t

Re: [symfony-users] The CSRF token is invalid. Please try to resubmit the form

2011-04-05 Thread oscar balladares
You must render the hiddens fields. twig: {{ form_hidden(form) }} . 2011/4/5 symfonyMan > Hello, > > i got this error when i try to submit my form. The CSRF token is > invalid. Please try to resubmit the form > > it worked good in PR8 and when i updated to PR10 ... > > thanks > > -- > If

Re: Re : [symfony-users] Re: [Symfony2] PR8->current: Unable to find the controller for path "/login_check"

2011-04-05 Thread oscar balladares
Just what I said. There must be a route defined for _security_check As Tim Nagel pointed. 2011/4/5 mamadou aliou diallo > hello, i receive too many email from this group ... how can i stop that? > > regards. > > Mamadou Aliou Bobo Diallo > > > -- > *De :* Dennis Jacob

Re: [symfony-users] Re: [Symfony2] PR8->current: Unable to find the controller for path "/login_check"

2011-04-05 Thread oscar balladares
ll? > > > On 5 Apr., 07:14, oscar balladares wrote: > > Hi. > > Did you define the route for login_check? > > > > #app/config/routing.yml > > > > _security_login: > > pattern: /login > > defaults: { _controller: YourBund

Re: [symfony-users] [Symfony 2] Problem with a very simple thing

2011-04-04 Thread oscar balladares
Did you clear the cache? Sometimes is all you neeed. I can't figure out anything else: rm -rf /Library/WebServer/Documents/Symfony/app/cache/* 2011/4/1 Antonio Antunes > Hello, > > I'm new to Symfony but I have some experience with PHP programming, > anyway I've tried looking on the google f

Re: [symfony-users] autentication problem

2011-04-04 Thread oscar balladares
Hi. This is a great S2 security tutorial. It should fill your needs. http://www.dobervich.com/2011/03/21/symfony2-blog-application-tutorial-part-v-intro-to-security/ 2011/4/2 bitgandtter > first i´m really new in symfony 2.0. > I am developing an application using symfony 2.0 and so far every

Re: [symfony-users] Re: The "Hello Symfony!" Page - Documentation

2011-04-04 Thread oscar balladares
Hi. I should add that Symfony2 is still in Preview Release state, not even Beta. So confusing is expected. I've been following the S2 development since PR6 so for me (and for many more) It hasn't be that hard to keep up. I'm pretty sure that S2 will come along with high quality docs when stable r

Re: [symfony-users] [Symfony2] PR8->current: Unable to find the controller for path "/login_check"

2011-04-04 Thread oscar balladares
Hi. Did you define the route for login_check? #app/config/routing.yml _security_login: pattern: /login defaults: { _controller: YourBundle:Security:login } _security_check: pattern: /login_check _security_logout: pattern: /logout 2011/4/4 Dennis Jacobfeuerborn > On Monday,

Re: [symfony-users] [Symfony2] Return a 303 status (or any other) with RedirectResponse();

2011-04-03 Thread oscar balladares
Thank you both very much.! 2011/4/3 Jordi Boggiano > On 03.04.2011 20:17, Christophe COEVOET wrote: > > Le 03/04/2011 20:09, oscar balladares a écrit : > >> Hi everybody > >> I'm working with Ajax. > >> I have a html list with, for example 2 row

[symfony-users] [Symfony2] Return a 303 status (or any other) with RedirectResponse();

2011-04-03 Thread oscar balladares
Hi everybody [?] I'm working with Ajax. I have a html list with, for example 2 rows, and they can be removed via Ajax. If 1 row is removed, the Controller will return the updated list. And if the last row is removed, the Controller will return a RedirectResponse() to the homepage instead. The p

Re: [symfony-users] Re: [Symfony 2] Embedding Controller to Template

2011-04-01 Thread oscar balladares
Hi nerdess. If you want to return a string from a controller instead returning a twig template you should: return new Response('HI, Im a string'); Also you have to: use Symfony\Component\HttpFoundation\Response; in the imports of the controller. 2011/4/1 nerdess > That is really helpful to

Re: [symfony-users] Re: How to extend from an app's template now?

2011-04-01 Thread oscar balladares
Hi. you might want to download the SE PR9 and import your bundle, anyway bundles are meant to be able to hook up very easily. I'm using PR9 and base.html.twig is in app/Resources/views and is working. Saludos. 2011/4/1 Gustavo Adrian > Yes, I cleared the cache and removed the "Bundle" suffix

Re: [symfony-users] [Symfony2] I ~think I found a bug. I need your advice before submitting the issue.

2011-03-31 Thread oscar balladares
ude' the template. Regards.! 2011/3/31 Fabien Potencier > On 4/1/11 3:09 AM, oscar balladares wrote: > >> Hi everybody, as I mentioned I think I found a bug in the Request >> component. >> Before submitting the issue I need you to confirm or advice me if this >

[symfony-users] [Symfony2] I ~think I found a bug. I need your advice before submitting the issue.

2011-03-31 Thread oscar balladares
Hi everybody, as I mentioned I think I found a bug in the Request component. Before submitting the issue I need you to confirm or advice me if this is really a bug and not a feature or misusing. I resume, I have a main layout, which render a controller's response template, in that template I want

[symfony-users] [Symfony2] link_to() helper for Symfony2???

2011-03-30 Thread oscar balladares
Hi everybody [?] I need the functionallity of the link_to() helper. It generates a link tag when clicked it triggers an Onclick event that submit an embbeded form which is similar to: Delete With Macros on twig I could implement a similar helper, but the usefullness of link_to() is that it ge

Re: [symfony-users] shows only id not the name-string

2011-03-29 Thread oscar balladares
I recommend you to follow the Jobeet tutorial for S1.4 and Doctrine. It would have answered your question. public function __toString() { return $this->name; } 2011/3/29 Gábor Fási > Create the __toString() function in your City class. > > On Tue, Mar 29, 2011 at 19:42, -Jab- wrote: > > i ha

Re: [symfony-users] Re: Injecting routes with parameters into javascript

2011-03-29 Thread oscar balladares
I need to be able to do that too. I'm looking for an Javascript based button. Actually it is an tag that on its OnClick event triggered it will send an embedded post Form with the value of the Id of an X object to be handled in an Controller (for example something llike the link_to button in S1,

Re: [symfony-users] [Symfony2] is_granted() results in error when not logged in

2011-03-28 Thread oscar balladares
Good tip. I'll save it for further implementations. Regards. 2011/3/28 Dennis Jacobfeuerborn > The problem was the "security: false" for the login firewall. > > This allows the user to visit the login page but because no security > context is established you cannot use is_granted() anywhere on

  1   2   >