Re: [symfony-users] Re: Symfony2 Sandbox git
Why would you delete the .git directory? Git can handle a limitless amount of upstream repositories so you'd just have to add your repo on GitHub (or local or else) and you're good to go. You lose the ability to import upstream changes when you're deleting the .git directory. :) Cheers, Daniel Sent from my iPhone4 On Jan 10, 2011, at 3:54 PM, Gustavo Adrian comfortablynum...@gmail.com wrote: You'd fork in case you want write access to the repo. With this url: git://github.com/symfony/symfony-sandbox.git You have only read access. In my case, I clone it, then I delete the .git directory and finally import it to my own repo. Hope this helps. On Mon, Jan 10, 2011 at 11:46 AM, Donald chekot...@gmail.com wrote: But I'm wondering *how* you got it from the repo? As far as I know, you can download it, or fork it, or clone it, each of which has various repercussions on how a project will behave in regards to updates to the sandbox. On Jan 10, 8:41 am, Gustavo Adrian comfortablynum...@gmail.com wrote: From the repo: git://github.com/symfony/symfony-sandbox.githttps://github.com/symfony/symfony-sandbox On Mon, Jan 10, 2011 at 11:39 AM, Donald chekot...@gmail.com wrote: Thanks. How did you begin working with the sandbox? Did you download the zip, or fork the repo, or clone it, or something else entirely? On Jan 10, 8:35 am, Gustavo Adrian comfortablynum...@gmail.com wrote: I've been using the sandbox with vendors updated with the scripts that symfony comes with (on bin/ directory). First I've tried to use submodules but for a few reasons I decided to stick with just cloning my vendors with the scripts of the sandbox. When I want to update my vendors, I just run ./bin/install_vendors.sh and I'm ready to work. Some of my personal reasons for this were: . In my continuous integration system I've got several failed builds when it tried to download some of the submodules. The problem was that the connection with Github failed for several reasons (timeout, etc). . Updating vendors one by one took me a lot of time (maybe I don't know how to use submodules in the right way yet :P) Again, these are my personal reasons. I'm not an expert with git so maybe submodules are the best bet for other developers. Hope this helps :) On Mon, Jan 10, 2011 at 11:26 AM, Donald chekot...@gmail.com wrote: Hi, I've been experimenting with the zip version of the symfony 2 sandbox for a while, and I'd like to start using github for my project. I've read up a little on git and am familiar with the basics, plus submodules and subtrees. I'm trying to determine the best way to proceed when setting up a new symfony2 project. With symfony 1, I had used svn:externals to keep the symfony framework up-to-date, and with symfony2 I've tried various things from subtree merges, to creating the vendors as submodules, to even forking the symfony 2 sandbox on github. I'm not exactly sure which of these is the most appropriate way to setup a new project. They all seem to have their benefits and problems. Can anyone with experience in this provide me with some sage advice? Thanks, Donald -- 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 symfony-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 -- If you want to report a vulnerability issue on
Re: [symfony-users] Re: using partials in i18n forms and credentials for i18n forms
You passed the user object as the first parameter – please read my email again. :) The first parameter has to be an Events object or null. Cheers, Daniel On 14.12.2010, at 15:57, P-A Coipeault wrote: Hi Daniel. I tried to instanciate my form the way you suggested but i only get that 500 error : The EventsForm form only accepts a Events object. I also tried another way, by overriding the executeNew() method and assigning my user object to the form object like that : $this-form-user = $this-getUser()-getGuardUser(); But i don't recover my user object when the form is displayed. If you have any idea, that will be very useful. Regards! P-A On Dec 14, 1:42 am, P-A Coipeault pcoipea...@gmail.com wrote: Thanks a lot Daniel ! That's really helpfull :) So, one point resolved above two is resolved. Thanks again. Cheers, P-A On Dec 14, 12:25 am, Daniel Lohse annismcken...@googlemail.com wrote: You can pass the user as an option to the form from the action — just pass an array as the second parameter of the form instanciation like so: $form = new modelnameForm($object or null, array('user' = $this-getUser()-getGuardUser()); And then in the form's configure() method you can get the user with: $this-getOption('user'). Cheers, Daniel Sent from my iPhone4 On Dec 13, 2010, at 6:53 PM, P-A Coipeault pcoipea...@gmail.com wrote: Hello everyone. I'm using sf1.4 with Doctrine ORM. I'm facing some kind of problems. I've got a backend app generated, with tables acting as i18n. No problems with that, everything works fine, as soon as it stays in standard. Due to ergonomic and functionnality requirements made by the customer, i've to simplify to the maximum the edit and new forms. To do that i wanted to use partial. But as i declare the partials in the form-display in the generator.yml, the i18n fields in the form don't appear anymore, even if i try to declare them in the display in the generator Moreover, this backend app would be editable by languages admins. I mean that they could only edit the language they're allowed to. I've build my credentials and sfDoctrineGuard to make this work, but in my / lib/forms/doctrine/modelnameForm.class.php, i can't use $sf_user or $this-getGuardUser to allow or not the use of i.e. : $this- widgetSchema-setLabel('en', 'English'); If you need more information or code snippets, i can provide some to figure it better. Thanks for your help ! Kind regards, P-A Coipeault -- 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 -- 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] using partials in i18n forms and credentials for i18n forms
You can pass the user as an option to the form from the action — just pass an array as the second parameter of the form instanciation like so: $form = new modelnameForm($object or null, array('user' = $this-getUser()-getGuardUser()); And then in the form's configure() method you can get the user with: $this-getOption('user'). Cheers, Daniel Sent from my iPhone4 On Dec 13, 2010, at 6:53 PM, P-A Coipeault pcoipea...@gmail.com wrote: Hello everyone. I'm using sf1.4 with Doctrine ORM. I'm facing some kind of problems. I've got a backend app generated, with tables acting as i18n. No problems with that, everything works fine, as soon as it stays in standard. Due to ergonomic and functionnality requirements made by the customer, i've to simplify to the maximum the edit and new forms. To do that i wanted to use partial. But as i declare the partials in the form-display in the generator.yml, the i18n fields in the form don't appear anymore, even if i try to declare them in the display in the generator Moreover, this backend app would be editable by languages admins. I mean that they could only edit the language they're allowed to. I've build my credentials and sfDoctrineGuard to make this work, but in my / lib/forms/doctrine/modelnameForm.class.php, i can't use $sf_user or $this-getGuardUser to allow or not the use of i.e. : $this- widgetSchema-setLabel('en', 'English'); If you need more information or code snippets, i can provide some to figure it better. Thanks for your help ! Kind regards, P-A Coipeault -- 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] Best practice to use Eclipse PDT and symfony?
If you don't put symfony into your project then you won't get autocompletion for symfony classes. There are many errors thrown by Eclipse because some parts of symfony (like the admin generator themes that use [?php instead of ?php because they are compiled at runtime) just don't validate. I just ignored those — works well for me and I sure don't like to miss out on autocompletion for symfony classes. Cheers, Daniel Sent from my iPhone4 On Dec 13, 2010, at 10:18 PM, Macvek mac...@gmail.com wrote: I've recently worked on a small project using PDT. For errors: I didn't figured how to remove error checking from symfony directory. It wasn't a problem, cause Eclipse shows an icon on files which have errors. Eclipse should index your code, and it will propably check the lib/vendor/symfony, so if you add it to buildpath, you'll have functions duplicates. For team work, I suggest ignoring cache, log, lib/vendor/symfony and it should work. During my development, I've done ordinary CLI commands, and eclipse (after F5 or project refresh) just checked changes and it still worked well. The only problem was after regenerating models, because SVN was creating patches instead of removing them and adding newones (generating a series of conflicts as result). To fix it, svn:ignore should be put for /lib/model/[om,map]. Regards, Maciej Aleksandrowicz 2010/12/13 benze ebenza...@gmail.com: Hi, I used to use Eclipse to develop Java, and am new to using it for PHP. I've downloaded the Eclipse PDT All-In-One package and was hoping it would give me a familiar experience when programming. I am hoping that there are some users on this list who use Eclipse PDT with symfony that can help me figure out how to set things up right. I created my new project using the Cli, and placed symfony in /lib/ vendor/symfony. When I create my new project (I called it mipp) in Eclipse, the first thing I notice is that it puts the entire project as the source folder in the build path. Is that the correct way to set it up? Should some folders be specifically excluded from the build path? The second thing I notice is a few thousand errors in the /lib/vendors/symfony directory. Mostly relating to .xml validation errors, .mod errors, etc. I know I can configure eclipse to skip xml validation, etc, but figured there must be some better way to set up a project. If I exclude symfony from the build path, the errors remain. I know I can remove symfony from the tree altogether and download it to another location as a library, but if I do that, then I'll need to configure my WebServer to use an external lib for symfony and not find it within the web-app itself. Can anyone shine a little light and experience on how to setup PDT for symfony properly? I've tried searching the web, and ppl are extolling NetBeans and other editors, but I'd love to see this working in an environment I am familiar with. Thanks! Eric -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- 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] Re: Learning Symfony2 is difficult because...
They are the same because this bundle can also persist not only to SQL databases with the Doctrine 2 ORM but also to MongoDB (NoSQL) using the Doctrine 2 ODM. :) Cheers, Daniel Sent from my iPad On Dec 7, 2010, at 10:17 AM, Flukey jstevenh...@gmail.com wrote: Hi Florian, Thanks for the heads up for DoctrineUserBundle(https://github.com/ knplabs/DoctrineUserBundle). The code layout there makes a lot of sense to me. It's clean and consistent. One that thing that confuses me is the files in Document and Model directories are *exactly* the same, not sure why Any idea? I love the the dependency injection part of the framework. Like this ORM config file: https://github.com/knplabs/DoctrineUserBundle/blob/master/Resources/config/orm.xml Nice and clean! Makes sense. On Dec 7, 9:31 am, Florian sideral.undergro...@gmail.com wrote: Hi, Short answer, from my little experience on the framework: You're true, some bundles are outdated, due to the fact things are moving fast, and the documentation is impacted too. So a lot of old slides are showing some examples that simply doesn't work! You should always follow changes on recent bundles and/or follow the framework commits itself ( github ). That's where you will find the best answers. Now, concerning best practices on Namespaces and naming conventions, it is still discussed by the core team, so don't forget it's still PR, even not beta! BUT, some bundles like DoctrineUserBundle are very specific on a few things like DAO, so I think it's normal there is no default naming or conventions. On 7 déc, 01:24, Flukey jstevenh...@gmail.com wrote: I've been doing a lot of fiddling around with Symfony2 (latest PR4 release) and reading a lot of it's documentation (I've read pretty much all of it) The problem i'm faced with now, are the best practices. I've looked at many of the bundles/projects source on symfony2bundles.org and they all have different ways of managing their entities, repositories, different file structure etc. For example, some have entity classes but no repositories. Some have repositories, entities and interfaces to repositories. There doesn't seem to be any best-practice consistency across all of the projects. Should I put my queries in a repository class and keep it in the entities folder or move it to a model folder? Should I always create interfaces? When doing a doctrine query, should I always use the NoResultException if a query returns null? or should I use something different? I appreciate that some of the bundles/projects are old and they've become outdated because of all the new changes applied to the current version. The forms part of the framework interests me greatly but there doesn't seem to be much documentation (particularly for twig form templates). I also don't know if I should put my form configuration in my entities class or create a new model class? or should I create the form in an action? Also, from reading a presentation (http://www.slideshare.net/jwage/ symfony2-and-doctrine2-integration) i'm confused about actions. In this slideshow it says the action should extend the sfDoctrineController. Should I use that? From looking at the framework, I can clearly see that the symfony team have done a fantastic job. It's very impressive. I know it's early days and I shouldn't expect too much documentationbut there doesn't seem to be a little project which uses Doctrine2 and Twig Forms which has been confirmed as a good project for learning best practices from. (It would be great if a Symfony2 version of 'jobeet' is written up) I know it's look like i'm ranting folks but it's just a bit frustrating to look at multiple bundles/projects to see they all have a different file structure and code patterns. It's incredibly confusing. I'm stuck between a rock and a hard place. It's a shame because I *really* want to get up to speed on the framework so come March 2011 when it's due to be released i'll be ready to go and start developing production-ready applications. What are your thoughts? Are you experiencing any of the same confusion? Thanks muchly! Jamie -- 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
Re: [symfony-users] updating a field in action
No, find just returns one object. But you can't give it an array, just give it the primary key which is, in your case, the foo_parameter. Cheers, Daniel Sent from my iPad On Nov 30, 2010, at 7:15 PM, Stan McFarland sfmc...@gmail.com wrote: I think it's because '$foo' is not an object but rather a set of objects returned by the find() method. -stan On Tue, Nov 30, 2010 at 12:54 PM, Martin Henits martin.hen...@gmail.com wrote: I know it is a very silly question. How can I just update a db field in one of the actions? suppose that my code is like this: public function executeConfirm(sfWebRequest $request) { $foo = Doctrine::getTable('foo')-find(array($request- getParameter('foo_id'))); $foo-setConfirmed(1); $foo-save(); } the above code doesn't work as the change doesn't save into the database. cheers -- 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 -- 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: Backend works on dev but not on prod
Because there can only be one app under the same virtual host without the script name in the URL. How is Apache going to differentiate between URLs? ;-) Cheers, Daniel On 23.11.2010, at 18:51, HiDDeN wrote: I have identified the responsible of this behaviour: the no_script_name option (in settings.yml). When no_script_name is set to false all routes work correctly, but when it is set to true they don't work. My question is... why my frontend app works well with no_script_name set to true, but the backend does not? On 23 nov, 18:31, HiDDeN davidmoralesmoj...@gmail.com wrote: I have a strange problem. In my development machine I have no problems running all my application, but in production the backend doesn't work well on the production environment. When in development environment, there's no problem. But when I switch to prod environment, routes seem not to work. Every link I click makes nothing, it reloads the same initial page. Other links return a 404 page directly. I activated logs, and nothing is being written, so it seems that Symfony is not catching any strange behaviour. It makes very difficult to debug... Why is working in development and not in production? -- 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 - sorting
Hey there, 1. clear your cache, so the sort can take effect 2. Take a look at ahAdminGeneratorThemesPlugin Cheers, Daniel Sent from my iPhone4 On Nov 17, 2010, at 10:20 AM, qp quentin.p...@gmail.com wrote: list: title: Card Reloads display: [=transaction_no, card_no, amount_received, reload_fee, net_reload, reload_value, status] sort: [ transaction_no, desc] object_actions: #_edit: ~ _edit: ~ I've set the configurations for the listing in the generator.yml as above, but the sorting option is not working. 2. For virtual columns, the related labels are not sortable! i.e the titles are inactive Any pointers? -- 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] sfGuardUserProfile doesn't work? :-(
You'll also need to select s.id like the error message says: The root class of the query (alias s) must have at least one field selected. – but you also might need to select p.id, too. Does that help? Cheers, Daniel On 16.11.2010, at 09:59, man mixi wrote: Hi, experts. I set up a simple relationship using sfGuardUserProfile. But it does not work properly. Remove 'p.name' from select method, In this case it works. Why? I do not understand the meaning of the error message. Please help me. --- ERROR MESSAGE 500 | Internal Server Error | Doctrine_Query_Exception The root class of the query (alias s) must have at least one field selected. #action.php $this-saless = Doctrine_Query::create() -select('s.user_id as userid,p.name, sum(s.amount) as amount') -from('Sales s') // -where('s.created_at between ? and ?',array($start,$end)) -leftJoin('s.Profile p') -groupBy('userid') -execute(); #schema.yml Sales: tableName: sales actAs:{ Timestampable: ~ } columns: user_id: type: integer amount: integer relations: User: class: sfGuardUser foreign: id local: use_id type: many onDelete: cascade foreignType: many foreignAlias: Sales Profile: class: sfGuardUserProfile foreign: user_id local: user_id type: many onDelete: cascade foreignType: many foreignAlias: Sales sfGuardUserProfile: tableName: sf_guard_user_profile actAs:{ Timestampable: ~ } columns: id: integer user_id: type: integer primary: true name: varchar(50) relations: User: class: sfGuardUser foreign: id local: user_id type: one onDelete: cascade foreignType: one foreignAlias: Profile -- 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] Doctrine Batch procesing
That's unfortunate because you really have few options — I know because I've been there just this week. So, array hydration is out of the question, fine, let's see what other options you have: 1. Increase memory of the server (sorry, but it's one option) 2. Use the latest PHP 5.3.x and try to call gc_collect_cycles(); after each iteration — this will slow down your script some but could help. Unfortunately, while garbage collection has certainly improved with PHP 5.3, you can't rely on this because PHP is not forced to garbage collect and sometimes can't; tricky stuff. 3. Fork another process after, say, 1000 objects. Each PHP process has its own memory limit. I know of one project that uses this — you'll have to go look for it, though. The update-search-index task of the Apostrophe CMS is using this technique to work around this problem, you can find the source on svn.apostrophenow.org. Sorry for not being more specific. :( 4. Only process a given amount of objects per call and work your way through the queue, flagging objects you've finished processing along the way. 5. Try to use the OnDemand object hydrator and see if that helps. If you already tried all options I listed above (and failed ;-)), you'll need to tell us more about the process, about why they don't/won't work — maybe we can then come up with a solution. I feel your pain, cheers, Daniel Sent from my iPad On Nov 16, 2010, at 8:48 PM, Luciano A. Andrade andrade.luci...@gmail.com wrote: I am tyring to make a batch processing for synchronization of two databases, and i am running on limitation of the memory usage. I like to be able to process 3 objects, i can't use arrays for the hydration, since i have some logic i need to execute. I only need one of this object at any time, but it looks like theres no way to liberate the used objects, so memory usage grow rapidly. Any one has be able to free some memory, i am using $object-free(true); unset($object); so i run out of ideas. Any one? -- 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] Re: On $form-save() and knowing if anything has changed
Yes, you can indeed do that — I might have a look at the Timestampable behavior and see what it does, maybe you'll get some more insights into how you can do this some other way but if you can live with your solution then that's also fine. :) Cheers, Daniel Sent from my iPad On Nov 15, 2010, at 1:08 AM, LeBurt burt.crepea...@gmail.com wrote: Well, we can mark this one solved. Daniel's solution seemed simple and elegant but I couldn't really figure it out with my cuurent level of knowledge. Then I read Richtermeister's post again and fathomed that all I'd have to do is add the timestampable behavior on my Doctrine class and then do this in my action: $lastUpdate = $this-supplier-getUpdatedAt(); $form-save(); $newUpdate = $this-supplier-getUpdatedAt(); if ($lastUpdate != $newUpdate) return 'changes'; else return 'nochanges'; Works like a charm and it's simple enough for my needs. Thanks all for the inspiration. Burt. -- 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] Re: On $form-save() and knowing if anything has changed
What do you want to do? Before you save the form (and therefore the object), you can get at the changes like described here: http://groups.google.com/group/symfony-users/browse_thread/thread/be414f79f499f869/a18b2291ba30275c?lnk=gstq=doctrine+isModified#a18b2291ba30275c Just add the doUpdateObject method to your form, call parent::doUpdateObject and then you can inspect the changes by calling $this-getObject()-getModified(false) to get the changed fields and their new values (call $this-getObject()-getModified(true) to get the old values). Cheers, Daniel PS: You can also find out more about the form saving process here: http://www.symfony-project.org/more-with-symfony/1_4/en/06-Advanced-Forms#chapter_06_sub_the_form_saving_process On 12.11.2010, at 16:03, LeBurt wrote: Thanks for the suggestion Gareth. Unfortunately it doesn't work. Since I'm not all that knowledgeable in OOP, I was thinking this might have something to do with the $oldstate and $newstate objects being the same (two references to the same object), that way when you change one the other changes also. To rule that out I tried this, based on your suggestion: $state = Doctrine::getTable('myClass')-find($id); $oldstate = serialize($state); $form-save(); $state = Doctrine::getTable('myClass')-find($id); $newstate = serialize($state); if ($oldstate != $newstate) return 'changes'; else return 'nochanges'; Don't laugh, that's how I learn... ;) In any case, no joy, but the behaviour is opposite as before: I always get changes! Puzzling... -- 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] Re: ahDoctrineEasyEmbeddedRelationsPlugin missing addRelation button
Yes, and you also have the option 'noNewForm' set to true which, obviously, discards the form to add a new related object. :) Cheers, Daniel Sent from my iPhone4 On Nov 12, 2010, at 4:10 AM, thronic sean.vill...@gmail.com wrote: Upon further reading i realized that i had to add new_RELATIONNAME to my generator.yml! On Nov 11, 10:02 pm, thronic sean.vill...@gmail.com wrote: I've added the embedRelations call and i can see (and edit and delete) my relations when i edit the parent record. But for some reason I can't add a relation. How do i add a relation?? Am i missing something in my embedRelations method? $this-embedRelations(array( 'RestaurantMenuItemOptions' = array( 'considerNewFormEmptyFields'= array('name', 'description'), 'noNewForm' = true, 'newFormLabel' = 'New Menu Item Option!!!', 'newFormClass' = 'RestaurantMenuItemOptionsEmbedForm', 'newFormClassArgs' = array(array('sf_user' = $this-getOption('sf_user'))), 'displayEmptyRelations' = true, 'formClass' = 'RestaurantMenuItemOptionsEmbedForm', 'formClassArgs' = array(array('ah_add_delete_checkbox' = true)), 'newFormAfterExistingRelations' = true, 'formFormatter' = null, 'multipleNewForms' = true, 'newFormsInitialCount' = 2, 'newFormsContainerForm' = null, // pass BaseForm object here or we will create ahNewRelationsContainerForm 'newRelationButtonLabel'= '+', 'newRelationAddByCloning' = true, 'newRelationUseJSFramework' = 'jQuery', 'customEmbeddedFormLabelMethod' = 'getLabelTitle' ) )); -- 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] Re: Problem with making a drop down menu from a table
That's because you have to use the Doctrine (or Propel) version of this widget. Cheers, Daniel Sent from my iPhone4 On Nov 12, 2010, at 1:27 AM, apc...@dsl.pipex.com apc...@dsl.pipex.com wrote: Thank you for taking time to help me. My code is now: $this-form = new sfForm(); $this-form-setWidgets(array( 'section_id' = new sfWidgetFormChoice(array( 'model' = 'sectors', 'column' = 'sectorTitle' ) ))); But I still get another error: sfWidgetFormChoice does not support the following options: 'model', 'column'. Anymore ideas ? On Nov 12, 12:06 am, Alexandre Salomé alexandre.sal...@gmail.com wrote: Add new before sfWidget... : you are instanciating an object, not calling a function --- Alexandre Salomé -http://alexandre-salome.fr Le 12 nov. 2010 01:04, apc...@dsl.pipex.com apc...@dsl.pipex.com a écrit : All I am trying to do is make a drop down menu from a table in a database. I think I need to place some code in an action class. The table is called 'sectors. The column I would like to see in the drop down menu is is 'sectorTitle' ' The code I am using is: $this-form = new sfForm(); $this-form-setWidgets(array( 'section_id' = sfWidgetFormChoice(array( 'model' = 'sectors', 'column' = 'sectorTitle' ) ))); But I get an error message saying : Call to undefined function sfWidgetFormChoice() Does anyone know what I am doing wrong ? Thanks Reto -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com For more options, visit this group athttp://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 -- 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] How to aasign external link in symfony
You mean prefix of http://, right? ;-) Sent from my iPhone4 On Nov 12, 2010, at 8:42 AM, Gareth McCumskey gmccums...@gmail.com wrote: This is expected behavour. url_for looks for the suffix http:// to know if its an external link or not. On Thu, Nov 11, 2010 at 2:39 PM, deepak deepakkumar...@gmail.com wrote: Hi There is a column in my table which stores external urls e.g. www.amazon.com. Now when I try to use link_to('Product', $Obj-getUrl()). It outputs a href=http://www.myappbaseurl.com/www.amazon.com;Product/a Infact symfony takes all the url as internal uri. Is there a way in symfony thru which I can assign external url to links such as a href=www.amazon.comProduct/a ? Now if there is a http:// added in the url it considers it as external url and redirects properly. Let me know if I make any sense here. Thanks Deepak -- 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 -- 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 -- 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] All new symfony developers please read...
Well said! It also contributes to the readability of the mailinglist because there's less noise with answers like it's in the documentation — just read it. Cheers, Daniel Sent from my iPhone4 On Oct 28, 2010, at 8:16 AM, Gareth McCumskey gmccums...@gmail.com wrote: I thought I'd point something what a lot of new symfony developers don't seem to realise. There is a great piece of documentation on the symfony site that can answer 90% of questions for anyone new to symfony. It is the Gentle Introduction to symfony. http://www.symfony-project.org/gentle-introduction/1_4/en/ Personally, I would highly recommend that anyone new to symfony at least read through the book and use it later as a reference. Just by simply reading through the book and exposing yourself to what symfony is capable of, you will be able to later remember that the book contained details about something you are trying to do and use it as a reference instead of trying to get answers out of the mailing list. The mailing list is great but its slow. By knowing what symfony is capable of you are one step ahead and have what I believe is the best resource for new symfony developers available to you to help get your work done faster. Seriously, just read it. You will save yourself a ton of time. -- 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 -- 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] ahDoctrineEasyEmbeddedRelationsPlugin saving nested embedded forms
Sorry, nested embedded relations are just not possible. I'd suggest you take a look at Kris Wallsmith's plugin for dynamic embedded relations – there's been a bit of work on nested embedded relations already (I think). Cheers, Daniel On 27.10.2010, at 12:51, Gayatri wrote: Hello, I am creating embedded forms using the plugin ahDoctrineEasyEmbeddedRelationsPlugin symfony version - 1.4 plugin version - 1.4.0 I installed this plugin using ./symfony plugin:install My schema is some thing like this User --(1:1)-- UserProfile --(1:1)--Preferences source --(1:1)-- UserProfile I embedding relations thus: userForm{ configure() { $this-embedRelations(array( 'UserProfile' = array( 'newFormLabel' = 'Profile', 'newFormUnsetPrimaryKeys'= true, 'newFormHideFields'=array('created_at','updated_at') ), 'Source' = array( 'newFormLabel'= 'Source', 'newFormUnsetPrimaryKeys'= true, 'newFormHideFields'=array('created_at','updated_at') ) )); } } UserProfileForm { configure(){ $this-embedRelations(array( 'Preferences'= array( 'considerNewFormEmptyFields'= array('created_at','updated_at'), 'newFormLabel' = 'Preferences', 'newFormUnsetPrimaryKeys'= true) )); } } .. In short, I am embedding 2 relations in User :- UserProfile and source, and 1 in UserProfile :- Preferences Now, when I call $user_form-saveEmbeddedForms(); It saves Preferences, but gives error while saving UserProfile saying: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'preferences_id' cannot be null is there any way that I can relate UserProfile::prefereces_id to id of saved object of Preferences? -- 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] perform global logic check in admin rather than in each action
Are those all admin-generated modules? If so, you can specify the base class to use. Just create a new class (myActions or so) and specify this base class in all generator.yml files. This base class must inherit from sfActions. You can then provide your own preExecute method and do the logic check in there — don't forget to call the parent's preExecute method though, otherwise your modules will not work correctly. In your own preExecute method you can forward to a landing page telling the user that an import is running etc. — you probably already have something in mind for this. :) Hope this is helpful, Cheers, Daniel Sent from my iPad On Oct 25, 2010, at 12:04 AM, Joshua houseaddi...@gmail.com wrote: I have an admin application with various modules set up. In one of the modules a user can schedule an import can often take a considerable amount of time to complete. While the import is running, no changes should be made to the database. I'm looking for a solution to lock down the admin while the import is running. I want to prevent any modules from making admin changes through the forms. How can I insert a global logic check to see if an import is running? The alternative would be to have the code for the logic check in every module action, which is not preferable. The only other way I can think of is to put the code in the layout, but you're not supposed to run queries from the templates. -- 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] ahDoctrineEasyEmbeddedRelations - problem with embedded relations within embedded relations
In short, you can't because nested embedded relations with my plugin are impossible, sorry. I'm also sorry to tell you that I won't have time to implement it because the code was not made with this use-case in mind. May I suggest that you take a look at this instead (developed by one of symfony's core developers): http://github.com/kriswallsmith/sfDoctrineDynamicFormRelationsPlugin Cheers, Daniel On 13.10.2010, at 21:21, progfrog wrote: - form uses embedRelations to embedd relation that already uses embedRelations - considerNewFormEmptyFields is set for embedRelations in inner form - inner form works when is used for itself - inner embedded relations do not pass validation when form that hold those is embedded in other form anybody has idea how to remedy this? -- 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] Re: London Symfony Lightning Talks - November 9th
On 06.10.2010, at 15:20, benlancaster wrote: On Oct 5, 4:04 pm, cleve cleve...@gmail.com wrote: A couple of us are organising a symfony meetup in London and thought it would be awesome to get some people to do some lightning talks on symfony usage. We're especially keen on anyone's experience with symfony2 (but anything symfony'ish would be great). If each of us breaks off a small piece of the puzzle, and report back on the night, it will help us all! If you're interested in contributing a talk, please get in touch. http://www.meetup.com/symfony/calendar/14951826/ John Looks good, I'm up for giving a quick walk through of Symfony and achieving 2500 requests/second 2500 requests/second? Nice! I'm not in London, is there any chance this presentation/quick talk would find its way onto Slideshare? (a PDF would also suffice ;-)) Cheers, Daniel -- 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] Re: Propel route: new object with foreign key (sf 1.3.7)
Nope, that won't work because the named route doesn't take or expect a real parameter and you're providing it your offer_id. Try this: link_to(add refurbishment, '@offer_refurbishment_new', array('query_string' = 'offer_id='.$offer-getId())) But you'd be much better served if you just redefined the offer_refurbishment_new route like this: offer_refurbishment_new: url: /offer_refurbishment/new/:offer_id.:sf_format class: sfPropelRoute options: { model: OfferRefurbishment, type: object } param: { module: offer_refurbishment, action: new, sf_format: html } requirements: { sf_method: get, offer_id: '\d+' } Add this rule below your PropelRouteCollection rule for offer_refurbishment. Please check if the model I put up there is correct. Having done this, you can use this: link_to(add refurbishment, '@offer_refurbishment_new?offer_id='.$offer-getId()) Cheers, Daniel On 05.10.2010, at 16:32, Christian wrote: link_to(add refurbishment, '@offer_refurbishment_new?offer_id='. $offer-getId()) -- 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] sfWidgetFormDoctrineChoice to show non-multi selectable list
You mean a normal list of radio buttons, right? Just set the 'expanded' option to true and the 'multiple' option to false and you should be golden. Cheers, Daniel Sent from my iPhone4 On Sep 18, 2010, at 5:57 PM, Martin Henits martin.hen...@gmail.com wrote: Hi, I was wondering if anyone knows how to use sfWidgetFormDoctrineChoice to display a non-multi selectable list? I don't want to see a drop-down menu. I want to see a list of options in a box. Also I don't want to set the multiple option as true. any clue? thanks a lot -- 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, SandBox, PR3] Re: missing files for MongoDB
This means that you don't have the PHP (!) extension (!) for MongoDB installed. Take a look at the documentation for installing it. Cheers, Daniel Sent from my iPhone4 On Sep 17, 2010, at 9:13 PM, spike3111 gilles.gauthie...@gmail.com wrote: I have idea to look for into the cache. I found a method : getDoctrine_Odm_Mongodb_DocumentManagerService() ! Great ! Now i have a new problem when i try to test: config.yml: doctrine_odm.mongodb: default_database: musik default_connection: conn1 default_document_manager: dm1 metadata_cache_driver: apc connections: conn1: server: mongodb://localhost:27017 options: connect: true document_managers: dm1: connection: conn1 $musik = new Categorie(); $musik-setIntitule(Musique); $musik-setNumCds(3); $musik-setNumArtiste(13); $mongo = $this-container- getDoctrine_Odm_Mongodb_DocumentManagerService(); $mongo-persist($musik); $mongo-flush(); I got this error: Fatal error: Class 'Mongo' not found in C:\Users\Moi\Documents\devweb \sandsf2\src\vendor\doctrine-mongodb\lib\Doctrine\ODM\MongoDB \Mongo.php on line 46 On 17 sep, 12:21, spike3111 gilles.gauthie...@gmail.com wrote: Yes I have the latest version of the symfony sandbox, PR3, and it does not work. On 17 sep, 11:10, Henrik Bjornskov jegerhen...@gmail.com wrote: have you installed Doctrine ODM MongoDB ? On Sep 17, 9:56 am, spike3111 gilles.gauthie...@gmail.com wrote: If I created a new instance of the new Symfony Bundle \ Bundle \ DoctrineMongoDBBundle \ DoctrineMongoDBBundle (), and I start the console hello php / console, an error message C: \ Users \ Me \ Documents \ devweb \ sandsf2 hello php / console PHP Fatal error: Class 'Doctrine \ ODM \ MongoDB \ Tools \ Console \ Command \ Schema \ CreateCommand' not found in C: \ Users \ Me \ Documents \ devweb \ sandsf2 \ src \ vendor \ symfony \ src \ symfony \ Bundle \ DoctrineMongoDBBundle \ Command \ CreateSchemaDoctrineODMCommand.php on line 18 I think that the files have just been forgotten. Other problem: If a try to test this: (fromhttp://docs.symfony-reloaded.org/guides/doctrine/mongodb-odm/overview...) $dm = $this-container-getService('doctrine.odm.mongodb.document_manager'); $dm-persist($user); $dm-flush(); I have an error: Call to undefined method helloDevDebugProjectContainer::getService. -- 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] ahDoctrineEasyEmbeddedRelations question
My plugin doesn't work with many-to-many relations, I'm sorry. :( Daniel Sent from my iPhone4 On Sep 17, 2010, at 1:49 AM, deBaer deb...@gmail.com wrote: Hi! I'm totally new to symfony and doing my first project. It is a database of customers (Kunde) and ways to reach them (Kontaktweg, which would be E-Mail, Skype, ...). The two tables are linked by a third one that has the ids of both data sets and the payload (Inhalt, like some...@somewhere.com). This is my schema.yml: detect_relations: true Kunde: actAs: { Timestampable: ~ } columns: name: string vorname: string adresse: string plz: integer(5) ort: string gebdat: date notiz: string Kontaktweg: columns: name: string KundeKontaktweg: actAs: { Timestampable: ~ } columns: kunde_id: integer kontaktweg_id: integer inhalt: string Now I want the frontend edit form for Kunde to show the possibilities of Kontaktweg and to allow the generation of said data sets. I thought ahDoctrineEasyEmbeddedRelations would do that. But I installed it and put this in KundeForm.class.php: $this-embedRelations(array( 'Kontaktwegs' = array( 'considerNewFormEmptyFields' = array('inhalt') This yields the following error message: 500 | Internal Server Error | Doctrine_Table_Exception Unknown relation alias Kontaktwegs stack trace at () in SF_ROOT_DIR/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/ Doctrine/Relation/Parser.php line 237 ... return $this-getRelation($alias, false); } else { throw new Doctrine_Table_Exception('Unknown relation alias ' . $alias); } } at Doctrine_Relation_Parser-getRelation('Kontaktwegs', ) in SF_ROOT_DIR/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/ Doctrine/Relation/Parser.php line 235 ... at Doctrine_Relation_Parser-getRelation('Kontaktwegs', 1) in SF_ROOT_DIR/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/ Doctrine/Table.php line 1001 ... at Doctrine_Table-getRelation('Kontaktwegs') in SF_ROOT_DIR/plugins/ahDoctrineEasyEmbeddedRelationsPlugin/lib/form/ ahBaseFormDoctrine.class.php line 55 ... at ahBaseFormDoctrine-embedRelations(array('Kontaktwegs' = array('considerNewFormEmptyFields' = array('inhalt' in SF_ROOT_DIR/lib/form/doctrine/KundeForm.class.php line 23 ... at KundeForm-configure() in SF_ROOT_DIR/lib/form/sfForm.class.php line 70 ... at sfForm-__construct(array(), array(), null) in SF_ROOT_DIR/lib/form/addon/sfFormSymfony.class.php line 33 ... at sfFormSymfony-__construct(array(), array(), null) in SF_ROOT_DIR/lib/plugins/sfDoctrinePlugin/lib/form/ sfFormDoctrine.class.php line 52 ... at sfFormDoctrine-__construct() in SF_ROOT_DIR/apps/frontend/modules/kunde/actions/actions.class.php line 28 ... at kundeActions-executeNew(object('sfWebRequest')) in SF_ROOT_DIR/lib/action/sfActions.class.php line 60 ... at sfActions-execute(object('sfWebRequest')) in SF_ROOT_DIR/lib/filter/sfExecutionFilter.class.php line 92 ... at sfExecutionFilter-executeAction(object('kundeActions')) in SF_ROOT_DIR/lib/filter/sfExecutionFilter.class.php line 78 ... at sfExecutionFilter-handleAction(object('sfFilterChain'), object('kundeActions')) in SF_ROOT_DIR/lib/filter/sfExecutionFilter.class.php line 42 ... at sfExecutionFilter-execute(object('sfFilterChain')) in SF_ROOT_DIR/lib/filter/sfFilterChain.class.php line 53 ... at sfFilterChain-execute() in SF_ROOT_DIR/lib/filter/sfRenderingFilter.class.php line 33 ... at sfRenderingFilter-execute(object('sfFilterChain')) in SF_ROOT_DIR/lib/filter/sfFilterChain.class.php line 53 ... at sfFilterChain-execute() in SF_ROOT_DIR/lib/controller/sfController.class.php line 233 ... at sfController-forward('kunde', 'new') in SF_ROOT_DIR/lib/controller/sfFrontWebController.class.php line 48 ... at sfFrontWebController-dispatch() in SF_ROOT_DIR/lib/util/sfContext.class.php line 170 ... at sfContext-dispatch() in SF_ROOT_DIR/web/frontend_dev.php5 line 13 ... What am I thinking or doing wrong? I couldn't find a solution anywhere… Lots of thanks in advance, Simon -- 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,
Re: [symfony-users] sfValidatorDoctrineUnique
You might have forgotten to output $form-renderHiddenFields(false); in your template? Please check that the ID of your object is there in your edit screen's HTML. Cheers, Daniel Sent from my iPhone4 On Sep 13, 2010, at 1:58 PM, corneliusparkin cornelius.par...@gmail.com wrote: Hi I have been struggling with this functionality for more than a week now and really hope someone can help me. In the doctrine/schema.yml file, I specify a column code to be unique. i.e. code: type: string(10) fixed: false unsigned: false primary: false default: '' notnull: true autoincrement: false unique: true When generating a doctrine module i.e. symfony doctrine:generate-module admn category_management Category the following code is inserted into the BaseCategoryForm-setup function which according to my understanding is the correct way of implelentingt the solution $this-validatorSchema-setPostValidator( new sfValidatorDoctrineUnique(array('model' = 'Category', 'column' = array('code'))) ); When I create a new category, it adds successful. Then, if I try to create a new category with the same code, it gives an error to state the the category already exists which is correct. However, if I try update the category and keep the code the same, I receive an error An object with the same code already exist. If someone can PLEASE help me resolve this problem, I will be most thankful. Regards CAP -- 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] ahDoctrineEasyEmbeddedRelationsPlugin + Admin Generator
Hey there, you'll need to set the displayEmptyRelations option to true as described in the README. That way, even if there are no embedded relations yet (as in the edit view or the add view), the widget Documents exists in the form. Cheers, Daniel On 07.09.2010, at 18:44, John Kary wrote: I'm using ahDoctrineEasyEmbeddedRelationsPlugin trunk (svn export) with symfony 1.4.6 but having a problem displaying the relation when using generator.yml. Everything works great if I do `edit: display: ~` and `new: display: ~` in generator.yml. But I am using the `display:` option to order my widgets in my form: edit: display: [active, slideshow, featured, category_id, speaker, speaker_title, title, start_time, end_time, location, special_text, description, image_filename, image_alt_text, slideshow_image_filename, slideshow_description, Documents, new_Documents] #Should be the same as edit: above new: display: [active, slideshow, featured, category_id, speaker, speaker_title, title, start_time, end_time, location, special_text, description, image_filename, image_alt_text, slideshow_image_filename, slideshow_description, Documents, new_Documents] class EventForm extends BaseEventForm { public function configure() { //... $this-embedRelations(array( 'Documents' = array( 'considerNewFormEmptyFields'= array('filename', 'description'), 'noNewForm' = false, 'newFormLabel' = 'New Documents', 'newFormClass' = 'DocumentForm', // Form class to add new objects //'newFormClassArgs' = array(array('sf_user' = $this-getOption('sf_user'))), 'displayEmptyRelations' = false, 'formClass' = 'DocumentEmbeddedForm', //Form class to edit existing objects //'formClassArgs' = array(array('ah_add_delete_checkbox' = false, 'another_form_option' = '')), 'newFormAfterExistingRelations' = true, 'formFormatter' = null, 'multipleNewForms' = true, 'newFormsInitialCount' = 1, 'newFormsContainerForm' = null, // pass BaseForm object here or we will create ahNewRelationsContainerForm 'newRelationButtonLabel'= '+ Add Another File', 'newRelationAddByCloning' = true, 'newRelationUseJSFramework' = 'jQuery', 'customEmbeddedFormLabelMethod' = 'getLabelTitle', ), )); //... } } Highlighted version: http://pastebin.com/8UJ3fhSH To get the `Documents` relation to appear using generator.yml, I must add `Documents` to embed the existing relations widget, and `new_Documents` to embed the new relation widget. My problem comes in the edit view when I don't have any existing `Documents` relations, symfony gives the error `Widget Documents does not exist.` Is there a way I can use generator.yml to order my widgets and still use this plugin? Or is there a different/better approach I can use? -- 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] Sf1.4 custom boolean field in generator results in 1 rather than checked-icon
You'll need to override the a file in your module's templates folder, just have a look into the cache again and look for a file with boolean in its name. ;-) Copy over that file and then you can use an image_tag or so to render a check-icon or an x-icon. If you need more help, post back here. :) Cheers, Daniel Sent from my iPhone4 On Sep 6, 2010, at 6:54 AM, Michael Hodges mhodg...@gmail.com wrote: Hello all, I found an older thread on this topic, but no suggestion for a solution. I've introduced a custom boolean field for display only. [yml] list: fields: is_released: { label: Released, type: boolean } My function getIsReleased() returns boolean true or false. What gets displayed in the List is a blank or a '1', but the check-icon would be more consistent. Attempts to use the params: and checkbox_tag did not help. Anyone gone down this road successfully? Thanks, - Michael -- 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] Problem using ahAdminGenerataorThemesPlugin, Customizable titles for sf 1.4
Yeah, that's right, seems to be good. What title is actually displayed, if any? Daniel Sent from my iPad On Sep 4, 2010, at 8:21 AM, Michael Hodges mhodg...@gmail.com wrote: http://pastebin.com/tRhm2jaW I'm new to looking at these, but the title is correctly inserted it seems to me. I'll experiment with the other objects to see if I can figure out what's different about this one. thanks again for your help and for recommending ways to troubleshoot this. - Michael On Thu, Sep 2, 2010 at 9:32 PM, Daniel Lohse annismcken...@googlemail.com wrote: So, I had a look at it ought to work. ;-) Now, could you have a look at the generated code for me? Please look in cache/backend/dev/modules/autoStudent/templates/indexSuccess.php and copy this to pastebin.com? It could be that your module is named something else I hope you'll spot it in there. Cheers, Daniel On 03.09.2010, at 09:07, Michael Hodges wrote: Thanks Daniel for the suggestions. I worked my way down the list. The results are the same regardless of the yml section. If I understand frontend vs backend, since I'm using only the backend, view.yml is not applicable. Pls let me know if this is wrong. By debugging I determined that student rather than the anticipated Student would test correctly. I've included my generator.yml at the end of this email. Many thanks for taking a look. Note that it worked fine before changing the theme. Alternatively, if there is an easy way to disable the Title feature, that would work fine for now. - Michael generator: class: sfDoctrineGenerator param: model_class: Student theme: ahAdmin# or: ahAdminGeneratorThemesPluginAdmin #theme: admin non_verbose_templates: true with_show: false singular: ~ plural:~ route_prefix: student with_doctrine_route: true actions_base_class:sfActions config: actions: ~ fields: doe_no: label: State Id No class_standing: label: Class is_retained: label: Retained help:Indicates that this student has been held back. last_date_enrolled: help:Most recent date that this student has been enrolled. date_format: MM/dd/ last_date_released: help:Most recent date that this student has left or matriculated out. Refunding a student will update this date. date_format: MM/dd/ last_date_returned: help:Most recent date that this student has returned after a leave of absence. date_format: MM/dd/ list: title: Administer Students and Accept Fee Payments display: [doe_no, full_name, class_standing, gender, is_retained] fields: full_name: { is_sortable: true, sort_method: orderByFullName } sort: [full_name] object_actions: _edit: ~ _delete: ~ feepayment: label: Accept Fee Payment action:FeePayment batch_actions: StudentTransactionHistory: label: View Student Transaction History SetRetainedStudents: label: Set Retained Student(s) UnsetRetainedStudents: label: Unset Retained Student(s) # RefundReleasedStudents: #label: Refund Released Student(s) max_per_page: 10 filter: display: [doe_no, last_name, gender, class_standing, gender, is_retained] form: display: [doe_no, last_name, first_name_midinit, class_standing, gender, last_date_enrolled, last_date_released, last_date_returned, is_retained] edit:~ new: fields: doe_no: label: Id No On Thu, Sep 2, 2010 at 8:56 PM, Daniel Lohse annismcken...@googlemail.com wrote: Mhm, as I'm the plugin developer I ought to know why it's not working for you. :) A few things come to mind: 1. Did you clear the cache after installing my plugin? 2. Does it work for any one of the generator.yml's sections (new, edit etc.)? 3. Does it work if you set the title in the view.yml of the corresponding module (Student/config/view.yml under — I'm guessing here — studentSuccess)? I noticed that you used student and Student and I'm not sure if that could be an issue (capitalization)? If none of these work, I'd like you to post your whole generator.yml, maybe I can spot it somewhere in there. I'm using this plugin in several production sites and this feature does work (especially when
Re: [symfony-users] Problem using ahAdminGenerataorThemesPlugin, Customizable titles for sf 1.4
Mhm, as I'm the plugin developer I ought to know why it's not working for you. :) A few things come to mind: 1. Did you clear the cache after installing my plugin? 2. Does it work for any one of the generator.yml's sections (new, edit etc.)? 3. Does it work if you set the title in the view.yml of the corresponding module (Student/config/view.yml under — I'm guessing here — studentSuccess)? I noticed that you used student and Student and I'm not sure if that could be an issue (capitalization)? If none of these work, I'd like you to post your whole generator.yml, maybe I can spot it somewhere in there. I'm using this plugin in several production sites and this feature does work (especially when combined with the tsTitlePlugin plugin). Cheers and thanks for using my plugin! :) Daniel Sent from my iPad On Sep 3, 2010, at 8:31 AM, Michael Hodges mhodg...@gmail.com wrote: Hello all, I installed the plugin ahAdminGenerataorThemesPlugin for the multicolumn sort feature, which works beautifully. As a side-effect, the Customizable Titles feature is a problem for me. Searching the web, it doesn't seem to be a problem for others, so I must be overlooking something very simple. Hopefully someone can point out what I'm overlooking. For these instructions from the Readme: ### Customizable titles ### … add a partial _module_header.php with the following content: [php] h1 class=whatever?php get_slot('module_header') ?/h1 And include that partial in your layout like so: [php] ?php include_partial('module_or_global/module_header') ? I have implemented the following code: [layout.php] if ($sf_params-get('module') == 'student') include_partial('Student/module_header') [_module_header.php] h1?php get_slot('module_header') ?/h1 [generator.yml] title: Administer Students and Accept Fee Payments The title does not render. When I view the browser source I have the following: div id=content h1/h1 For some reason 'list.title' is not resolving correctly. Any recommendations? Thanks - Michael -- 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] Problem using ahAdminGenerataorThemesPlugin, Customizable titles for sf 1.4
Regarding the view.yml, just add it to the directory your generator.yml file is in and add the following: indexSuccess: title: 'Administer Students and Accept Fee Payments' I'm taking a look at the plugin again right now and will get back to you with my findings. :) Daniel On 03.09.2010, at 09:07, Michael Hodges wrote: Thanks Daniel for the suggestions. I worked my way down the list. The results are the same regardless of the yml section. If I understand frontend vs backend, since I'm using only the backend, view.yml is not applicable. Pls let me know if this is wrong. By debugging I determined that student rather than the anticipated Student would test correctly. I've included my generator.yml at the end of this email. Many thanks for taking a look. Note that it worked fine before changing the theme. Alternatively, if there is an easy way to disable the Title feature, that would work fine for now. - Michael generator: class: sfDoctrineGenerator param: model_class: Student theme: ahAdmin# or: ahAdminGeneratorThemesPluginAdmin #theme: admin non_verbose_templates: true with_show: false singular: ~ plural:~ route_prefix: student with_doctrine_route: true actions_base_class:sfActions config: actions: ~ fields: doe_no: label: State Id No class_standing: label: Class is_retained: label: Retained help:Indicates that this student has been held back. last_date_enrolled: help:Most recent date that this student has been enrolled. date_format: MM/dd/ last_date_released: help:Most recent date that this student has left or matriculated out. Refunding a student will update this date. date_format: MM/dd/ last_date_returned: help:Most recent date that this student has returned after a leave of absence. date_format: MM/dd/ list: title: Administer Students and Accept Fee Payments display: [doe_no, full_name, class_standing, gender, is_retained] fields: full_name: { is_sortable: true, sort_method: orderByFullName } sort: [full_name] object_actions: _edit: ~ _delete: ~ feepayment: label: Accept Fee Payment action:FeePayment batch_actions: StudentTransactionHistory: label: View Student Transaction History SetRetainedStudents: label: Set Retained Student(s) UnsetRetainedStudents: label: Unset Retained Student(s) # RefundReleasedStudents: #label: Refund Released Student(s) max_per_page: 10 filter: display: [doe_no, last_name, gender, class_standing, gender, is_retained] form: display: [doe_no, last_name, first_name_midinit, class_standing, gender, last_date_enrolled, last_date_released, last_date_returned, is_retained] edit:~ new: fields: doe_no: label: Id No On Thu, Sep 2, 2010 at 8:56 PM, Daniel Lohse annismcken...@googlemail.com wrote: Mhm, as I'm the plugin developer I ought to know why it's not working for you. :) A few things come to mind: 1. Did you clear the cache after installing my plugin? 2. Does it work for any one of the generator.yml's sections (new, edit etc.)? 3. Does it work if you set the title in the view.yml of the corresponding module (Student/config/view.yml under — I'm guessing here — studentSuccess)? I noticed that you used student and Student and I'm not sure if that could be an issue (capitalization)? If none of these work, I'd like you to post your whole generator.yml, maybe I can spot it somewhere in there. I'm using this plugin in several production sites and this feature does work (especially when combined with the tsTitlePlugin plugin). Cheers and thanks for using my plugin! :) Daniel Sent from my iPad On Sep 3, 2010, at 8:31 AM, Michael Hodges mhodg...@gmail.com wrote: Hello all, I installed the plugin ahAdminGenerataorThemesPlugin for the multicolumn sort feature, which works beautifully. As a side-effect, the Customizable Titles feature is a problem for me. Searching the web, it doesn't seem to be a problem for others, so I must be overlooking something very simple. Hopefully someone can point out what I'm overlooking. For these instructions from the Readme
Re: [symfony-users] Problem using ahAdminGenerataorThemesPlugin, Customizable titles for sf 1.4
So, I had a look at it ought to work. ;-) Now, could you have a look at the generated code for me? Please look in cache/backend/dev/modules/autoStudent/templates/indexSuccess.php and copy this to pastebin.com? It could be that your module is named something else I hope you'll spot it in there. Cheers, Daniel On 03.09.2010, at 09:07, Michael Hodges wrote: Thanks Daniel for the suggestions. I worked my way down the list. The results are the same regardless of the yml section. If I understand frontend vs backend, since I'm using only the backend, view.yml is not applicable. Pls let me know if this is wrong. By debugging I determined that student rather than the anticipated Student would test correctly. I've included my generator.yml at the end of this email. Many thanks for taking a look. Note that it worked fine before changing the theme. Alternatively, if there is an easy way to disable the Title feature, that would work fine for now. - Michael generator: class: sfDoctrineGenerator param: model_class: Student theme: ahAdmin# or: ahAdminGeneratorThemesPluginAdmin #theme: admin non_verbose_templates: true with_show: false singular: ~ plural:~ route_prefix: student with_doctrine_route: true actions_base_class:sfActions config: actions: ~ fields: doe_no: label: State Id No class_standing: label: Class is_retained: label: Retained help:Indicates that this student has been held back. last_date_enrolled: help:Most recent date that this student has been enrolled. date_format: MM/dd/ last_date_released: help:Most recent date that this student has left or matriculated out. Refunding a student will update this date. date_format: MM/dd/ last_date_returned: help:Most recent date that this student has returned after a leave of absence. date_format: MM/dd/ list: title: Administer Students and Accept Fee Payments display: [doe_no, full_name, class_standing, gender, is_retained] fields: full_name: { is_sortable: true, sort_method: orderByFullName } sort: [full_name] object_actions: _edit: ~ _delete: ~ feepayment: label: Accept Fee Payment action:FeePayment batch_actions: StudentTransactionHistory: label: View Student Transaction History SetRetainedStudents: label: Set Retained Student(s) UnsetRetainedStudents: label: Unset Retained Student(s) # RefundReleasedStudents: #label: Refund Released Student(s) max_per_page: 10 filter: display: [doe_no, last_name, gender, class_standing, gender, is_retained] form: display: [doe_no, last_name, first_name_midinit, class_standing, gender, last_date_enrolled, last_date_released, last_date_returned, is_retained] edit:~ new: fields: doe_no: label: Id No On Thu, Sep 2, 2010 at 8:56 PM, Daniel Lohse annismcken...@googlemail.com wrote: Mhm, as I'm the plugin developer I ought to know why it's not working for you. :) A few things come to mind: 1. Did you clear the cache after installing my plugin? 2. Does it work for any one of the generator.yml's sections (new, edit etc.)? 3. Does it work if you set the title in the view.yml of the corresponding module (Student/config/view.yml under — I'm guessing here — studentSuccess)? I noticed that you used student and Student and I'm not sure if that could be an issue (capitalization)? If none of these work, I'd like you to post your whole generator.yml, maybe I can spot it somewhere in there. I'm using this plugin in several production sites and this feature does work (especially when combined with the tsTitlePlugin plugin). Cheers and thanks for using my plugin! :) Daniel Sent from my iPad On Sep 3, 2010, at 8:31 AM, Michael Hodges mhodg...@gmail.com wrote: Hello all, I installed the plugin ahAdminGenerataorThemesPlugin for the multicolumn sort feature, which works beautifully. As a side-effect, the Customizable Titles feature is a problem for me. Searching the web, it doesn't seem to be a problem for others, so I must be overlooking something very simple. Hopefully someone can point out what I'm overlooking
Re: [symfony-users] Session won't last
There's a configuration setting for this in the php.ini. :) I think it's session.gc_maxlifetime or so. Daniel Sent from my iPhone4 On Sep 3, 2010, at 3:28 PM, HAUSa jeroen_heeft_behoefte_aan_r...@hotmail.com wrote: Why won't my session last longer than 30 minutes? This is my factories.yml: test: storage: class: sfSessionTestStorage param: session_path: %SF_TEST_CACHE_DIR%/sessions response: class: sfWebResponse param: send_http_headers: false mailer: param: delivery_strategy: none dev: mailer: param: delivery_strategy: none all: routing: class: sfPatternRouting param: generate_shortest_url:true extra_parameters_as_query_string: true storage: class: sfSessionStorage param: session_name: f9ab618d user: class: myUser param: timeout: 2592000 view_cache_manager: class: sfViewCacheManager param: cache_key_use_vary_headers: true cache_key_use_host_name:true -- 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] File Download too big for memory
Off the top of my head, I'd say that you might want to take a look at the stream classes (or functions) in PHP. Mind you, this is just a thought, as I've never done anything like that. ;-) Cheers, Daniel Sent from my iPhone4 On Sep 2, 2010, at 9:42 AM, Gareth McCumskey gmccums...@gmail.com wrote: Hi all, I need some assistance in creating an action that will generate a CSV file on the server and then push that file for download to the end user. I have written the code to build the csv file and that works no problem. I have found plenty of stuff online about altering the response headers, etc in preparation for the download but they all end up loading the file to download into memory (using readfile()) and I would rather not do that as these CSV could get very very large potentially. Any tips anyone can share? -- 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 -- 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] Redirect on login
I guess you're using sf(Doctrine)GuardPlugin? Look at the README, it's in there. :) Cheers, Daniel On 23.08.2010, at 15:53, cosmy wrote: Hi all. I want that every time i do the login process the session to be resetted, and the login process redirect to the home, and not the page requested. How ca i manage this? -- 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] Storing a list of arbitrary length to the DB
You are going to model this as a many-to-many relation between a (one) Recipe and its (many) Ingredients where each Recipe can have an infinite number of ingredients and one ingredient can belong to an infinite number of recipes. :) You'll find a description of how to do many-to-many relationships in the Jobeet tutorial. Hopefully this makes more sense when you do read it. PS: Yes, you could also model this as a one-to-many relation between Recipe and Ingredient but then the ingredient milk would be duplicated over and over again (because the ingredient would save the ID of the recipe it belongs to and can hence only save one parent (recipe)) and could not have attributes of its own that could be changed independently of the recipes. That would lead so serious duplication. Hope that helps, Daniel On 23.08.2010, at 23:44, json2001 wrote: I'm very new to symfony, in fact I'm still reading the gentle intro and working through Jobeet, and this question is probably very simple (I hope!) as I image this comes up all the time. Users will be creating recipes. I would like to keep another table of ingredients for autocompletion on the Create Recipe form. Clearly, not all recipes have the same number of ingredients and I can't imagine having a recipe table that has ingredient_id_1, ingredient_id_2, ingredient_id_3, etc! So, how can I store an arbitrary number of ingredients to a single field- ingredient_ids. Is there a way to store an array? Or is it typical to just use a coma separated listing and parse it in the model? Thanks.Really just looking for best practice sorts of advice at this point so I can start to wrap my head around the 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. 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] ahDoctrineEasyEmbeddedRelationsPlugin : Unexpected extra form field named Interests error
Hmm, this is a deeply nested embedded relation – am I right, that you're really not editing the profile but the user – which embeds the profile which embeds the interests? You could try to check out the trunk in the Subversion repository because nested embedded relations were added recently by a contributor. Just delete your plugin (how did you install it?) and either do svn export http://svn.symfony-project.com/plugins/ahDoctrineEasyEmbeddedRelationsPlugin/trunk plugins/ahDoctrineEasyEmbeddedRelationsPlugin from the project root or add it as an external definition. I'm the creator of this plugin and have recently gotten some really quality contributions – and I know it works because I'm using it in multiple projects. Maybe post the content of your form's configure() method? Anything that will help to identify the issue. If you have more questions, please ask. :) Cheers, Daniel On 18.08.2010, at 17:57, Rudth-Mael Galite wrote: Hello everyone. I am trying to manage a user's profile which has interests. Here is the database structure : Profile: actAs: { Timestampable: ~ } tableName: user_profile columns: ... relations: Interests: class: Interest local: id foreign: user_profile_id type: many Interest: actAs: { Timestampable: ~ } columns: title: { type: string(255), notnull: true } user_profile_id: { type: integer, notnull: false } I followed this post : http://tech.cibul.org/embedded-forms-with-symfony-1-4-and-jquery/ and also tried to use the ahDoctrineEasyEmbeddedRelationsPlugin but failed every time. When submitting the form, I get this error : 'Unexpected extra form field named Interests'. Can you help me please ? -- 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] Re: Symfony 1.4-compatible minifier for Symfony now included in Apostrophe, can be used in any Symfony project
Mhm, I somehow I knew that this would have been t easy. (: But okay, so we do need to cache these relations array(bundle = sha1sum.ccsgz) somewhere it gets loaded on every request and I'd guess the app.yml.php file is a good place. Still, using this approach does not necessitate – or even need for that matter – manual cache invalidation because we could send the far future Expires header everytime. If files in that bundle change, clear the files (not necessarily with a brute-force symfony cc) and they are rebuilt on the next page refresh. Maybe we could provide a apostrophe:clear-minified-resources [--js] [--css] [--all] [--env=dev|prod|staging] task so as to not need the brute-force symfony cc or go hunting for these minified files manually? Cheers, Daniel On 17.08.2010, at 15:32, Tom Boutell wrote: Daniel, this almost works and I got pretty excited thinking about it... but there's a tragic flaw. On the first page access you slurp up all the CSS files, minify them, md5 that and create a cache file. Fine. On the second page access you... can't point to the cache file without first doing all of that again (everything except actually writing the file) just to figure out what the filename is. (: Opening all of the files, slurping them in and md5'ing them on every page access is overhead we do not want. So it makes more sense to have a cache key. On Aug 16, 9:13 am, Daniel Lohse annismcken...@googlemail.com wrote: Sorry for being a bit slow today: why would we need cache invalidation? If the filename of the compacted file(s) is a hash generated from the contents of the file then after one file changes and the scripts/stylesheets are re-generated the filename changes. The browser then should just request the file because it doesn't about that file yet (filename is not the same). Am I missing something here? Cheers, Daniel Sent from my iPad On Aug 16, 2010, at 2:59 PM, Tom Boutell t...@punkave.com wrote: You're right, we do need cache invalidation. I just came up with a clean way to do it without tweaking app.yml settings, adding a table or making glob() calls: just use a file in the asset-cache folder to hold the current cache key. The OS should cache reads from that file extremely well. It may even be possible to avoid the filesystem hit by writing it as a PHP file in cache/frontend/prod/config that just calls sfConfig::set(). Then with any luck it would be autoloaded and even cached by APC until its modification date changes just like an app.yml setting would. But plain old file_get_contents() calls to a simple file with an asset cache version number in it would also get cached nicely by the operating system so it might be overkill to try to wedge it into Symfony's cache. On Aug 15, 11:44 am, pghoratiu pghora...@gmail.com wrote: It might be worthwhile to take things a step further by versioning them in the URL so that they can be given an infinite cache expiration date, although this requires a database hit or perhaps a glob call when outputting the pages that contain them. The code is a big step forward as-is if you are using unminimized, uncombined CSS and JS and has no negative impact on your existing caching issues, but we'll think about next steps. I think think it's important to add cache invalidation as well. My suggestion is to append another key to app.yml to have a cache key that can be updated manually and append that key too the minified resource file: all: a: ver:1 css/main.css?ver=1 This way css and js pages can be cached indefinitely on the client side without having problems when manually updating the css or js files. 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 -- 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
Re: [symfony-users] link_to_function
Mhm, I meant the link_to function – damnit (sorry), I should have read your post better, because now I see that you do want to use link_to_function. Maybe you could send a parameter through the JavaScript (just a string like 'do_x' or 'do_y') and then decide in the symfony action what to execute/do according to this parameter? Sorry for the confusion. :( Cheers, Daniel On 17.08.2010, at 21:23, Parijat Kalia wrote: Daniel, Thanks for that. I was browsing the link_to_function, what it states is that this tag is useful for triggering javascript functions, essentially what I have looks like this: link_to_function('Click here' , 'javascript:function()'); This renders itself in HTML format as: a onclick= javascript function(); return false; href=#Click here/a So I get the point you are stating, that is by giving a distinct parameter in the subaction (one sec, what exactly do u mean by subaction). But this can't happen in link_to_function as the href is tailored to # in this case, the onclick is stated to return false, once the javascript occurs. If you meant the link_to tag, then in that case it might work, but I believe you were illustrating the link_to_function jscript tag. Do let me know., regards, parijat On Mon, Aug 16, 2010 at 4:42 PM, Daniel Lohse annismcken...@googlemail.com wrote: Give each of them a distinct parameter subaction like in module/action?subaction=bla as the URL and change the bla with your separate events. As these URLs will never be seen by the user you can safely do that – even in symfony-land. ;-) Cheers, Daniel PS: If you're using link_to, careful to use the option array('query_string' = array('subaction' = 'bla')) notation as GET parameters are not permissible in the URL part of the link_to function (this is explained in the API documentation). On 17.08.2010, at 01:30, Parijat Kalia wrote: Hey guys, We know that the link_to_function can be used to trigger javascripts and the page posts back to itself. Correct me if I am wrong here. I have multiple link_to_function tags in my webpage. Is there a way I can detect which one was clicked once the post occurs. This is because, each of these link_to_function tags are meant to trigger separate events, that run only upon postback. Regards, Parijat Kalia -- 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 -- 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] Re: Symfony 1.4-compatible minifier for Symfony now included in Apostrophe, can be used in any Symfony project
Sorry for being a bit slow today: why would we need cache invalidation? If the filename of the compacted file(s) is a hash generated from the contents of the file then after one file changes and the scripts/stylesheets are re-generated the filename changes. The browser then should just request the file because it doesn't about that file yet (filename is not the same). Am I missing something here? Cheers, Daniel Sent from my iPad On Aug 16, 2010, at 2:59 PM, Tom Boutell t...@punkave.com wrote: You're right, we do need cache invalidation. I just came up with a clean way to do it without tweaking app.yml settings, adding a table or making glob() calls: just use a file in the asset-cache folder to hold the current cache key. The OS should cache reads from that file extremely well. It may even be possible to avoid the filesystem hit by writing it as a PHP file in cache/frontend/prod/config that just calls sfConfig::set(). Then with any luck it would be autoloaded and even cached by APC until its modification date changes just like an app.yml setting would. But plain old file_get_contents() calls to a simple file with an asset cache version number in it would also get cached nicely by the operating system so it might be overkill to try to wedge it into Symfony's cache. On Aug 15, 11:44 am, pghoratiu pghora...@gmail.com wrote: It might be worthwhile to take things a step further by versioning them in the URL so that they can be given an infinite cache expiration date, although this requires a database hit or perhaps a glob call when outputting the pages that contain them. The code is a big step forward as-is if you are using unminimized, uncombined CSS and JS and has no negative impact on your existing caching issues, but we'll think about next steps. I think think it's important to add cache invalidation as well. My suggestion is to append another key to app.yml to have a cache key that can be updated manually and append that key too the minified resource file: all: a: ver:1 css/main.css?ver=1 This way css and js pages can be cached indefinitely on the client side without having problems when manually updating the css or js files. 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 -- 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] link_to_function
Give each of them a distinct parameter subaction like in module/action?subaction=bla as the URL and change the bla with your separate events. As these URLs will never be seen by the user you can safely do that – even in symfony-land. ;-) Cheers, Daniel PS: If you're using link_to, careful to use the option array('query_string' = array('subaction' = 'bla')) notation as GET parameters are not permissible in the URL part of the link_to function (this is explained in the API documentation). On 17.08.2010, at 01:30, Parijat Kalia wrote: Hey guys, We know that the link_to_function can be used to trigger javascripts and the page posts back to itself. Correct me if I am wrong here. I have multiple link_to_function tags in my webpage. Is there a way I can detect which one was clicked once the post occurs. This is because, each of these link_to_function tags are meant to trigger separate events, that run only upon postback. Regards, Parijat Kalia -- 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] Re: Install plugins programmatically?
Well, while you're at it, here's a suggestion: When you are finished, do you mind posting your solution somewhere? A snippet would be nice – along with a quick explanation on how to do it. :) That'd be great (but is in no way mandatory, just a suggestion to give something back to the community)! Cheers, Daniel On 13.08.2010, at 17:14, Gustavo Adrian wrote: @Johannes: That's great. I can easily install plugins programmatically after all. Thank you guys! On Fri, Aug 13, 2010 at 12:04 PM, Johannes johannes.schmitt...@googlemail.com wrote: No explicit method as far as I know, but this works: sfConfig::set('sf_enabled_modules', array_unique(array_merge(sfConfig::get('sf_enabled_modules'), array('my_first_module_name_to_enable', 'my_second_module', 'etc'; Kind regards, Johannes On 13 Aug., 14:57, Gustavo Adrian comfortablynum...@gmail.com wrote: Hi James. I was thinking and something like that too. What I don't know is how to enable the modules of the plugin programmatically. Is there available a method for this purpose? Thanks! On Fri, Aug 13, 2010 at 3:37 AM, James Cauwelier james.cauwel...@gmail.comwrote: It is possible to enable a plugin from the projectConfiguration methods, but nobody dictates that the plugin names should be hardcoded there, you could use a configuration XML for instance... The code below does not work, but illustrates the principle. There is also more than one way to do this. You don 't have to use XML and could use a database or any other kind of storage. Doctrine is also packaged as a plugin, so it probably is not possible to use doctrine for this. public function setup() { if (file_exists('enablePlugins.xml')) { $xml = simplexml_load_file('enablePlugins.xml'); $enabledPluginsXml = $xml-xpath(...); $this-enablePlugins($enabledPluginsXml); } } On 12 aug, 22:12, Gustavo Adrian comfortablynum...@gmail.com wrote: Hi, first of all, thank you both guys for your answers. @Damon: I couldn't try that yet but, as you said, the only problem I see is that I have no way (that I know) of enable the plugin on ProjectConfiguration class. And this class is used on the very first part of the framework initialization. I need this because I need a way to install (a kind of) plugins from my backend to extend a CMS I'm developing and, if I could use the plugin functionality that Symfony already has, it would be great. If I can't, then I'd need to create my own plugin system (which, as you would guess, it can take a long time). @Stéphane: Could you point me to a place where Symfony use this to look for examples of code? In which way would you use this class for my need? Thank you both again! On Thu, Aug 12, 2010 at 4:33 AM, Stéphane stephane.er...@gmail.com wrote: There is a class which helps you wrapping methods. Search for sfClassManipulator. Cheers, Before Printing, Think about Your Environmental Responsibility! Avant d'Imprimer, Pensez à Votre Responsabilitée Environnementale! On Thu, Aug 12, 2010 at 8:07 AM, Damon Jones damonljo...@gmail.com wrote: You can certainly run these tasks from within a task, as described here: http://www.symfony-project.org/more-with-symfony/1_4/en/13-Leveraging. .. So, maybe you can create instance of these tasks and run them from elsewhere in your code. I think the issue would be how you enable them in your ProjectConfiguration. On Aug 11, 8:49 pm, Gustavo Adrian comfortablynum...@gmail.com wrote: Hi! Quick question: Is there a way to install and enable a plugin from PHP? 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.comsymfony-users%2bunsubscr...@googlegroups.com symfony-users%2bunsubscr...@googlegroups.comsymfony-users%252bunsubscr...@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
Re: [symfony-users] Country City problem
http://www.symfony-project.org/plugins/sfDependentSelectPlugin But you'll likely have to translate the documentation using Google Translate. ;-) Cheers, Daniel PS: I did not develop this plugin and I haven't used it, so this is just fyi. On 12.08.2010, at 15:00, Andro Fumero wrote: Good day, Does any one tried to make a drop down Countries, and when its clicked, it will display the list of cities based on the selected Country. I don't care if its from Database or Jscript. I just want to get this done because I'm stuck with this problem. have no clue where to start. Any help would be great. Bless you. 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 -- 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: admin gen 1:m in one form
I'm feeling pretty good now — considering that I created this plugin. :) But let me tell you that without the community's help it wouldn't be where it is today. So, sorry for hijacking this thread — but thanks @all for being such a great community! :) Cheers, Daniel Sent from my iPhone4 On Aug 10, 2010, at 2:46 PM, Gustavo Adrian comfortablynum...@gmail.com wrote: I'm glad it's useful for what you've been looking for! And I'll give it a try too. It seems to be a nice plugin. On Tue, Aug 10, 2010 at 1:34 AM, Christian Fazzini christian.fazz...@gmail.com wrote: Sorry I meant, most of the examples online expect the object to be created already. The plugin on the other hand works perfectly. Even in admin gen. They should include something like this in core. Very useful. Thanks for pointing this out Gustavo. On Aug 10, 9:28 am, Christian Fazzini christian.fazz...@gmail.com wrote: The above website expects the object to already exist! Hence the code: $this-form = new UserBookmarksForm($user = Doctrine::getTable('User')-findOneByName('niko')); I just figured this out and spent a whole day, thinking this was a proper solution!! I need to do create the object from scratch! On Aug 9, 12:47 pm, Gustavo Adrian comfortablynum...@gmail.com wrote: I saw a few plugins that seems to do what you're looking for, but I haven't tried any of them yet. This is one of them: http://www.symfony-project.org/plugins/ahDoctrineEasyEmbeddedRelation... Cheers. On Mon, Aug 9, 2010 at 12:30 AM, Christian Fazzini christian.fazz...@gmail.com wrote: I've got two models. User and Phone. A user can have one or many phone numbers. With admin generator I can create the user module. Clicking new user gives lets me add a user onto the database. However, on the same form, I would like to allow the admn to add several phone number fields (hopefully via JS / jQuery). Been looking online for a few solutions, but nothing too helpful as of yet. Can someone point me to the right direction for this? If anyone knows articles worth a mention, please do so. -- 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 -- 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] Re: Capturing Widget value on a form
Nice! Thanks for the heads-up. :) Sent from my iPad On Aug 9, 2010, at 6:17 PM, Ricardo Jose Guzman Milanes guzman.ricardoj...@gmail.com wrote: Hello I solved this. It was not working because both fields were declared as primary. -- 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] Capturing Widget value on a form
Hey there, I actually didn't quite spot the question in your post. Also, the information you provided will not be enough to help you. Please show us your form code. Where are these widgets coming from — did you just add them yourself or are they in the base form for this model object? Cheers, Daniel Sent from my iPad On Aug 8, 2010, at 4:49 PM, Ricardo Jose Guzman Milanes guzman.ricardoj...@gmail.com wrote: Hello In my form I have two fWidgetFormDoctrineChoice , I would like to know how to save the selected values to the db. Because is only trying to save the text fields. $this-widgetSchema['usuario_list'] = new sfWidgetFormDoctrineChoice(array('multiple' = false, 'model' = 'sfGuardUser')); $this-widgetSchema['area_list'] = new sfWidgetFormDoctrineChoice(array('multiple' = false, 'model' = 'areamedica')); Thanks for your help This is my schema: Areamedicapersona: connection: doctrine tableName: areamedicapersona columns: usuarioid: type: integer(4) fixed: false unsigned: false primary: true autoincrement: false areamedicaid: type: integer(4) fixed: false unsigned: false primary: true autoincrement: false bio: type: string(200) notnull: true pic: type: string(10) notnull: true relations: Areamedica: local: areamedicaid foreign: areamedicaid type: one SfGuardUser: local: usuarioid foreign: id type: one Thanks for your help. -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- 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: Capturing Widget value on a form
Those widgets should appear there by default *if* the schema is correct. Symfony adds them itself – again, *if* the schema file is correct. Can you show us the base form class (BaseAreamedicapersonaForm.class.php) in a pastebin? Cheers, Daniel On 08.08.2010, at 20:57, Ricardo Jose Guzman Milanes wrote: Hello Daniel, Sorry for being late. I added the widgets in the form.class. I created a module based on Areamedicapersona model. In the /new action only the text values appear, That's why I added the widgets to the areamedicapersona.form.class The Widgets contain the areamedica and sfguarduser , what I want to do is that when selected the values get inserted into the db. When creating a new areamedicapersona I get the following: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`hcn`.`areamedicapersona`, CONSTRAINT `areamedicapersona_usuarioid_sf_guard_user_id` FOREIGN KEY (`usuarioid`) REFERENCES `sf_guard_user` (`id`)) INSERT INTO areamedicapersona (bio, pic) VALUES ('test1', 'test2') Here's an image: http://i961.photobucket.com/albums/ae94/kman_06/Untitled.jpg -- 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] Re: Error running the first Jobeet page
Post the contents of this file (ProjectConfiguration.class.php) here or on pastebin.com. Did you have a look at line 14 in this file? Cheers, Daniel On 04.08.2010, at 00:31, Marcio Pozzato wrote: Thank you. Now, I need run the new Jobeet aplication through web browser, but I can't because it returns the error message: Parse error: syntax error, unexpected '=' in D:\dev\sfprojects\jobeet\config\ProjectConfiguration.class.php on line 14 Marcio. 2010/7/20 Marcio Pozzato mspozz...@gmail.com Eno, thank you. I'm sorry, but the name (www.jobeet.com.localhost/index.php) is under 'Configure a dedicated domain name' and 'Test the New Configuration' titles, approximately on page 8 from Tutorial found at http://www.symfony-project.org/jobeet/1_4/Doctrine/en/01. 2010/7/19 Eno symb...@gmail.com On Mon, 19 Jul 2010, Mspozzato wrote: Help me, because I'm newer in Symfony and PHP. And, unfortunatelly, I cannot run the first home page after configurations: http://www.jobeet.com.localhost/index.php/ The web browser returns messages like Cannot find server or Cannot be found. Means DNS lookup for www.jobeet.com.localhost failed. NOTE: the Jobeet tutorial talks about jobeet.localhost, not www.jobeet.com.localhost. Whatever hostname you decide needs to be resolvable in DNS. I've started on reading the Tutorial Practical Symfony, Day 1: Starting up the project. All the instructions were checked, but those about Web Server Configuration I think isn't good. You need to add that domain to your hosts file so the name can be translated into an IP. In Windows, the file is \WINDOWS\System32\drivers\etc\hosts It tells you in the docs: http://www.symfony-project.org/jobeet/1_4/Doctrine/en/01#chapter_01_sub_web_server_configuration -- A -- 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 -- Marcio Pozzato -- Marcio Pozzato -- 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] Re: Semgentation fault +Infinite loop... huh ?
Try: $this-_set('is_activated', true); Cheers, Daniel On 04.08.2010, at 02:25, Tristan wrote: If i remove the parent:: it still not work : public function setIsActivated($value) { if ($value == false) { $context = sfContext::getInstance(); $context-getConfiguration()-loadHelpers('Partial'); $email = $this-getSfGuardUser()-getProfile()-getEmail(); $message = $context-getMailer()-compose( 'no-re...@ccc.com', $email, 'your offer has been published ', 'coucou' ); $message-setContentType('text/html'); sfContext::getInstance()-getMailer()-send($message); $this-set('is_activated', 'true'); } else { $this-set('is_activated', 'false'); } } -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- 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: Semgentation fault +Infinite loop... huh ?
I hope you read what I wrote: $this-_set(...)! Don't forget the underscore before the set! ;-) Or did I miss something? Cheers, Daniel Sent from my iPhone On Aug 4, 2010, at 4:03 AM, Tristan tristan.bessou...@gmail.com wrote: (daniel Lohse, we tryed $this-set('is_activated', true); is the synthax wrong ?) Ok, it took 3 men (2 symfony experts, and me (but i'm a beginner) to bypass that) We tested every possible solution with that function before giving up and writing - a batch custom action - plus a function like this : public function set($param,$val,$load=true) { if($param == 'is_activated') { if ($this-is_activated == false $val == true) { $context = sfContext::getInstance(); $context-getConfiguration()- loadHelpers('Partial'); $email = $this-getSfGuardUser()- getProfile()-getEmail(); $message = $context-getMailer()-compose( 'no-re...@jojo.com', $email, 'your offer has been published / votre offre à été publiée', get_partial('newsletter/ activation_offre') ); $message-setContentType('text/html'); sfContext::getInstance()-getMailer()- send($message); } } parent::set($param,$val,$load); } The symfony experts said that the bug is caused by the backend administration (it involves symfony itslef, not me :D) -- 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] Trying to redirect a user to a login page with ajax: 401 unauthorized
Take a look at how they did this in the apostrophePlugin (trac.apostrophenow.org/plugins/apostrophePlugin/branches/1.4) – it involved a 2-stage process. :) Cheers, Daniel PS: Sorry for being so succinct – I'm pretty tired but wanted to point you in the right direction. :) On 01.08.2010, at 03:34, Tristan wrote: Hello in my action.class.php i've got something like : if ($request-isXmlHttpRequest()) { if ($this-getUser()-isAuthenticated()) { .. }else{ $this-redirect('sfGuardAuth/signin'); } } Here's what outputs via FireBug. GET http://xxx/frontend_dev.php/fr/connexion 401 Unauthorized 128ms PS: i use the jQuery .load to load the ajax response. Thank you -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] We are facing some issues with symfony backend.
You could also define a convertXXColumn($value) method inside your form class. Here's how it looks like – given that your column is named created_at (just as an example): public function convertCreatedAtColumn($value) { return ('' === $value null === $this-getObject()-getCreatedAt()) ? false : $value; } That way when the form is submitted with a blank value (and the field is NULL in the database) this value is removed from the UPDATE statement. Note that you cannot reset this field to a NULL when it has already been set to something else because the logic above would not update the field in this case. You can also handle this in your model class – so many options! :) Cheers, Daniel On 24.07.2010, at 10:50, brajesh wrote: Hi Friends, The backend displlays the NULL values stored in db as blank textboxes. When no values are entered in the backend tool, it is stored as a blank value in the database rather than a NULL value. How can I set it as a NULL value? Please help... Thanks Brajesh -- 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] ahDoctrineEasyEmbeddedRelationsPlugin many to many
Sorry for getting back to you so late. Unfortunately many-to-many relations in embedded forms are *not* working and probably won't be for a while (or never). Two reasons for this: 1. The plugin is not ready for this as this means dealing with nested embedded relations which is not implemented right now (I have done some work on this but it's unfinished, wonky, and probably not going to work anyway :() 2. symfony has a critical bug that will (hopefully) be fixed according to Kris Wallsmith (the release manager of 1.3 and 1.4). Here's the ticket: http://trac.symfony-project.org/ticket/5867 and here's his tweet about it: http://twitter.com/kriswallsmith/status/17993956854 So, in light of this it's highly unlikely that you'll fix this on your own (sorry about that, please prove me wrong, I'd like that! :)). If you have more ideas on how to deal with this, I'm open to suggestions. I'm also sorry to the bringer of bad news. :( Cheers, Daniel On 16.07.2010, at 12:10, François SEDE wrote: Thanks you. 2010/7/16 Daniel Lohse annismcken...@googlemail.com Sorry for not answering in a more timely manner — I'm the plugin developer. :) But as it's a bit late I'll answer your question tomorrow; I hope that alright. ;-) Cheers, Daniel Sent from my iPad On Jul 15, 2010, at 12:29 PM, François SEDE francois.s...@gmail.com wrote: Hi, I'm using the ahDoctrineEasyEmbeddedRelationsPlugin with a many to many relation and I have an error : 500 | Internal Server Error | Doctrine_Record_Exception Couldn't call Doctrine_Core::set(), second argument should be an instance of Doctrine_Collection when setting many-to-many references. Yaml : Event: actAs: { Timestampable: ~ } columns: ... relations: ... Participant: class: Profile local: event_id foreign: profile_id refClass: EventProfile Profile: actAs: { Timestampable: ~ } columns: ... relations: ... Event: class: Event local: profile_id foreign: event_id refClass: EventProfile EventProfile: columns: profile_id: type: integer event_id: type: integer relations: Profiles: class: Profile local: profile_id foreign: id onDelete: CASCADE Event: class: Event local: event_id foreign: id onDelete: CASCADE Here is my code : class EventForm extends BaseEventForm { public function configure() { ... $this-embedRelations(array( 'Participant' = array( 'considerNewFormEmptyFields'= array(), 'noNewForm' = false, 'newFormLabel' = 'New Adresse :', 'newFormClassArgs' = array(array('sf_user' = $this-getOption('sf_user'))), 'displayEmptyRelations' = false, 'formClassArgs' = array(array('ah_add_delete_checkbox' = false)), 'newFormAfterExistingRelations' = true, 'formFormatter' = null, 'multipleNewForms' = true, 'newFormsInitialCount' = 2, 'newFormsContainerForm' = null, 'newRelationButtonLabel'= '+', 'newRelationAddByCloning' = true, 'newRelationUseJSFramework' = 'jQuery', ) ) ); Can you help me please? Thanks for your Help -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- 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
Re: [symfony-users] Re: ahDoctrineEasyEmbeddedRelationsPlugin many to many
Thanks, I'll take a look at it! :) Daniel Sent from my iPhone On Jul 21, 2010, at 3:22 PM, Johannes johannes.schmitt...@googlemail.com wrote: When I deal with collections in forms, I always use an instance of a base collection form: http://github.com/schmittjoh/jmsFormsPlugin/blob/master/lib/form/jmsBaseCollectionForm.class.php I have only looked at your plugin superficially, but you might be able to solve some of your problems with nested embedded relations/multiple relations by using some of this code. Kind regards, Johannes On 21 Jul., 13:19, Daniel Lohse annismcken...@googlemail.com wrote: Sorry for getting back to you so late. Unfortunately many-to-many relations in embedded forms are *not* working and probably won't be for a while (or never). Two reasons for this: 1. The plugin is not ready for this as this means dealing with nested embedded relations which is not implemented right now (I have done some work on this but it's unfinished, wonky, and probably not going to work anyway :() 2. symfony has a critical bug that will (hopefully) be fixed according to Kris Wallsmith (the release manager of 1.3 and 1.4). Here's the ticket:http://trac.symfony-project.org/ticket/5867and here's his tweet about it:http://twitter.com/kriswallsmith/status/17993956854 So, in light of this it's highly unlikely that you'll fix this on your own (sorry about that, please prove me wrong, I'd like that! :)). If you have more ideas on how to deal with this, I'm open to suggestions. I'm also sorry to the bringer of bad news. :( Cheers, Daniel On 16.07.2010, at 12:10, François SEDE wrote: Thanks you. 2010/7/16 Daniel Lohse annismcken...@googlemail.com Sorry for not answering in a more timely manner — I'm the plugin developer. :) But as it's a bit late I'll answer your question tomorrow; I hope that alright. ;-) Cheers, Daniel Sent from my iPad On Jul 15, 2010, at 12:29 PM, François SEDE francois.s...@gmail.com wrote: Hi, I'm using the ahDoctrineEasyEmbeddedRelationsPlugin with a many to many relation and I have an error : 500 | Internal Server Error | Doctrine_Record_Exception Couldn't call Doctrine_Core::set(), second argument should be an instance of Doctrine_Collection when setting many-to-many references. Yaml : Event: actAs: { Timestampable: ~ } columns: ... relations: ... Participant: class: Profile local: event_id foreign: profile_id refClass: EventProfile Profile: actAs: { Timestampable: ~ } columns: ... relations: ... Event: class: Event local: profile_id foreign: event_id refClass: EventProfile EventProfile: columns: profile_id: type: integer event_id: type: integer relations: Profiles: class: Profile local: profile_id foreign: id onDelete: CASCADE Event: class: Event local: event_id foreign: id onDelete: CASCADE Here is my code : class EventForm extends BaseEventForm { public function configure() { ... $this-embedRelations(array( 'Participant' = array( 'considerNewFormEmptyFields'= array(), 'noNewForm' = false, 'newFormLabel' = 'New Adresse :', 'newFormClassArgs' = array(array('sf_user' = $this-getOption('sf_user'))), 'displayEmptyRelations' = false, 'formClassArgs' = array(array('ah_add_delete_checkbox' = false)), 'newFormAfterExistingRelations' = true, 'formFormatter' = null, 'multipleNewForms' = true, 'newFormsInitialCount' = 2, 'newFormsContainerForm' = null, 'newRelationButtonLabel'= '+', 'newRelationAddByCloning' = true, 'newRelationUseJSFramework' = 'jQuery', ) ) ); Can you help me please? Thanks for your Help -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- 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
Re: [symfony-users] Re: EmbedForms/MainForm dependent field
Take a look at the More with symfony book — chapter Advanced Forms. :) Daniel Sent from my iPhone On Jul 19, 2010, at 3:06 PM, cloui...@gmail.com cloui...@gmail.com wrote: Ok, do you have some example for the post-validator with embedform ? On 19 juil, 13:49, Johannes johannes.schmitt...@googlemail.com wrote: In your embedded forms, you only have access to the values of the specific, embedded form. If you need the values of the TaskForm (the parent form), then you need to move your validation up to that form. E.g., you can add a post-validator to the TaskForm which validates your logic for each ReminderForm, and then throws errors for the fields in question (either a sfValidatorErrorSchema, or a sfValidatorError). kind regards, Johannes On 19 Jul., 13:19, cloui...@gmail.com cloui...@gmail.com wrote: Hi, I have a main form and some embedforms : one Task and many reminders form. My Task has a duedate, Reminders timeout is calculating from this duedate. I want to : - access to the duedate in the ReminderValidator doClean - to send an error if a reminder is set (on ReminderForm/embedform), and no duedate is set (on TaskForm/main form) How can I do all this ? 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 -- 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] Show in admin
You could take a look at my plugin ahAdminGeneratorThemesPlugin here: http://www.symfony-project.org/plugins/ahAdminGeneratorThemesPlugin The advanced theme includes a show view – but it takes a bit of work to get it installed. On the other hand: you could just look for everything related to the show view and create your own theme that just adds this feature. Cheers, Daniel On 17.07.2010, at 08:47, sieboje wrote: Hi, What is the easiest way to create show action and template on the backend side of application? I have been using jroller theme for backend application and it provide show view. Unfortunately that theme have some weakness and I resign from it. Now I'm using standard admin theme. Do I have create show action and view manually for every module or that process can be automated? Greetings. -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- 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 : Select items on different pages and run a batch action on this items
This can only be done by using JavaScript — but it requires a bit of work. You'd need to write some code that saves the selected items in a JavaScript object and also make the grid that is pageable here do the loading of its content with Ajax. After that, you can have a look at how multiple selected rows are submitted to symfony and mimick this behavior — this doesn't have to be done via Ajax because you'd want to see the flash message and so on. So, you see, this is not trivial. (: Cheers, Daniel PS: Have a look at the sfGridPlugin, maybe you can use that as inspiration or a starting point. But all of this depends on what JavaScript framework you'll be using. Sent from my iPhone On Jul 16, 2010, at 4:54 PM, Winnie chaiseenb...@gmail.com wrote: Hello all, Is it possible to select items on different pages ( page 1 and page 2 for example ) then apply a batch action on them? Don't answer why you don't make the bacth on each actions because the batch action must be done after all items selected. I cant show them on the same page too because there are too many rows. Please help me 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 -- 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] manipulation a form with the eventDispatcher and form.post_configure
What do you mean by I don't have the form as reference? Look at the ahDoctrineEasyEmbeddedRelationsPlugin and search for form.post_configure. Although the callback is inside the form itself, I am using the event subject, so don't let that throw you off. :) Cheers, Daniel Sent from my iPhone On Jul 16, 2010, at 5:43 PM, Robert Schoenthal seros...@googlemail.com wrote: He Folks, is it possible to manipulate a form with events? I want to mark all labels as required, i think this is a very common task. i tried to do it as central as it could be, therefore im willing to use the sfEventDispatcher... here is my approach: class ProjectConfiguration extends sfProjectConfiguration { /** * setup the symfony system */ public function setup() { $this-registerEvents(); } /** * register all events */ protected function registerEvents() { $this-dispatcher-connect('form.post_configure', array('BaseForm', 'markLabelsRequired')); } } ?php class BaseForm extends sfFormSymfony { /** * marks all labels as required */ public static function markLabelsRequired(sfEvent $event) { $frm = $event-getSubject(); /* @var sfForm $frm */ foreach($frm-getFormFieldSchema()-getWidget()-getFields() as $key = $object) { $label = $frm-getFormFieldSchema()-offsetGet($key)- renderLabelName(); if($frm-getValidatorSchema()-offsetGet($key) $frm- getValidatorSchema()-offsetGet($key)-getOption('required') == true) { $frm-getWidgetSchema()-setLabel($key,'span class=required'.$label.'/span'); } } } } But, what a wonder a wont work, cause i dont have the form as reference :( how could it be done in another way? through the sfForm::configure cascade, it doesnt works as expected (depending on where to call it), in a deep inheritance system, its nearly impossible. the event approach is the finest i could think of, but how can a manipulate the form within an event? maybe someone could help? cheerz robert -- 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] Re: Admin generator : Select items on different pages and run a batch action on this items
Yes, that'd also be possible and not (necessarily) involve JavaScript. But both approaches do have one shortcoming: clearing that list should be possible! This is actually pretty vital because when does this list expire or is cleared? You'd need to do something á la Google Mail that displays a flash message when some items are selected and have the possibility to clear that list with a click on a link. If you don't have this and the list doesn't expire the user could come back after a few minutes (perhaps after having done something else in another module), selects one or two items and clicks delete. Then the previously selected items would also be deleted with that – not good. :) I'd think very hard about implementing something like this – pagination was not invented to annoy the user by requiring him to click and wait – it's there to make processing easier for the server and the pages should not be connected in any way, because users often forget what they wanted to do in the first place. ;-) Just my 2c, Daniel On 16.07.2010, at 19:15, Richtermeister wrote: You could also add a new collection action Add To List, and use that to add selected rows to a list on the server. Then you have another action Process List, and that runs on the list.. Daniel On Jul 16, 7:54 am, Winnie chaiseenb...@gmail.com wrote: Hello all, Is it possible to select items on different pages ( page 1 and page 2 for example ) then apply a batch action on them? Don't answer why you don't make the bacth on each actions because the batch action must be done after all items selected. I cant show them on the same page too because there are too many rows. Please help me 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 -- 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: Customize admin generator to parse generator.yml with custom properties
Take a look at how I did this in my admin generator plugin: http://www.symfony-project.org/plugins/ahAdminGeneratorThemesPlugin Just search for is_sortable and sort_method in the source code of the plugin and you'll know how I did that. (: Cheers, Daniel PS: If there's anything else about this, post back here. (: On 15.07.2010, at 12:48, Thor wrote: nobody? :( On 12 Lug, 12:43, Thor thorste...@gmail.com wrote: well,actually i need to heavily customizeadmingenerators to create various functionalities, so i haven't got a single example, i provide some of them that i could use: batch_position: top # (top,bottom,both) toggable_fields: [ gallery, field1,field2 ] # fields who will have a jquery effect to toggle containers floating_components: [ component1,component2, component3 ] # ok ,maybe this is a bit too much, but is only for the sake of the example The goal i'd want to reach is to provide other developers in the company,admingenerators already configured / built with some custom needs I looked in the built-in themes, and for example they look for $this-configuration-getValue('list.batch_actions') or again $this-configuration-getValue('list.display') or again $this-getI18NString ('list.title') i'd like to find a way to make $this-configuration-getValue('list.batch_position') parsable with a custom function... On 12 Lug, 12:25, Daniel Lohse annismcken...@googlemail.com wrote: This sounds much too abtract (custom_option1) — what use-case do you have? Cheers, Daniel Sent from my iPad On Jul 12, 2010, at 12:18 PM, Thor thorste...@gmail.com wrote: Hi all, i cannot understand how to customize theadmingenerator: i am using propel, and i see that from thegenerator.yml the first line is the class used by thegenerator, therefore in my case sfPropelGenerator. I think that extending that class with a custom one is the first step, what i'd like to know, and i didn't find any information about it, is how to parse the yml with options i want, for example by adding some options list: display: [ title, _content, status, created_at ] batch_actions: { } custom_option1: true custom_option2: { attrib1: xyz, attrib2: aaa } etc.. could someone please address me toward the correct direction? what class do i have to look for? -- 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 -- 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] ahDoctrineEasyEmbeddedRelationsPlugin many to many
Sorry for not answering in a more timely manner — I'm the plugin developer. :) But as it's a bit late I'll answer your question tomorrow; I hope that alright. ;-) Cheers, Daniel Sent from my iPad On Jul 15, 2010, at 12:29 PM, François SEDE francois.s...@gmail.com wrote: Hi, I'm using the ahDoctrineEasyEmbeddedRelationsPlugin with a many to many relation and I have an error : 500 | Internal Server Error | Doctrine_Record_Exception Couldn't call Doctrine_Core::set(), second argument should be an instance of Doctrine_Collection when setting many-to-many references. Yaml : Event: actAs: { Timestampable: ~ } columns: ... relations: ... Participant: class: Profile local: event_id foreign: profile_id refClass: EventProfile Profile: actAs: { Timestampable: ~ } columns: ... relations: ... Event: class: Event local: profile_id foreign: event_id refClass: EventProfile EventProfile: columns: profile_id: type: integer event_id: type: integer relations: Profiles: class: Profile local: profile_id foreign: id onDelete: CASCADE Event: class: Event local: event_id foreign: id onDelete: CASCADE Here is my code : class EventForm extends BaseEventForm { public function configure() { ... $this-embedRelations(array( 'Participant' = array( 'considerNewFormEmptyFields'= array(), 'noNewForm' = false, 'newFormLabel' = 'New Adresse :', 'newFormClassArgs' = array(array('sf_user' = $this-getOption('sf_user'))), 'displayEmptyRelations' = false, 'formClassArgs' = array(array('ah_add_delete_checkbox' = false)), 'newFormAfterExistingRelations' = true, 'formFormatter' = null, 'multipleNewForms' = true, 'newFormsInitialCount' = 2, 'newFormsContainerForm' = null, 'newRelationButtonLabel'= '+', 'newRelationAddByCloning' = true, 'newRelationUseJSFramework' = 'jQuery', ) ) ); Can you help me please? Thanks for your Help -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- 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] Method option in sfPropelRoute not accepted
http://www.symfony-project.org/reference/1_4/en/10-Routing#chapter_10_sub_method_for_criteria :) On 14.07.2010, at 13:20, HAUSa wrote: I got a feeling that my method option is ignored: advertisement_show: url: /:sf_culture/advertisement/show/:id/:slug/* class: sfPropelRoute options: { model: Advertisement, type: object, method: adsasdgas } param: { module: advertisement, action: show } requirements: sf_method: [get, post] sf_culture: (?:en|es|de|fr|nl) I gave it on purpose a name that doesn't exist in order to test it. Because I don't get an error screen, it confirms my theory that the method option is ignored. How can I set a method name from my AdvertisementPeer with which my object is picked? -- 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] Re: Method option in sfPropelRoute not accepted
Okay, answered too soon. Disregard my answer then. :) Glad it's working for you! Daniel Sent from my iPhone On Jul 14, 2010, at 3:41 PM, HAUSa jeroen_heeft_behoefte_aan_r...@hotmail.com wrote: Ow now it does... hmmm weird. Thanks, it all works fine now! On 14 jul, 15:38, HAUSa jeroen_heeft_behoefte_aan_r...@hotmail.com wrote: Doesn't work either, gets ignored as well On 14 jul, 13:37, Daniel Lohse annismcken...@googlemail.com wrote: http://www.symfony-project.org/reference/1_4/en/10-Routing#chapter_10 ... :) On 14.07.2010, at 13:20, HAUSa wrote: I got a feeling that my method option is ignored: advertisement_show: url: /:sf_culture/advertisement/show/:id/:slug/* class: sfPropelRoute options: { model: Advertisement, type: object, method: adsasdgas } param: { module: advertisement, action: show } requirements: sf_method: [get, post] sf_culture: (?:en|es|de|fr|nl) I gave it on purpose a name that doesn't exist in order to test it. Because I don't get an error screen, it confirms my theory that the method option is ignored. How can I set a method name from my AdvertisementPeer with which my object is picked? -- 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 -- 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: Method option in sfPropelRoute not accepted
Then it has to be some other problem because this is documented functionality and I have used this before. Hmm... Is the route you posted really executed/used when you type in a URL that should invoke it? Check the log for that or post it here. Daniel Sent from my iPhone On Jul 14, 2010, at 3:38 PM, HAUSa jeroen_heeft_behoefte_aan_r...@hotmail.com wrote: Doesn't work either, gets ignored as well On 14 jul, 13:37, Daniel Lohse annismcken...@googlemail.com wrote: http://www.symfony-project.org/reference/1_4/en/10- Routing#chapter_10... :) On 14.07.2010, at 13:20, HAUSa wrote: I got a feeling that my method option is ignored: advertisement_show: url: /:sf_culture/advertisement/show/:id/:slug/* class: sfPropelRoute options: { model: Advertisement, type: object, method: adsasdgas } param: { module: advertisement, action: show } requirements: sf_method: [get, post] sf_culture: (?:en|es|de|fr|nl) I gave it on purpose a name that doesn't exist in order to test it. Because I don't get an error screen, it confirms my theory that the method option is ignored. How can I set a method name from my AdvertisementPeer with which my object is picked? -- 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 -- 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] The More with symfony book Advanced Forms - Delete image
Look at the block of PHP code just before the subheading Form Events. There you'll find that they set the with_delete option to false – set this to true and add the filename_delete validator with an sfValidatorPass class (you can look that up here: http://www.symfony-project.org/api/1_4/sfWidgetFormInputFileEditable#method_configure). Then the user can check the Delete checkbox and upon saving of the form the file is deleted. :) Cheers, Daniel On 14.07.2010, at 01:51, joericochuyt wrote: regarding this tutorial: http://www.symfony-project.org/more-with-symfony/1_4/en/06-Advanced-Forms How to delete an uploaded image? -- 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] How to use database for Configurations
I urge you to take a look at the csSettingsPlugin as it handles all of this for you (manage settings in admin generator, caching etc.). Cheers, Daniel Sent from my iPad On Jul 6, 2010, at 8:18 AM, Apul Gupta apulmca...@gmail.com wrote: Hi, I was using app.yml for configuration purpose but suddenly, I got a requirement that configuration should be edited from admin. THats why I put all my configurations in database but now the problem is: How can I use just like the configuration files or something like that. Would It suffer with performance issues also? Please suggest. -- 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] Re: Determine sfGuardPermission required for action, from within an action or filter
Have a look at the bundled filters, you'll find your answers there. :) Daniel On 02.07.2010, at 02:24, Donald Tyler wrote: Excellent, thanks for the pointer. Now, it would be perfect if I could do the same from within a filter. Is there a similar method I can use, or is there a way to access the action object from within a filter? On Thu, Jul 1, 2010 at 1:59 AM, Tom Ptacnik to...@tomor.cz wrote: Try this http://www.symfony-project.org/api/1_4/sfAction#method_getcredential On 30 čvn, 14:49, Donald chekot...@gmail.com wrote: I'm trying to determine what sfGuardPermission was required for an action, from within the action. Is this possible? myModule/config/security.yml: show: credentials: view something myModule/actions/actions.class.php: class myModuleActions extends sfActions { public function executeShow(sfRequest $request) { // determine required credential... (view something) } } -- 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 -- 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: Important sfDoctrineApplyPlugin news
You can add this in your project's schema.yml, once it's released. :) Cheers, Daniel On 02.07.2010, at 10:34, lambert_b wrote: Hi Tom, Great news! We had a discussion already half a year ago on this topic. Did not have the time to do it myself as I was full of deadline projects. Had a peak in de code, and have a small request: Can you enhance the schema.yml also with a 'middle_name'? In Holland, and maybe other countries, we have these akward names like 'Jan de Jong', where 'de' should not be in the last name, e.g. it should be sorted on 'Jong'. Maybe you can make an app_setting for it. Or I can commit some code for it. Let me know, Thanks, Lambert On Jul 1, 9:28 pm, Tom Boutell t...@punkave.com wrote: The svn trunk of sfDoctrineApplyPlugin will soon contain bleeding edge code. You should NOT pin the svn:externals of your project to the trunk. Instead, you may pin them to the new 1.1 branch, which contains the stable release you're used to. Change your externals to read like so: sfDoctrineApplyPluginhttp://svn.symfony-project.com/plugins/sfDoctrineApplyPlugin/branches... You could also pin them to the new 1.2 branch, but that would require considerable work on your part (read on). I will leave the trunk in its current boring state for one month to give folks a chance to take notice of this change. I have also placed a warning file in the trunk. Development of the 1.2 branch is quite far along, and in fact there's a fully working version in the 1.2 branch now, with the following major changes, many of which are breaking changes unless you do some migration work on your database: * Relies on extension of the sfGuardUser table rather than a profile class for better database normalization * Forms are now empty extensions of Base versions so you can do the usual Symfony thing to override them at the project level (you can also use my app.yml approach) * Forwards and backwards compatible with sfDoctrineGuardPlugin's current stable release and its new trunk version * First name, last name and email address fields now consistent with sfDoctrineGuardPlugin's new trunk * Uses Symfony's built-in SwiftMailer support, removing the Zend Framework requirement FAQs: But I'm already using it and I don't want to make changes! Don't. Keep using the 1.1 branch. Upgrading is pretty tough, in particular because the old version only has a fullname field and you have to migrate fields from profile to sfGuardUser. But sfDoctrineGuardPlugin's new trunk has its own register feature! Yes, but it has no email confirmation of new accounts, so it does not currently meet the needs of most sites that are currently using the apply plugin. Doesn't sfDoctrineGuardPlugin's trunk have its own Forgot Password feature? Yes, and it does do email confirmation. It's pretty much equivalent to the same feature in the apply plugin. Use it if you like it. What is the future of sfDoctrineApplyPlugin? We'll see! If sfDoctrineGuardPlugin incorporates email confirmation for new accounts, it might not be necessary to maintain a separate plugin anymore. Do I have to use the svn trunk of sfDoctrineGuardPlugin? No. sfDoctrineApplyPlugin's 1.2 branch works with both the 1.3 branch (aka the 1.4.x release versions) *and* the trunk of the guard plugin, thanks to schema merging. When will a stable 1.2 release appear? Shouldn't be long, since we need this in a finalized form for our own projects. -- 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] Re: Use database in app.yml
I'd probably go with a plugin that handles dynamic and configurable settings that live in a database, like csSettingsPlugin. :) Cheers, Daniel On 02.07.2010, at 11:41, Tom Ptacnik wrote: I'm not sure it's possible to do it this way. Why do you want to insert some configuration into the app.yml from database? For what do you need this configuration setting? On 1 čnc, 14:51, HAUSa jeroen_heeft_behoefte_aan_r...@hotmail.com wrote: I want to use some configuration settings from the database in my app.yml configuration file. This is my code now: all: ?php foreach(SettingPeer::getIndex() as $oSetting): ? ?php echo $oSetting-getSlug() . ': ' . $oSetting-getValue() ? ?php endforeach; ? But the error I receive says No connection information in your runtime configuration file for datasource [propel] What should I do to make this happen? 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 -- 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] Embedding a form n times - Unexpected extra form field
You might want to take a look at this: http://www.symfony-project.org/plugins/ahDoctrineEasyEmbeddedRelationsPlugin Cheers, Daniel On 01.07.2010, at 06:04, antonydb wrote: Hello, I'm having trouble validating a form. I have embedded another form within it n times, where n is a number that can vary. The validation seems to pass without error if the object is being updated. However on insert the validator gives me the error: Unexpected extra form field named value1, Unexpected extra form field named value2, Unexpected extra form field named value3 I was hoping someone could shed some light on the best process for embedding one form inside another n times. I have a validator within my embedded form: $this-validatorSchema['value'] = new sfValidatorString( array('required' = true)); And I'm embedding it with a for loop: foreach ($object_list as $n = $object) { $this-embedForm('object'.$n, new ObjectForm($object)); } And I guess on insert it validates properly for the first embedded form as I am not receiving the error Unexpected extra form field named value0. -- 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] Re-populate file input field after validation error
Hey there, although it's obsolete and has been merged into another plugin you could have a look at this: http://www.symfony-project.org/plugins/pkPersistentFileUploadPlugin Cheers, Daniel On 29.06.2010, at 16:23, Philipp Schächtele wrote: I'm currently working on a form where users can post articles for a print magazine (Symfony 1.4, Doctrine). Anonym Users can add multiple images to the article and submit that. The use case is quite similiar to what is described in the Advanced Forms Article in the More with symfony book ( http://www.symfony-project.org/more-with-symfony/1_4/en/06-Advanced-Forms ), therefore I use a lot of the code from the tutorial. The difference is, that users that I only use the new and create functions of the CRUD since people cannot edit their articles after submitting them. My problem is the following: If there are any validation errors in the form, the file input field gets cleaned and the user has to choose the file again. This is a usability problem since there is no validation message or warning to do so (which could be a solution, but not a very good one). The user will correct the other validation errors, but will probably not realize to choose the file again and submit an article without the image. Is there a solution to re-populate the file-input field with the original image location or show and use the already uploaded image like sfWidgetFormInputFileEditable does for entries, which are already saved to the database? -- 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] Re: backend module
Maybe this will help you: http://www.symfony-project.org/tutorial/1_4/en/whats-new#chapter_a2fae23c9403b0e9ec99806fccf6b53e_sub_sfformfilterdoctrine Yes, it only talks about adding a new field and how to write the method involved but you can do that too. Just unset the field you want to have a text field for and take this approach instead, you'll be finished in no time. :) Cheers, Daniel On 26.06.2010, at 14:20, Martin Henits wrote: I clicked on the logs and realised the error is in this line: execute : SELECT COUNT(*) AS num_results FROM myTable m WHERE m.user_id = ? - () displayed error is: SQLSTATE[HY093]: Invalid parameter number: parameter was not defined any suggestion? I want to show an edit box instead of drop-down menu in a backend module's filter. On Jun 26, 1:11 pm, Martin Henits martin.hen...@gmail.com wrote: Thanks, I changed the filter according to your suggestion and as it was desired I can see an edit box instead of a drop-down menu. But whenever I want to search for something (i.e. whenever I click on the filter button), even with an empty form for search, I see this error: SQLSTATE[HY093]: Invalid parameter number: parameter was not defined On Jun 23, 7:30 am, slau susan@gmx.de wrote: Hi, for 1) seehttp://www.symfony-project.org/jobeet/1_4/Doctrine/en/12#chapter_12_t... you can copy out of your cache folder /cache/APP/ENV/modules/MODULENAME/templates/_list_actions.php to your module template folder and then remove the link for 2) then just change the filter in the corresponding class by replacing the widget $this-widgetSchema['user_id'] = new sfWidgetFormFilterInput(array('with_empty' = false)) Hope that helps Susan -- 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] ahDoctrineEasyEmbeddedRelationsPlugin Problem
Oh man, oh man, the plugin developer here. :) Kind of an extreme example, don't you think? *hmm* Nested relations with my plugin are planned but it's an enormous amount of work. I'm not saying anything but your last sentence was not nice, you know? You can of course develop your own, I'm doing this in my free time (being 22 years old and still in school). I hope I didn't waste any of your money, right?! So, don't count on me developing this just for you. Yes, it is on my TODO list but as far as I can see, it will be a bit before this functionality is finished. Cheers, Daniel On 24.06.2010, at 19:01, Ilias Barthelemy wrote: Hello everyone, I am creating a complex form using the ahDoctrineEasyEmbeddedRelationsPlugin to create forms containing many to many relations. The plugin seems to work fine when only using a tier 1 relation (Eg user belongs to usergroup and vica versa). But when I have a tier 2 or 3 relation (Eg A house has 4 floors and each floor has 3 rooms and each room has 5 pictures of furniture) the validation fails when editing the record, not when creating a new record. Some code: Scheme.yml: realestate: actAs: { Timestampable: ~ } columns: id: { type: integer(9), primary: true, autoincrement: true } addressStreet: { type: string(100), notnull: true, minlength: 2 } addressNr: { type: string(10), notnull: true } adressBus: { type: string(10) } relations: realestateFloors: type: many class: realestateFloors local: id foreign: realestate_id onDelete: CASCADE realestateRooms: columns: id: { type: integer(9), primary: true, autoincrement: true } lenght: { type: decimal, notnull: true } width: { type: decimal, notnull: true } height: { type: decimal, notnull: true } remarks: { type: string(2000) } floor_id: { type: integer(9) } type: { type: enum, notnull: true, values: [Living,Badkamer,Keuken,Slaapkamer,Garage,Eetkamer,Bureauruimte,Terras,Tuin] } relations: realestateRoomPictures: type: many class: realestateRoomPictures local: id foreign: realestate_room_id onDelete: CASCADE realestateRoomPictures: columns: id: { type: integer(9), primary: true, autoincrement: true } picture: { type: string(255) } angle: { type: enum, notnull: true, values: [RechtsBoven, LinksBoven, RechtsOnder, LinksOnder, Enkel] } remarks: { type: string(1000) } realestate_room_id: { type: integer(9) } realestateFloors: columns: id: { type: integer(9), primary: true, autoincrement: true } realestate_id: { type: integer(9) } floorNr: { type: integer(9), notnull: true } floorMap: { type: string(255) } relations: realestateRooms: type: many class: realestateRooms local: id foreign: floor_id onDelete: CASCADE RealestateForm.class.php: class realestateForm extends BaserealestateForm { public function configure() { parent::configure(); unset($this['created_at'], $this['updated_at']); //Embed One2Many relations 'realestateFloors' = array( 'considerNewFormEmptyFields'= array('floorNr'), 'noNewForm' = false, 'newFormLabel' = 'New Floor', 'displayEmptyRelations' = false, 'newFormAfterExistingRelations' = true, 'formFormatter' = null, 'multipleNewForms' = true, 'newFormsInitialCount' = 1, 'newFormsContainerForm' = null, // pass BaseForm object here or we will create ahNewRelationsContainerForm 'newRelationButtonLabel'= '+', 'newRelationAddByCloning' = true, 'newRelationUseJSFramework' = 'jQuery') )); } } realestateFloorsForm.class.php: class realestateFloorsForm extends BaserealestateFloorsForm { public function configure() { //hide the id field $this-widgetSchema['realestate_id'] = new sfWidgetFormInputHidden(); //Embed One2Many relations $this-embedRelations(array( 'realestateRooms' = array( 'considerNewFormEmptyFields'= array(), 'noNewForm' = false, 'newFormLabel' = 'New Room', 'displayEmptyRelations' = false, 'newFormAfterExistingRelations' = true, 'formFormatter' = null, 'multipleNewForms' = true, 'newFormsInitialCount' = 1, 'newFormsContainerForm' = null, // pass BaseForm object here or we will create ahNewRelationsContainerForm 'newRelationButtonLabel'= '+', 'newRelationAddByCloning' = true, 'newRelationUseJSFramework' = 'jQuery'))); } } realestateRoomsForm.class.php class realestateRoomsForm extends BaserealestateRoomsForm { public function configure() { $this-widgetSchema['floor_id'] = new
Re: [symfony-users] change label in ahDoctrineEasyEmbeddedRelationsPlugin
I'll have to take a look at that — please ping me again in a little while (this evening or tomorrow morning). Daniel Sent from my iPad On Jun 23, 2010, at 10:29 AM, slau susan@gmx.de wrote: Hi everybody, I am using ahDoctrineEasyEmbeddedRelationsPlugin to embed pictureForms within a let's say galleryForm. Each picture has a field title, which I use also as return value for the __toString() method. in my galleryForm the related photos are listed. But each photo form is labeled again with the object-name. See screen.gif , title=wom appears on the left side as form name again. How can I turn off or at least replace the label with something else? My widget looks right now like that: $this-embedRelations(array( 'Photos' = array( 'considerNewFormEmptyFields'= array('title', 'file'), 'noNewForm' = false, // false - show new form 'newFormLabel' = 'Add new photo', 'newFormClass' = 'JCropPhotoForm', 'newFormClassArgs' = array(array('article_id' = $this-getOption('id'))), 'displayEmptyRelations' = true, 'formClass' = 'JCropPhotoForm', 'formClassArgs' = array(array('ah_add_delete_checkbox' = true )), 'newFormAfterExistingRelations' = true, //moves new photo form after the existing photo lists 'formFormatter' = null, 'multipleNewForms' = true, // needs to be true if newFormsInitialCount 1 'newFormsInitialCount' = 1, // number of new forms, if multipleNewForms is true 'newFormsContainerForm' = '',// pass BaseForm object here or we will create ahNewRelationsContainerForm 'newRelationButtonLabel'= '+ add photo', // seems not to work, but the button shows up only, when multipleNewForms is true 'newRelationAddByCloning' = true, 'newRelationUseJSFramework' = 'jQuery' ) )); Susan -- 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 screen.gif -- 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] ahDoctrineEasyEmbeddedRelationsPlugin bug when sfWidgetFormInputFile used?
Yes, this is — regrettably — a known and documented shortcoming of this plugin. I'll have to spend some time getting this to work. :( Daniel Sent from my iPad On Jun 23, 2010, at 5:21 PM, slau susan@gmx.de wrote: Hi, bug or feature or developer mistake? I try to use ahDoctrineEasyEmbeddedRelationsPlugin for a gallery with multiple pictures. So this is a 1:n relation. The form works fine as long my embed pictureForm has just standard input-fields. as soon I change the file field to sfWidgetFormInputFile the empty form for possible new uploads will be saved as well. did someone else had that problem? susan -- 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] methods wiped out by svn export - using externals
You shouldn't edit files inside folders that are externals definitions. ;-) What you can do is copy the sfGuardUser.php to your lib/ folder and make your modifications there. This should work. The sfGuardUser.php file should be empty. Come to think of it: what are you trying to do with your modifications? You should also take a look at the plugin's README as extending the plugin is described in there. ;-) Cheers, Daniel Sent from my iPad On Jun 17, 2010, at 12:03 PM, Tofuwarrior p...@clearintent.co.uk wrote: Hi Everyone, I installed sfGuardPlugin using svn externals and have since added a few methods to sfGuardUser.php. Every time I export the svn repo to deploy, those additional methods disappear. I'm new to externals and it looks like svn export is grabbing the files from the externals definition rather than my local repository. Is there any way around this? Or is it just a case that if you use externals then that is how it works. I could of course just install it manually and avoid the problem but I like the fact that externals keeps us up to date with bug fix updates. Anyone any ideas. Is my conclusion about externals correct? Cheers, Paul -- 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] methods wiped out by svn export - using externals
Modifications inside folders that are externals definitions are not committed alongside the project it is defined in! This will only work when you have commit rights to the project of the externals definition which is not the case with sfGuardPlugin. :) Cheers, Daniel Sent from my iPad On Jun 17, 2010, at 12:11 PM, Ben Bieker m...@ben-bieker.de wrote: On Thu, 17 Jun 2010 03:03:28 -0700 (PDT), Tofuwarrior p...@clearintent.co.uk wrote: Hi Everyone, I installed sfGuardPlugin using svn externals and have since added a few methods to sfGuardUser.php. Every time I export the svn repo to deploy, those additional methods disappear. Hi, I think the problem is that you do an svn export. Export always checks out all files and writes them to your specified location. If u want to keep your local changes you should do a svn co (checkout). So it won't overwrite your local changes but installes some .svn folders to keep track of your changes. Greetings Ben -- 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] Possible to write a table-less doctrine schema definition?
AFAIK, there is no such possibility – you're going to have to craft them by hand. :) Cheers, Daniel On 15.06.2010, at 14:15, Christian Schaefer wrote: Hi all, I want to write a plugin that amongst other features contains a Form class. For extensibility reasons I would like it to follow the same way that doctrine model forms are organised having a Base..Form, Plugin..Form and ..Form. So the developer can add custom code inheriting the one from the plugin. However this Form does not relate to a table in the database but is used to access a web service. So I need no model. Is there a way to define a virtual schema definition for this so that symfony doctrine:build --all will generate the appropriate classes in the developers project? Cheers /Christian -- 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] accessing action instance in sfComponent
This actually is possible but it's pretty long-winded so here we go: In your component call $this-getController()-getActionStack()-getLastEntry()-renderPartial(); I'm not sure whether you'd have to call getAction() after the getLastEntry() above, so try that out. And I'm also going to say this: use the API documentation to find out what you want to do and how to get there. :) Cheers, Daniel Sent from my iPad On Jun 10, 2010, at 8:18 AM, mlu...@gmail.com mlu...@gmail.com wrote: Hi! I need to access the action instance to use sfAction::getPartial in the executeXX function of sfComponent. Does anybody see a way how to do this? I tried to find a way, but didn't find one. regards, michael -- 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] Re: Math problem in my diploma thesis
Thanks! :) *grins* You're absolutely right, I think that pass-by-reference operator () scared me a bit there. ;-) Daniel On 08.06.2010, at 09:10, Tom Ptacnik wrote: I'll try :) input - arrayA, arrayB while arrayA has values { take value of arrayA one by one while arrayB has values { add combination of value from arrayA and arrayB into the result as array } } return result .. if combinations are only the pairs of numbers (I hope so :) , I don't think it's that hard to understand .. it's only about understanding the PHP array functions. On 6 čvn, 16:05, Daniel Lohse annismcken...@googlemail.com wrote: Hey guys, I'm in the middle of my diploma thesis and I have a little Math problem. I needed an algorithm that takes arrays with numbers in them and calculates all possible combinations out of these – much like a tree diagram, only in code. :) So, I found something on the net (please don't bash me) and I do know that it's a non-recursive function (which is good). But I can't for the life of me figure out how it does what it does. I thought that someone here could help me out with this? I pasted it here:http://pastebin.com/jtpEDnkj The class takes this input: array( array(1, 2), array(3, 4) ) and returns this after having done its thing: array( array(2, 3), array(2, 4), array(1, 3), array(1, 4) ) It works great but I need this in pseudo-code. :( Any help is very much appreciated! Daniel -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] Math problem in my diploma thesis
Hey guys, I'm in the middle of my diploma thesis and I have a little Math problem. I needed an algorithm that takes arrays with numbers in them and calculates all possible combinations out of these – much like a tree diagram, only in code. :) So, I found something on the net (please don't bash me) and I do know that it's a non-recursive function (which is good). But I can't for the life of me figure out how it does what it does. I thought that someone here could help me out with this? I pasted it here: http://pastebin.com/jtpEDnkj The class takes this input: array( array(1, 2), array(3, 4) ) and returns this after having done its thing: array( array(2, 3), array(2, 4), array(1, 3), array(1, 4) ) It works great but I need this in pseudo-code. :( Any help is very much appreciated! Daniel -- 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: Symfony 1.4 project with embedded forms, user data in embedded forms not being saved
Last time I heard, embedded forms are saved when calling a form's save() method. This change was in the 1.3 1.4 release. Daniel Sent from my iPad On Jun 1, 2010, at 2:27 AM, ken marfillas...@gmail.com wrote: I would advise tracing through sfDoctrineForm::save() method. Embedded forms save is not actually fired on containing form save. So if you have many many relation or another embedded form inside an embedded form, they wont be persisted. On May 31, 1:28 pm, Michael Hodges mhodg...@gmail.com wrote: Hello Symfony fans, I'm hoping someone can point to the error in my ways. I am working with embedded forms and the problem is that the master record is saved to the database, but not the user date for the detail records. I have followed the 'more with symphony 1.4 en' example very carefully and have been very successful with all aspects of the project except getting the save to work. It's like a Toyota scenario where I have a great car, except for one fatal flaw. Hoping you can help. The schema involves a master record, Transaction Receipt (master form), and two detail records: PurchaseDetail (Purchases) and PaymentDetail (Payments), the embedded forms. For every receipt there must be at least one purchase and one payment detail. My validation rules for this work well thanks to the examples in the tutorial. The schema is as follows (I left a lot out except the essentials for readability): TransactionReceipt: connection: doctrine tableName: TransactionReceipt actAs: { Timestampable: } columns: receipt_id: { type: integer(4), primary: true, autoincrement: true } paid_amount: { type: 'decimal(5, 2)', notnull: true } paid_date: { type: timestamp(25), notnull: true } Purchases: { class: PurchaseDetail, local: receipt_id, foreign: receipt_id, type: many } Payments: { class: PaymentDetail, local: receipt_id, foreign: receipt_id, type: many } PurchaseDetail: connection: doctrine tableName: PurchaseDetail actAs: { Timestampable: } columns: purchase_id: { type: integer(4), primary: true, autoincrement: true} receipt_id: { type: integer(4) } fee_name: { type: string(45) } fee_description: { type: string(45) } fee_amount: { type: 'decimal(5, 2)' } quantity: { type: integer(4) } relations: TransactionReceipt: { owningSide: Yes, local: receipt_id, type: one, foreign: receipt_id, foreignType: many, foreignAlias: Purchases, onDelete: CASCADE, onUpdate: CASCADE } PaymentDetail: connection: doctrine tableName: PaymentDetail actAs: { Timestampable: } columns: payment_id: { type: integer(4), primary: true, autoincrement: true } receipt_id: { type: integer(4) } payment_type: { type: string(2) } payment_amount: { type: 'decimal(5, 2)' } relations: TransactionReceipt: { owningSide: Yes, local: receipt_id, type: one, foreign: receipt_id, foreignType: many, foreignAlias: Payments, onDelete: CASCADE, onUpdate: CASCADE } The YAML dump of the tainted values are taken in TransactionReceiptForm at the beginning of the saveEmbeddedForms method. The results demonstrate that the subforms are correctly holding the tainted values provided by the user. _csrf_token: 4abd94aee8c8a102c044558e44263726 student_id: '10002' for_academic_year: '2009' paid_date: '2010-05-29 18:20:12' receipt_amount: '20.00' paid_amount: '20.00' newPurchases: - fee_name: 'ACT Pass' fee_amount: '20.00' quantity: '1' - fee_name: '' fee_amount: '' quantity: '' - fee_name: '' fee_amount: '' quantity: '' - fee_name: '' fee_amount: '' quantity: '' paid_by: mom newPayments: - payment_type: CA payment_amount: '20' - payment_type: '' payment_amount: '' In TransactionReceiptForm the default framework doSave method is called, I don't override it. When there are errors in any of the subfields they are handled correctly. However, when there are no errors and the doSave can proceed with saving the data to disk, only the master TransactionReceipt record is written to disk. None of the detail records for Payments or Purchases are written to disk. If I comment out the 'unset' logic in TransactionReceiptForm method saveEmbeddedForm, then the detail records with 'null' values are saved but none of the user input is saved too. Each detail record does include the receipt_id, so that's a good start. My TransactionReceiptForm, method configure is as follows: . . . $collectionForm = new PurchaseDetailCollectionForm(null, array( 'receipt' = $this-getObject(), 'count' = sfConfig::get('app_purchases_per_form'), )); $this-embedForm('newPurchases', $collectionForm); $collectionForm = new PaymentDetailCollectionForm(null, array( 'receipt' = $this-getObject(), 'count' = sfConfig::get('app_payments_per_form'),
[symfony-users] @Kris Wallsmith regarding ticket 8571
Sorry for posting this to the whole group. Hey Kris, I saw that you applied my patch for translating the 'add_empty' option passed to sfWidgetFormDoctrineChoice widget but immediately rolled it back. I reopened it with information on why your thinking may be wrong. Could you please take a look at it again as I the 'add_empty' string is not translated and I'm riddling my forms with calls to sfContext::getInstance()-getI18N()-..., which I'd rather like to avoid. The reason on why I'm posting it to the list is that you want to release 1.[3,4].5 soon and I'd really like that fixed in this version. If it's inappropriate to it this way then I'm very sorry! ;-) Cheers, Daniel -- 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] ahDoctrineEasyEmbeddedRelations plugin is fail to get father's alias and suggest a patch for it
Hmmm this sounds like a problem someone else had. *looks into Mail archive* Yes, definitely. Hmm, it looks a bit hackish (sorry), don't you think? Why did you add it as an option to the embedRelations() method? I'll have to think about it but in the meantime, could you fork my plugin on GitHub, apply the patch and send a fork request? That'd be awesome because then all the others could apply this, too — without me needing to do it right away. I'm in the middle of my diploma thesis at the moment. :) And thanks for catching, debugging and fixing this bug! :) Cheers, Daniel Sent from my iPad On May 28, 2010, at 1:13 PM, SNake! snak...@gmail.com wrote: Hi guys, I think Daniel Lohse did a great job on ahDoctrineEasyEmbeddedRelations plugin: http://www.symfony-project.org/plugins/ahDoctrineEasyEmbeddedRelationsPlugin/1_3_4 But I encounter some problems. When I do the same, I have got exception like: Unknown record property / related component FileFolder on File I think the plugin is fail to get father's alias This is an example, in one to many relationship, let's say: FileFolder: actAs: ... columns: ... File: actAs: ... columns: ... relations: Folder: class: FileFolder foreignAlias: Papers type: one foreignType: many onDelete: CASCADE $file = new File(); $file-Folder; // work! $file-FileFolder; // fail, since we have a custom alias name in schema I traced down this problem in ahBaseFormDoctrine class: private function embeddedFormObjectFactory($relationName, Doctrine_Relation $relation) { if (Doctrine_Relation::MANY === $relation-getType()) { $newFormObjectClass = $relation-getClass(); $newFormObject = new $newFormObjectClass(); $newFormObject[get_class($this-getObject())] = $this- getObject(); // get father's alias by using get_class($this- getObject()), then we get FileFolder but not Folder ! } else { $newFormObject = $this-getObject()-$relationName; } return $newFormObject; } Because I cannot see there is a setting I could pass in embedRations method, soI have created a patch for it: http://gist.github.com/417043 -- 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] Affordable managed hosting for use with symfony
Take a look at what Servergrove has to offer. All their VPS instances are alright and they come pre-configured with symfony. Shared hosting is not an option, obviously (don't even consider it). :) Sent from my iPhone On May 28, 2010, at 10:23 PM, Yair Silbermintz mr.gl...@gmail.com wrote: I'm about to embark on a project for a new client. They are a small business that does not have the resources to manage their own server. Anyone have a recommendation for a managed hosting solution that works well with symfony? Cost will play a big factor, so the cheaper it is the better. -Yair -- 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] Re: how to prevent save in preInsert?
http://www.doctrine-project.org/projects/orm/1.2/docs/manual/event-listeners/en#dql-hooks scroll down a little bit to the line: $event-skipOperation(); This should do what you want? Daniel On 27.05.2010, at 16:41, comb wrote: Hey thanks, but it does not work :-( class FloodCheckListener extends Doctrine_Record_Listener { //... public function preInsert(Doctrine_Event $event) { return false; } } The record is saved anyway. On 27 Mai, 16:26, Robert Schoenthal seros...@googlemail.com wrote: he, try to return false in your preInsert Method, it think it should work On May 27, 12:39 am, comb sa...@gmx.net wrote: Hi, i'm writing a CheckFloodable-Behavior. Before a new record is saved, I would like to prevent the insertion of the new record if the user did not wait long enough. It's very dirty since I use the sfContext::getInstance() quite much, but my question is, how would one prevent the insertion? is it ever possible`to prevent it within a listener or do I have to write a check in every new/create action if the model?? I tried a redirection within the listener, but the record is inserted anyway... -- 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] ahDoctrineEasyEmbeddedRelations Problem
Erm, plugin developer here ;-) – 1. You don't need to call embedRelation(); that's called internally by the plugin's embedRelations() method. 2. Calling embedRelation() AND embedForm() AND embedRelations() on the same field names is just wrong – you only need to call embedRelations() once with your array('websites', 'emails', 'telnumbers'), the rest is done for you by the plugin. Now, as for the error: I have no idea why that is (maybe it's going away when following the advice above) and as it's used by 19 people now (or more) that don't report this error I don't know what to tell you right now. You'd have to do some debugging and come up with a possible culprit that's causing this error for you. ;-) Cheers and thanks for using my plugin :) Daniel On 26.05.2010, at 11:28, Ilias Barthelemy wrote: Hello everyone, I'am new to symfony and strugling with the ahDoctrineEasyEmbeddedRelations plugin. I followed the manual on http://www.symfony-project.org/plugins/ahDoctrineEasyEmbeddedRelationsPlugin without success (getting error 'Call to undefined method contactsForm::embedRelations') Using symfony 1.4.4 Doctrine 2.2 Outline: Installed the ahDoctrineEasyEmbeddedRelations using svn config/ProjectConfiguration.class.php ?php require_once dirname(__FILE__).'/../lib/autoload/sfCoreAutoload.class.php'; sfCoreAutoload::register(); class ProjectConfiguration extends sfProjectConfiguration { public function setup() { $this-enablePlugins('sfDoctrinePlugin','ahDoctrineEasyEmbeddedRelationsPlugin','sfFormExtraPlugin'); } } ? lib/form/doctrine/BaseFormDoctrine.class.php ?php abstract class BaseFormDoctrine extends ahBaseFormDoctrine { public function setup() { } } ? symfony plugin:publish-assets command output: pluginConfiguring plugin - sfDoctrinePlugin pluginConfiguring plugin - ahDoctrineEasyEmbeddedRelationsPlugin pluginConfiguring plugin - sfFormExtraPlugin Turu:/var/www/web001# So it seems thath the plugin is working, right ? Clear cache ... ok This is my schema: contacts: actAs: { Timestampable: ~ } columns: id: { type: integer(9), primary: true, autoincrement: true } title: { type: enum, notnull: true, values: [Mr, Mrs, Ms, Miss] } firstName: { type: string(100), notnull: true, minlength: 2 } lastName: { type: string(100), minlength: 2 } company: { type: string(100), minlength: 2, unique: true } addressStreet: { type: string(100), minlength: 2 } addressNr: { type: string(10) } adressBus: { type: string(10) } town: { type: string(10) } postalCode: { type: string(10) } remarks: { type: string(2000) } profession: { type: string(100) } relations: websites: type: many class: websites local: id foreign: contacts_id onDelete: CASCADE emails: type: many class: emails local: id foreign: contacts_id onDelete: CASCADE telnumbers: type: many class: telnumbers local: id foreign: contacts_id onDelete: CASCADE websites: columns: id: { type: integer(9), primary: true, autoincrement: true } url: { type: string(100), notnull: true, unique: true, regexp: '(http|https)://([\w-]+\.)+(/[\w- ./?%=]*)?' } type: { type: enum, notnull: true, values: [work,private,secure] } contacts_id: { type: integer(9) } emails: columns: id: { type: integer(9), primary: true, autoincrement: true } email: { type: string(100), notnull: true, unique: true, minlength: 10 } type: { type: enum, notnull: true, values: [work,private] } contacts_id: { type: integer(9) } telnumbers: columns: id: { type: integer(9), primary: true, autoincrement: true } number: { type: string(100), notnull: true, unique: true, minlength: 10 } type: { type: enum, notnull: true, values: [work,home,mobile,fax] } contacts_id: { type: integer(9) } This is the generator.yml generator: class: sfDoctrineGenerator param: model_class: contacts theme: admin non_verbose_templates: true with_show: false singular: ~ plural:~ route_prefix: contacts with_doctrine_route: true actions_base_class:sfActions config: actions: ~ fields: title: { label: Title } firstName: { label: First name } lastName: { label: Last name } company: { label: Company } addressStreet: { label: Street } addressNr: { label: Nr } adressBus: { label: Bus } town: { label: Town } postalCode: { label: Postal code } remarks: { label: Remarks } profession: { label: Profession } list: layout: stacked title: Contact Management display:
Re: [symfony-users] Where to put a WSDL file
Yeah, the data directory seems to be the correct location for such a file. :) On 21.05.2010, at 16:11, Tom Haskins-Vaughan wrote: Hey guys, In my everlasting quest for doing things the right way, I'm just wondering where I should put a WSDL file in a plugin. I know it's not really a big deal, but hey... My initial feeling is to put it in myPlugin/data/ Any thoughts? Thanks, Tom -- 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] Is there any way to override symfony core class such as sfModelGenerator ?
These classes are used in the admin generator and the used class is directly defined in the generator.yml file that inside the admin-generated module under config/. Cheers, Daniel On 19.05.2010, at 17:09, Jérôme TEXIER wrote: Hi, I would override sfModelGenerator class in order to change renderField method's behavior. Generator stuff is not supported by factories.yml and it looks like there no helpful events I could tweak there. Any idea on how I can have my own sfModelGenerator class ? Regards. Jérôme -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- 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] Offbeat: Javascript
Hey there, this depends upon the implementation of your form. What's the value you'd want to send with the form after the user has selected something in the first select box and in the second select box? Is is a single value or does each select box have its own value you want to send to your PHP script? I'd do it this way: 1. Display the form normally. 2. Create JavaScript that reacts to a change in the first select box (onChange event). 3. Create an action in symfony that gives your the PHP array of arrays after the form has been loaded and work with that on the clientside. Cheers, Daniel On 14.05.2010, at 10:14, Parijat Kalia wrote: Hey guys, Including an offbeat topic. More to do with Javascript and possibly Ajax. What I am trying to achieve is that i have two dropdown menus. Upon the choice of a user select in menu 1, the dropdown menu 2 is populated as per the choice. The menu for this choice is available in a PHP array of arrays that has been processed already. Any idea how this can be achieved using Javascirpt and PHP alone? Any pointers? Sorry for making this a non symfony question thanks a lot Parijat -- 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] ahDoctrineEasyEmbeddedRelationsPlugin with sfWidgetFormDoctrineJQueryAutocompleter (sfFormExtraPlugin)
@koto: Would you mind chiming in here? I gather that the jQuery Autocompleter is not initialized after cloning? I don't know how jQuery handles embedded scripts. ;-) Daniel On 12.05.2010, at 13:34, Luc Didry wrote: Hello Daniel, thanks for your quick answer. Here's the form I want to clone (well, just an excerpt of course) : tr th1/th td table tbody tr th label for=projet_new_Contacts_0_personne_idPersonnesup title=Ce champ est obligatoire.span class=required*/span/sup/label /th td input type=text id=autocomplete_projet_new_Contacts_0_personne_id value= name=autocomplete_projet[new_Contacts][0][personne_id] class=field ac_input autocomplete=off script type=text/javascript jQuery(document).ready(function() { jQuery(#autocomplete_projet_new_Contacts_0_personne_id) .autocomplete('/frontend_dev.php/personne/ajax', jQuery.extend({}, { dataType: 'json', parse:function(data) { var parsed = []; for (key in data) { parsed[parsed.length] = { data: [ data[key], key ], value: data[key], result: data[key] }; } return parsed; } }, { })) .result(function(event, data) { jQuery(#projet_new_Contacts_0_personne_id).val(data[1]); }); }); /script /td /tr /tbody /table /td /tr And that's the cloned form I got when I push the ahAddRelation button : tr th2/th td table tbody tr th label for=projet_new_Contacts_1_personne_idPersonnesup title=Ce champ est obligatoire.span class=required*/span/sup/label /th td input type=text id=autocomplete_projet_new_Contacts_1_personne_id value= name=autocomplete_projet[new_Contacts][1][personne_id] class=field ac_input autocomplete=off /td /tr /tbody /table /td /tr Unfortunately, nor Firebug nor Webdeveloper reports error. After some tests, it seems that the insertAfter($row) delete the script element while the clone() method clone it with the rest of the code. With these tests I saw that's more a jQuery issue than your plugin's issue, but if you or the person who made the jQuery integration have an idea, I would be very grateful. Thanks for your time and courage for you thesis. Luc Didry 2010/5/12 Daniel Lohse annismcken...@googlemail.com: That's a tough case for sure. I'm the plugin developer although the jQuery integration wasn't provided by me. What exactly is not working? I know that we have problems when trying to embed forms that contain select boxes. What error is thrown? You'd have to give me more information. Thing is, I'm in the middle of my diploma thesis so there is probably not much I can do for you now. Cheers, Daniel Sent from my iPhone On May 12, 2010, at 11:20 AM, Luc Didry lucsky2...@gmail.com wrote: Hello, I'm using the ahDoctrineEasyEmbeddedRelationsPlugin to embed and clone forms but there is a problem with some fields : if there is a scriptblabla/script element, this element is not cloned and the javascript event obviously doesn't work. These problematic fields are using the sfWidgetFormDoctrineJQueryAutocompleter provided by sfFormExtraPlugin to be displayed as text fields with ajax autocompletion instead of combo boxes. I'm using jquery-1.4.2 so the clone() method in ahDoctrineEasyEmbeddedRelationsPlugin.jQuery.js should work but no. For example, I have projects which can have one or many contacts. Here's an excerpt of my /lib/form/doctrine/ProjetForm.class.php : class ProjetForm extends BaseProjetForm { public function configure() { $this-embedRelations(array( 'Contacts' = array( 'considerNewFormEmptyFields'= array('personne_id'), 'noNewForm' = false, 'newFormLabel' = 'Nouveau contact', 'newFormClass' = 'ContactForm', 'newFormClassArgs'= array(array('sf_user' = $this-getOption('sf_user'))), 'displayEmptyRelations' = false, 'formClass' = 'ContactForm', 'formClassArgs' = array(array('ah_add_delete_checkbox' = false)), 'newFormAfterExistingRelations' = true, 'formFormatter'= null, 'multipleNewForms' = true, 'newFormsInitialCount' = 1, 'newFormsContainerForm'= null, // pass BaseForm object here or we will create ahNewRelationsContainerForm 'newRelationButtonLabel' = '+', 'newRelationAddByCloning' = false, // I tried with true and false
Re: [symfony-users] [RFC] sfUnifiedGuard for Symfony 2
Yes, that really is awesome! +1 Sent from my iPhone On May 5, 2010, at 5:34 PM, Javier Garcia tirengar...@gmail.com wrote: On 05/04/2010 01:16 PM, Michał Piotrowski wrote: Sounds interesting? Yes, i think would be interesting merging sfDoctrineGuardPlugin, sfDoctrineGuardExtraPlugin and sfDoctrineApplyPlugin. -- Javi Ubuntu 8.04 -- 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] Re: [backend] blank page after I've installed sfDoctrineGuardPlugin
It's in the plugin itself but when you need to customize the templates for the signin action then you'll need to create a module in your app (frontend), create a templates directory inside it and copy over the signinSuccess.php from the plugin. At this point you can customize it and symfony knows to render your template instead of that in the plugin. Cheers, Daniel On 04.05.2010, at 15:05, SatBoy78 wrote: I've seen apache log, and I've seen that all works well... I've a question about sfGuardAuth module: symfony doesn't generate it when I install the plugin? -- 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] ahDoctrineEasyEmbeddedRelationsPlugin with javascript/ajax
Hey there, the plugin developer here. :) Just to confirm: 1. How did you install the plugin (via the symfony plugin:install task, via Subversion or Git)? 2. Are you already using any JavaScript framework in your symfony project? You'll need to have jQuery for this part to work as the contributor of this particular feature designed it that way, which makes the JavaScript a bit easier to do and to read. ;-) If not, you'll need to get jQuery included into your project, before the plugin's JavaScript files which should render last. Then there's the little problem that the plugin on the symfony site is not the absolutely newest as this particular feature has seen a few bugs that were fixed and I didn't want to publish it immediately. Just use the Subversion trunk or the master branch on GitHub. There's also an updated README in there with the necessary options. One more thing: as it is now it's not AJAX, it's just possible to add and delete multiple new related objects, so the user needs to press Save if he/she wants to really add or delete the records. Okay, if there are more questions, just post them here. :) Cheers, Daniel PS: Thanks for being so kind, may I ask you to press the I use this button on the symfony plugin page? That'd be great! :) On 04.05.2010, at 11:48, Luc Didry wrote: Hello everybody, I'm trying to embed project forms while creating a client with the ahDoctrineEasyEmbeddedRelationsPlugin. It's a one to many relation : a client may have many projects and a project belongs to one client. The embedded form works well, the client and the project are created and a project can be created when I edit a client. (this plugin is awesome and really easy to use, I love it, Thanks to the team). Now, I would like to be able to dynamically add and delete projects forms with javascript (or ajax) calls but I have to admit that I'm really bad with javascript. I didn't find a word about it on the web so I'm asking you. I've seen in the plugin's changelog (http://www.symfony-project.org/plugins/ahDoctrineEasyEmbeddedRelationsPlugin/1_2_4) add to that the ability to add new forms dynamically with JavaScript (think of rendering a partial with the Add form inside via AJAX) and you'll know that this rightfully deserved a minor version number increase! so it must possible. Is anybody have an idea ? Thank you. Luc Didry Here's the schema.yml with pertinent infos : Client: columns: id: { type: integer, length: 4, primary: true, autoincrement: true } raison_sociale: { type: string, length: 255, notnull: true } Project: columns: id: { type: integer, length: 4, primary: true, autoincrement: true } nom: { type: string, length: 16, notnull: true } client_id: { type: integer, length: 4, notnull: true } relations: Client: { onDelete: CASCADE, foreignAlias: Projets, local: client_id, foreign: id, type: one, foreignType: many } Here's the /lib/form/doctrine/ClientForm.class.php configure method : public function configure() { $this-embedRelations(array( 'Projets' = array( 'considerNewFormEmptyFields'= array('nom', 'duree'), 'noNewForm' = false, 'newFormLabel' = 'Nouveau projet', 'newFormClass' = 'ProjetForm', 'newFormClassArgs' = array(array('sf_user' = $this-getOption('sf_user'))), 'displayEmptyRelations' = false, 'formClass' = 'ProjetForm', 'formClassArgs' = array(array('ah_add_delete_checkbox' = true,) ), 'newFormAfterExistingRelations' = true, 'multipleNewForms' = false, ), )); } I didn't edit the apps/frontend/modules/client/templates/_form.php. -- 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] html in toString?
That is symfony's output escaping at work in the view layer. You'll need to read up on that here: http://www.symfony-project.org/book/1_2/07-Inside-the-View-Layer#chapter_07_output_escaping Cheers, Daniel On 02.05.2010, at 10:44, comb wrote: Hey :-) How can I use some html in a __toString methode? I want to link a user-profile in the Users-toString-Methode, but the html is escaped :-/ -- 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] Re: how to put a class on list element using sfform?
Whoops, sorry, my bad. Yes, of course, you'll need to escape the double quotes for it to work. :) On 29.04.2010, at 09:50, mel_06 wrote: i already tried that and it will have an error. i tried putting it this way, hope it's right. li class=\clearfix\\n %error%%label%\n %field%%help%\n %hidden_fields%/li\n; On Apr 29, 1:57 pm, Daniel Lohse annismcken...@googlemail.com wrote: You are kidding, right? Man, there's your li right there, so just put class=clearfix into it do it looks like this: $rowFormat = li class=clearfix\n %error%%label%\n %field% %help%\n %hidden_fields%/li\n; :) Sent from my iPhone On Apr 29, 2010, at 5:25 AM, mel_06 06melc...@gmail.com wrote: how will i add my CSS class to my $rowFormat variable? $rowFormat = li\n %error%%label%\n %field%%help%\n %hidden_fields%/li\n; On Apr 28, 6:20 pm, Daniel Lohse annismcken...@googlemail.com wrote: Now we're getting somewhere. :) You'll need to make your own form formatter. Okay, do the following: copy the lib/vendor/symfony/lib/widget/ sfWidgetFormSchemaFormatterList.class.php file to your own lib/ widget/sfWidgetFormSchemaFormatterListCustom.class.php file. Open it and change the class name to sfWidgetFormSchemaFormatterListCustom and let it extend from the original sfWidgetFormSchemaFormatterList class. Now, all you have to do is add your CSS class to the $rowFormat variable. You could delete the rest of the file because you're inheriting from the original. Clear your cache afterwards and change the form formatter to use in your form to be listCustom. You can, of course, name it however you like, just make sure you also rename the widget file. :) Does this do the trick? Daniel On 28.04.2010, at 12:10, mel_06 wrote: example: $this-widgetSchema-setFormFormatterName('list'); --- will change the form to list with li instead of using tables i need the li's to look like li class=clearfix, instead of just li i hope this one is clear. On Apr 28, 5:55 pm, Daniel Lohse annismcken...@googlemail.com wrote: Well, that doesn't get you much of an answer from me as I don't really understand what you're trying to do. Add a class to all list elements? How can symfony know what is a list element? You have to provide more context, e.g. the form class (or the form's base class), the HTML structure, what is rendered, what you want to change and how. Zip it up or post it tohttp://pastebin.com This is the only way I and the others here can really help you. Daniel On 28.04.2010, at 11:51, mel_06 wrote: doesn't really matter. after the form is rendered, it should put a class to all list element. On Apr 28, 5:37 pm, Daniel Lohse annismcken...@googlemail.com wrote: Every widget has 2 constructor arguments: $options and $arguments. You have to pass array('class' = 'your_css_class') as the $arguments argument, that is, as the second argument. But what kind of widget is your list element? A choice widget? On 28.04.2010, at 10:36, mel_06 wrote: yes a CSS class indeed. how can i do that? On Apr 28, 4:25 pm, Daniel Lohse annismcken...@googlemail.com wrote: A CSS class? You've got to be a bit more specific than that. :) Cheers, Daniel On 28.04.2010, at 10:22, mel_06 wrote: hi guys! i need to insert a class for my list element using sfform? 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 -- 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 athttp://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 -- 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
Re: [symfony-users] Re: TIP: FOR USERS UPDATING DATABASE IN PROPEL
Because just building your schema does not change your database at all. If you changed a column type from string to int then you'll have to manually change that column type in the database. Migrations are a way to do that automatically (kind of). Daniel On 28.04.2010, at 09:58, Parijat Kalia wrote: Can you explain this in detail? Why would modification of existing tables require migrations? Theoretically, I would just use build-schema, to imitate the changes that I make to the existing db tables. Follow it up build-model, to regenerate the model files. If that is a problem, I could delete existing lib (BasTable BaseTablePeer etc. etc) , and simply regenerate again. I am not catching the point here, why would I need migrations? On Tue, Apr 27, 2010 at 11:23 PM, Richtermeister nex...@gmail.com wrote: Alternatively, you can just skip the insert task, and selectively grab tables from the generated sql definitions in /data/sql/.. Paste those into mysql, and you got a new table as well. As for modifying existing tables, that would truly fall under migration, and unfortunately it involves some manual updates.. That could indeed be improved. Daniel On Apr 27, 7:06 pm, Parijat Kalia kaliapari...@gmail.com wrote: For the past 5 days, I have been trying to find a healthy solution to the migrations issue that we propellers tend to face. Apparently, whenever you create a new database table or make changes to an existing database table, you will make the changes/additions to the *schema.yml* and you are going to call upon the *build-all command.* This encapsulates, *build-schema, build-sql, insert-sql, build-model*commands. The *build-sql and insert-sql* commands will essentially reconstruct the database tables from scratch, after having dropped the existing ones. This is a painful thing, and it sucks that there is no provision for this that is in built with symfony, since ppl are always gonna update databases and tables, delete them and remove them as and when the project progresses. You need to get sfPropelMigrationsLightPLugin (which handles basic migrations, and I never figured out how to isntall it correctly), and play along with it. So after almost giving up, here's what I tried today: 1. Create the db table by hand in your phpmyadmin, or whatever db u use...using the GUI interface 2. run build-schema to make the schema.yml file imitate the existing file 3. run build-model to make the necessary model for the file 4. symfony clear cache no need for build-sql and insert-sql and don't run build-all at all. And Voila, you have your database table ready without dropping a single instance from your existing tables. if anyone has done this before, and know's of errors, let me know -- 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 athttp://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 -- 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] how to put a class on list element using sfform?
A CSS class? You've got to be a bit more specific than that. :) Cheers, Daniel On 28.04.2010, at 10:22, mel_06 wrote: hi guys! i need to insert a class for my list element using sfform? 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 -- 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: TIP: FOR USERS UPDATING DATABASE IN PROPEL
Okay, that I understand. My only gripe with this would be that the file it generates is so long as it does not use the consise (or compact) form. Kind of hard to browse a schema that has all models in it and needs 100 lines for each, even when it only contains a few columns. Mhm. Other than that, this seems like a viable solution. But is the reverse-engineering out of the database really precise? What about behaviors like timestampable (new behavior system in Propel 1.5)? You'd have to delete the created_at and updated_at columns in all the models and then manually add the behavior definitions. Add to that the phpNames you'd surely have to update. Am I missing something here? Daniel On 28.04.2010, at 10:53, Parijat Kalia wrote: daniel, you missed out part of the conversation. The Idea is to change the database manually yourself. Then use build-schema to get the schema file up to date. This you do so that when you run build-model, it reads an up to date schema file. On Wed, Apr 28, 2010 at 1:01 AM, Daniel Lohse annismcken...@googlemail.com wrote: Because just building your schema does not change your database at all. If you changed a column type from string to int then you'll have to manually change that column type in the database. Migrations are a way to do that automatically (kind of). Daniel On 28.04.2010, at 09:58, Parijat Kalia wrote: Can you explain this in detail? Why would modification of existing tables require migrations? Theoretically, I would just use build-schema, to imitate the changes that I make to the existing db tables. Follow it up build-model, to regenerate the model files. If that is a problem, I could delete existing lib (BasTable BaseTablePeer etc. etc) , and simply regenerate again. I am not catching the point here, why would I need migrations? On Tue, Apr 27, 2010 at 11:23 PM, Richtermeister nex...@gmail.com wrote: Alternatively, you can just skip the insert task, and selectively grab tables from the generated sql definitions in /data/sql/.. Paste those into mysql, and you got a new table as well. As for modifying existing tables, that would truly fall under migration, and unfortunately it involves some manual updates.. That could indeed be improved. Daniel On Apr 27, 7:06 pm, Parijat Kalia kaliapari...@gmail.com wrote: For the past 5 days, I have been trying to find a healthy solution to the migrations issue that we propellers tend to face. Apparently, whenever you create a new database table or make changes to an existing database table, you will make the changes/additions to the *schema.yml* and you are going to call upon the *build-all command.* This encapsulates, *build-schema, build-sql, insert-sql, build-model*commands. The *build-sql and insert-sql* commands will essentially reconstruct the database tables from scratch, after having dropped the existing ones. This is a painful thing, and it sucks that there is no provision for this that is in built with symfony, since ppl are always gonna update databases and tables, delete them and remove them as and when the project progresses. You need to get sfPropelMigrationsLightPLugin (which handles basic migrations, and I never figured out how to isntall it correctly), and play along with it. So after almost giving up, here's what I tried today: 1. Create the db table by hand in your phpmyadmin, or whatever db u use...using the GUI interface 2. run build-schema to make the schema.yml file imitate the existing file 3. run build-model to make the necessary model for the file 4. symfony clear cache no need for build-sql and insert-sql and don't run build-all at all. And Voila, you have your database table ready without dropping a single instance from your existing tables. if anyone has done this before, and know's of errors, let me know -- 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 athttp://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 -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received
Re: [symfony-users] Re: how to put a class on list element using sfform?
Well, that doesn't get you much of an answer from me as I don't really understand what you're trying to do. Add a class to all list elements? How can symfony know what is a list element? You have to provide more context, e.g. the form class (or the form's base class), the HTML structure, what is rendered, what you want to change and how. Zip it up or post it to http://pastebin.com This is the only way I and the others here can really help you. Daniel On 28.04.2010, at 11:51, mel_06 wrote: doesn't really matter. after the form is rendered, it should put a class to all list element. On Apr 28, 5:37 pm, Daniel Lohse annismcken...@googlemail.com wrote: Every widget has 2 constructor arguments: $options and $arguments. You have to pass array('class' = 'your_css_class') as the $arguments argument, that is, as the second argument. But what kind of widget is your list element? A choice widget? On 28.04.2010, at 10:36, mel_06 wrote: yes a CSS class indeed. how can i do that? On Apr 28, 4:25 pm, Daniel Lohse annismcken...@googlemail.com wrote: A CSS class? You've got to be a bit more specific than that. :) Cheers, Daniel On 28.04.2010, at 10:22, mel_06 wrote: hi guys! i need to insert a class for my list element using sfform? 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 -- 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 athttp://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 -- 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 athttp://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 -- 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: how to put a class on list element using sfform?
Now we're getting somewhere. :) You'll need to make your own form formatter. Okay, do the following: copy the lib/vendor/symfony/lib/widget/sfWidgetFormSchemaFormatterList.class.php file to your own lib/widget/sfWidgetFormSchemaFormatterListCustom.class.php file. Open it and change the class name to sfWidgetFormSchemaFormatterListCustom and let it extend from the original sfWidgetFormSchemaFormatterList class. Now, all you have to do is add your CSS class to the $rowFormat variable. You could delete the rest of the file because you're inheriting from the original. Clear your cache afterwards and change the form formatter to use in your form to be listCustom. You can, of course, name it however you like, just make sure you also rename the widget file. :) Does this do the trick? Daniel On 28.04.2010, at 12:10, mel_06 wrote: example: $this-widgetSchema-setFormFormatterName('list'); --- will change the form to list with li instead of using tables i need the li's to look like li class=clearfix, instead of just li i hope this one is clear. On Apr 28, 5:55 pm, Daniel Lohse annismcken...@googlemail.com wrote: Well, that doesn't get you much of an answer from me as I don't really understand what you're trying to do. Add a class to all list elements? How can symfony know what is a list element? You have to provide more context, e.g. the form class (or the form's base class), the HTML structure, what is rendered, what you want to change and how. Zip it up or post it tohttp://pastebin.com This is the only way I and the others here can really help you. Daniel On 28.04.2010, at 11:51, mel_06 wrote: doesn't really matter. after the form is rendered, it should put a class to all list element. On Apr 28, 5:37 pm, Daniel Lohse annismcken...@googlemail.com wrote: Every widget has 2 constructor arguments: $options and $arguments. You have to pass array('class' = 'your_css_class') as the $arguments argument, that is, as the second argument. But what kind of widget is your list element? A choice widget? On 28.04.2010, at 10:36, mel_06 wrote: yes a CSS class indeed. how can i do that? On Apr 28, 4:25 pm, Daniel Lohse annismcken...@googlemail.com wrote: A CSS class? You've got to be a bit more specific than that. :) Cheers, Daniel On 28.04.2010, at 10:22, mel_06 wrote: hi guys! i need to insert a class for my list element using sfform? 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 -- 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 athttp://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 -- 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 athttp://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 -- 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