Re: [symfony-users] Re: Any chance of creating a new Google group for Symfony2 only?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 +1 for splitting into new lists As SF2 RC1 is about to be released, this is the perfect time to move to a new list. The answers on that list are more likely to be correct to anyone searching the archives (prior to the API being stable, an answer could be correct one week and incorrect the next). this is a very good argument indeed. i am constantly annoyed by finding 3 month old mailing list entries or blog posts that are just not true anymore. starting with a fresh list that can be searched for answers that are not obsolete sounds great. cheers,david -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk4BpDgACgkQqBnXnqWBgIuzMACgyEToRWttFvvcGk4SbtTRPFzl 3lYAoKoJQxVYjBp2GHcfIsJOYthRVS6n =dYny -END PGP SIGNATURE- -- If you want to report a vulnerability issue on symfony, please send it to security at 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] Request for Symfony 2 installation guide
Hi mate, Apc doesnt work with windows on php5.3 Sent from my iPad On Jun 21, 2011, at 5:42 PM, Vaibhav Rajput rajput...@gmail.com wrote: Hi All, currently i m working on symfony 1.4. now plan to learn symfony 2... i already went through some documentation i have downloaded bundles i think symfony 2 is totaly diffrent with symfony 1.4... My question is i m struggling with configuration step... ---http://localhost/Symfony/web/config.php i m using XAMPP 1.7.4 the page is showing me that 1) APC is require 2) some php.ini extension setting 3) intl if you give more detail from wher to download APC and intl and how to install and configure it... 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] AsseticBundle ?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 hi, according to UPDATE.md in the root of symfony: ... beta4 to beta5 - -- ... * The AsseticBundle has been moved to its own repository (it still bundled with Symfony SE). ... so if assetic is not part of the SE, this sounds like a mistake. you should be able to add it to the dependencies as any other bundle, and instantiate it, until the SE is fixed. cheers,david Am 18.06.2011 01:28, schrieb Arturo Sevilla: Hello, Does Beta5 come without the AsseticBundle installed? I downloaded both the tgz and zip version of Symfony SE with vendors and neither in both files the AsseticBundle was present. 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 - -- Liip AG // Agile Web Development // T +41 26 422 25 11 CH-1700 Fribourg // PGP 0xA581808B // www.liip.ch -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk3/ZfwACgkQqBnXnqWBgIv0ugCfcrJ33OHBIX3jov+554/vspd+ KF4AoJSkEYUWbLNS8SdDJSujrNM83VPM =2bbl -END PGP SIGNATURE- -- If you want to report a vulnerability issue on symfony, please send it to security at 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] [Doctrine2] Delete query + JOIN. (How to translate this SQL query into DQL)
Hey mate, Give this a shot, don't have ability to test right now though sorry. delete VendorBundle:Photo p, bp LEFT JOIN p.bedrooms bp LEFT JOIN bp.bedroom b where b.id http://b.id = 13 The following queries are valid though |if user chose to delete related rows as well, then: DELETE p, # The photo bp, # The relation b # The bedroom FROM photo p INNER JOIN bedroom_photo bp||# The relation join| |ON bp.id_photo = p.id||# On the photos id| |INNER JOIN # The bedroom join bedroom b ON b.id = bp.id_bedroom # The bedrooms id WHERE b.id = 1; otherwise: DELETE p, bp FROM photo p INNER JOIN bedroom_photo bp ON bp.id_photo = p.id INNER JOIN bedroom b ON b.id = bp.id_bedroom WHERE b.id = 1; || |Hope this helps!| | Regards,/ David Mann - Coding Ninja/ On 6/16/2011 2:04 PM, oscar balladares wrote: Hi everybody! This might go in the Doctrine's mailing list, but knowing you all S2 people are working with Doctrine 2, I'm feeling lucky that you could help me out. This is the kind of stuff I want to achieve: DQL: delete VendorBundle:Photo p JOIN p.bedrooms bp JOIN bp.bedroom b where b.id http://b.id = 13 What debugger say: Error: Expected end of string, got 'JOIN' A little background: I have 3 entities, two are main entities, and the last one is a bridge between the firsts. 1) Bedroom 2) Photo 3)Bedroom_photo bedroom_photo is some sort of the many to many relationship between 1 and 2. But 1 and 2 are not associated directly like a real many to many because 3 has an extra property. The association may be described like a oneToMany-ManyToOne. A bedroom can have many photos and a photo can be owned by many bedrooms (the client could use a photo to describe many bedrooms). This association allow a photo to be uploaded without being explicitly related to any bedroom. 3rd entity's mapping is: fields: is_public: type: boolean manyToOne: bedroom: targetEntity: Vendor\VendorBundle\Entity\Bedroom inversedBy: photos photo: targetEntity: Vendor\VendorBundle\Entity\Photo inversedBy: bedrooms The associations are bidirectional. So What I want is if a client tries to delete a bedrooms, prompt him also to choose to delete only the photo association info (rows on bedroom_entity) or to delete actually the associated photos (also delete associated rows on photo). I'm stucked trying to find a solution for last problem. I also tried: DQL: DELETE VendorBundle:Photo p WHERE p.id http://p.id IN (SELECT ph.id http://ph.id FROM VendorBundle:Photo ph JOIN ph.bedrooms bp JOIN bp.bedroom b WHERE b.id http://b.id = :id) Debugger says: General error: 1093 You can't specify target table 'foto' for update in FROM clause That is a known mysql issue. I digged a little bit and found you can't update/delete from a table which clause is making reference to it. I also tried: DQL: DELETE VendorBundle:Photo p WHERE p.id http://p.id IN (SELECT bp.photo_id FROM VendorBundle:BedroomPhoto bp JOIN bp.bedroom b WHERE b.id http://b.id = :id) Error: Class Vendor\VendorBundle\Entity\BedroomPhoto has no field or association named photo_id This is because the relation between Photo and BedroomPhoto is through a mapping: photos, and doctrines doesn't see it as a property (the photo_id column). How the heck can I delete a bedroom's photos in one query? Doing foreach(bedroom-getBedroomPhotos() as $bp) { $em-remove($bp-getPhoto()); } $em-flush() ; That fires 2 queries for each photo that a bedroom has, the first one is to remove the photo, and the 2nd to remove the relation on bedroom_photo (I have setted a cascade deletion on bedroom-bedroomPhoto, but running the code above doesn't triggers it). Anyway, I would want to do it in one query. Any help, advice or constructive criticism would be greatfully welcome :D Regards. -- If you want to report a vulnerability issue on symfony, please send it to security at 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 -- Regards, David Mann - /Coding Ninja/ -- If you want to report a vulnerability issue on symfony, please send it to security at 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] [Sonata AdminBundle] documentation
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 hi thomas, some feedback and hints on the AdminBundle. (i post this to the list, as people might stumble over the same details as i did...) i followed http://rabaix.net/AdminBundle/html/index.html first: THANKS! this is an awesome tool! tutorial chapter 4: http://rabaix.net/AdminBundle/html/tutorial/creating_your_first_admin_class/defining_crud_controller.html there is a note that declaring a controller is optional. this is true, but you should explain the service configuration with a bit more detail: argument/ argumentSonata\NewsBundle\Entity\Post/argument argumentSonataNewsBundle:PostAdmin/argument resp. arguments: [null, Sonata\NewsBundle\Entity\Post, SonataNewsBundle:PostAdmin] = the third parameter is the name of the controller. if you did not define one, leave this empty/null tutorial chapter 5: http://rabaix.net/AdminBundle/html/tutorial/creating_your_first_admin_class/defining_admin_class.html at the end of 5.1, i had to delete my cache to let symfony see the new routes generated by the admin. (until i did, i got an exception for missing route admin_acme_demo_entity_list) the error message that occurs if a field name in the admin class does not map to an entity field name could hint that you might mistyped your field name. currently it just tells it has no type for that field, which is confusing for beginners like me An exception has been thrown during the rendering of a template (Please define a type for field `title` in `Acme\DemoBundle\Admin\EntityAdmin`) in SonataAdminBundle:CRUD:base_list.html.twig at line 25. many to many relations: when i add the related entity, the list of available selections is not updated, i have to reload the page to see the new entry. is this a bug? found no issue in the github bugtracker... when editing the relation, i have another issue - which is actually more of a doctrine:generate:entities issue: i used a yml file to create my entities: manyToMany: subscribed: targetEntity: Course doctrine:generate:entities creates a class with getSubscribed and addSubscribed (which is weird, you can not remove a subscription this way. plus the annotation doc on getSubscribed is lying, claiming the return value to be a doctrine collection but returning a plain array) i had to set the field to protected or public to make the adminbundle work. maybe adminbundle should use the addSubscribed method for manyToMany relations? do you know what the idea with the generate entities command is here? is this going to be fixed by either you or doctrine to work out of the box? cheers,david - -- Liip AG // Agile Web Development // T +41 26 422 25 11 CH-1700 Fribourg // PGP 0xA581808B // www.liip.ch -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk3o3GQACgkQqBnXnqWBgIvxCACdHOh0mClKKFzIElRN8dXuUmOt v/wAnRpouRBq+Pj+OmWYxDE5thBuGe1o =f1Rx -END PGP SIGNATURE- -- If you want to report a vulnerability issue on symfony, please send it to security at 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] Integrate Sf2 with jquery
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 this sounds spanish to me :-) but maybe you want to have a look at https://github.com/sonata-project - they provide a jquery bundle, and the adminbundle is using it... maybe you can figure things out from the admin bundle source code... cheers,david Am 03.06.2011 14:49, schrieb smontes: I rode the following messages http://groups.google.com/group/jquery4php/browse_thread/thread/d7291256b04885e , but I do not know if this works for symfony 2 , to beginning the autoload what I have is in php. I do not know how do it work with jquery. - -- Liip AG // Agile Web Development // T +41 26 422 25 11 CH-1700 Fribourg // PGP 0xA581808B // www.liip.ch -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk3o3NMACgkQqBnXnqWBgIsxBQCdFHns76uS5e7NvVVPND6xqGzI qL8Anin+zBdOBRf7qV1JD/0152ZMHmUm =aRm3 -END PGP SIGNATURE- -- If you want to report a vulnerability issue on symfony, please send it to security at 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] [AsseticBundle] Infinity recursion when use predefined asset
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 seems to be a known bug that should be fixed soon: https://github.com/symfony/symfony/issues/1152 and yes, we all hope to see a comprehensive assetic documentation... Am 30.05.2011 14:12, schrieb Vyacheslav Slinko: config.xml: assetic:assets assetic:asset name=jquery assetic:input%kernel.root_dir%/Resources/js/ jquery.min.js/assetic:input /assetic:asset /assetic:assets base.html.twig: {% javascripts '@jquery' %} b{{ asset_url }}/b {% endjavascripts %} Output: Fatal error: Maximum function nesting level of '100' reached, aborting! in /Users/vyacheslav/PhpstormProjects/xxx/vendor/twig/lib/ Twig/TokenStream.php on line 292 Maybe my configuration is wrong? I can't find any usage example for AsseticBundle. - -- Liip AG // Agile Web Development // T +41 26 422 25 11 CH-1700 Fribourg // PGP 0xA581808B // www.liip.ch -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk3l7o8ACgkQqBnXnqWBgIvnPQCguzomf6jc0QPpaHxX6AtMvKq1 srcAn08x0nwX9+mj0M6KRuNUZMwjleMr =DkQb -END PGP SIGNATURE- -- If you want to report a vulnerability issue on symfony, please send it to security at 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: [Symfony2] Best way for using a base locale in URL (no I18N)
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 hi mauricio, the _locale is automatically taken from the session, no need to configure anything there. you can just to path('homepage') if you want the path to the homepage in the current session language. cheers,david Am 31.05.2011 14:48, schrieb Mauricio Morales: Thanks Crhistophe, So I do this: homepage: pattern: /{_locale}/ defaults: { _controller: WebsiteBundle:Home:index } requirements: _locale: en|es But then I have to do this: a href={{ path('homepage', {'_locale': app.request.attributes.get('_locale')}) }}/a What I'd like to have is a way to automate the passing of the _locale variable to all the routes. Is there any way?, am I missing something in the configuration? THanks. On May 31, 1:22 pm, Christophe COEVOET s...@notk.org wrote: Le 31/05/2011 13:14, Mauricio Morales a �crit : Hi there community :) I'm trying to build a URL routing scheme for a web application that will be offered in different languages. It's a Symfony2 app and I've been wondering what the best way to address this situation is. What we need is as simple as this, i.e.: example.com/es/services example.com/en/services example.com/en/terms-of-use example.com/es/terms-of-use Notice that we don't need I18N, we always keep the same URL routes and parameters, and the only part that will change is the prefix (first part of URL). What we are looking for is for a very transparent way to build the URLs and keep the locale in them, a very easy-to-use solution, we don't want to care about the locale in URL generation in templates or controllers. Have you addressed a situation like that?, do you have any ideas, thoughts? Thanks a lot, Use a /_locale/ placeholder in the routes. This will set the locale automatically when matching the route and the locale will be injected when generating an url. -- Christophe | Stof - -- Liip AG // Agile Web Development // T +41 26 422 25 11 CH-1700 Fribourg // PGP 0xA581808B // www.liip.ch -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk3k9GcACgkQqBnXnqWBgIvEEwCdE45NOCw2DY+K0nNr25pFMDcn Tj0Anj1IyKby8X6Xj9qctymU/GUNqcJR =lwal -END PGP SIGNATURE- -- If you want to report a vulnerability issue on symfony, please send it to security at 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] Assetic twig grouping assets and filters
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 hi everybody, any updates on this one? the apply_to: annotations work fine, really like them. i do not get any errors for assetic:dump, neither with the - --watch parameter nor otherwise. i would love to use the assetic.assets notation for a named set of assets that i can then use in my templates. but i get an endless recursion between twig and assetic if i try that. https://gist.github.com/34f65549961eb75a2ed5 i even tried specifying the path as absolute path in my filesystem, did not change anything. by the way, is there a way the assetic:dump command could read the debug on or off from the config.yml? right now i have to pass the --no-debug option or it also dumps individual files. cheers, david Am 15.05.2011 23:36, schrieb Matt Drollette: almost worked... but a couple explosions... assets: some_coffee: inputs: '@DrolletteDemoBundle/Resources/public/js/test.coffee' filters: coffee filters: coffee: apply_to: \.coffee$ yui_js: jar: %kernel.root_dir%/Resources/java/yuicompressor.jar {% javascripts '@some_coffee' '@DrolletteDemoBundle/Resources/public/js/test.js' output='js/all.js' filter='yui_js' %} running assetic:dump gives a long wait then Segmentation fault: $ app/console assetic:dump --env=dev Segmentation fault If i get rid of the new assets option all together and just put that source right in twig like usual then I get this when using --watch .. running without watch runs successfully but doesn't seem to use the apply_to rule, ie. it still tries to run coffee on the .js files. app/console assetic:dump --env=dev --watch PHP Warning: Illegal offset type in isset or empty in /var/www/Symfony/vendor/symfony/vendor/assetic/src/Assetic/AssetManager.php on line 52 PHP Warning: Illegal offset type in isset or empty in /var/www/Symfony/vendor/symfony/vendor/assetic/src/Assetic/Factory/LazyAssetManager.php on line 166 PHP Warning: Illegal offset type in isset or empty in /var/www/Symfony/vendor/symfony/vendor/assetic/src/Assetic/AssetManager.php on line 36 PHP Catchable fatal error: Object of class Assetic\Asset\AssetCollection could not be converted to string in /var/www/Symfony/vendor/symfony/vendor/assetic/src/Assetic/AssetManager.php on line 37 -- If you want to report a vulnerability issue on symfony, please send it to security at 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 - -- Liip AG // Agile Web Development // T +41 26 422 25 11 CH-1700 Fribourg // PGP 0xA581808B // www.liip.ch -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk3jtPUACgkQqBnXnqWBgIs+xACeL2Xv3oyHEgbsxLSCPmPFdHBZ RAMAn0jGAhkPw4ocdtRIVCY8PDWKhCtu =WtKx -END PGP SIGNATURE- -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] Re: [symfony2] which is the correct way to deliver binary content?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 bumping this up as i got no reply... any input? Am 11.05.2011 11:24, schrieb David Buchmann: hi, i have binary content that i have to deliver to the client. what is the right way to do it? i found two solutions, but neither seems really good. //in my controller, i get a binary stream (its stored in the database) $picture = $this-method_that_returns_resource_stream(); // i can just use plain php and dump and die. not nice. header('Content-Type: image/jpeg'); fpassthru($picture); die; /* or i can use a response, but then i have to read the stream into memory, which is unefficient. */ $response = new Response(stream_get_contents($picture)); $response-headers-set('Content-Type', 'image/jpeg'); return $response; cheers, david - -- Liip AG // Agile Web Development // T +41 26 422 25 11 CH-1700 Fribourg // PGP 0xA581808B // www.liip.ch -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk3eSRoACgkQqBnXnqWBgIvXqwCeKUiyx3SWbDHTXGU2sonfpiCK dnIAnjzV2wzXxrGtezoqlqhdc04Kip/E =EnPc -END PGP SIGNATURE- -- If you want to report a vulnerability issue on symfony, please send it to security at 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: Need Help to Install Symfony
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 this sounds like you messed up your apache configuration - or you have some other server running on 8080 already. this has nothing to do with symfony. you should check the setup of your machine. just to try out, you can also try some other port different from 8080 like or whatever (just be sure to replace that everywhere and not just in some places) if you are still stuck, you should ask around, i am sure somebody at your university can help you get apache running :-) cheers,david Am 24.05.2011 10:28, schrieb Chinthaka Rukshan Weerakkody: Hi, I followed that tutorial and configured the httpd.conf file as follows. My installation directories are as follows. symfony projects directory: /var/www/symphonyprojects (project directory is inside the localhost www directory) I created /lib/vendor directory inside the symphonyprojects directory and installed it. Then I added the below lines of codes and configured the /etc/apache2/httpd.conf file. # Be sure to only have this line once in your configuration NameVirtualHost 127.0.0.1:8080 http://127.0.0.1:8080 # This is the configuration for your project Listen 127.0.0.1:8080 http://127.0.0.1:8080 VirtualHost 127.0.0.1:8080 http://127.0.0.1:8080 DocumentRoot /var/www/SymphonyProjects/web DirectoryIndex index.php Directory /var/www/SymphonyProjects/web AllowOverride All Allow from All /Directory Alias /sf /home/sfproject/lib/vendor/symfony/data/web/sf Directory /home/sfproject/lib/vendor/symfony/data/web/sf AllowOverride All Allow from All /Directory /VirtualHost Then I tried to restart apache server and when restarting using terminal it gave me the below error. * Starting web server apache2 (98)Address already in use: make_sock: could not bind to address 127.0.0.1:8080 http://127.0.0.1:8080 no listening sockets available, shutting down Unable to open logs Action 'start' failed. The Apache error log may have more information. what is the error and what can I do to overcome this problem. Can anyone help me please. Thank You. -- Chinthaka Rukshan Department of Computer Science and Engineering, University of Moratuwa, Sri Lanka. -- If you want to report a vulnerability issue on symfony, please send it to security at 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 - -- Liip AG // Agile Web Development // T +41 26 422 25 11 CH-1700 Fribourg // PGP 0xA581808B // www.liip.ch -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk3c1EYACgkQqBnXnqWBgIsS6gCgyUwb4ilIrpMZo787wFEi8SI2 ZeUAn0XtxCg4GJTTjkRTje7d6rsdIwTh =OD4S -END PGP SIGNATURE- -- If you want to report a vulnerability issue on symfony, please send it to security at 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] Consuming RSS feeds in a Symfony2 project?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 hi alex, what did you do, did you try out some bundles or write your own? i would be interested in this too :-) cheers,david Am 18.05.2011 17:55, schrieb Alex Gilbert: Hey folks! With symfony 1.4, I used sfFeed2Plugin quite a bit. With Symfony2, there is SF2-FeedImportBundle, but it doesn't look like it's received much attention. How do people like to handle RSS and Atom with Symfony2? - -- Liip AG // Agile Web Development // T +41 26 422 25 11 CH-1700 Fribourg // PGP 0xA581808B // www.liip.ch -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk3c1LwACgkQqBnXnqWBgIvs2gCfYmKkd25S/ArLXlWxl3tmMiPH 6y4AoLfszFJF3MQ4fyeB1NvWgdXVblWp =w1ik -END PGP SIGNATURE- -- If you want to report a vulnerability issue on symfony, please send it to security at 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] Assetic and php template
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 is this in dev or production mode? if in production, did you generate the assets with app/console assetic:dump ? cheers,david Am 22.05.2011 14:23, schrieb John Blobsmith: I try to use assetic with php template like this : ?php foreach ($view['assetic']-stylesheets(array('public/css/*')) as $url): ? link rel=stylesheet type=text/css media=screen href=? php echo $view-escape($url) ? / ?php endforeach; ? But it doesn't work. I have the error : Route _assetic_0e3af84_0 does not exist. Do you know where is the problem ? - -- Liip AG // Agile Web Development // T +41 26 422 25 11 CH-1700 Fribourg // PGP 0xA581808B // www.liip.ch -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk3advUACgkQqBnXnqWBgIvb+wCfVGB+PZ+bQw7J1fQwxtRJt3mH QD4AnA3PhFi5KI9FCKfirQO3pXGUNyYG =R1I2 -END PGP SIGNATURE- -- If you want to report a vulnerability issue on symfony, please send it to security at 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] Any chance of creating a new Google group for Symfony2 only?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 i am also afraid that the forums could have less replies. unless people are so kind as to subscribe to get emails for the areas they are interested in, and take the pain to go to the forum to type an answer. on the other hand, this list sees more traffic than is good. and a forum could probably better archive the information and make people read before they ask the same question again. (sticky topics, faq for each topic, link to the book). not sure, but i feel atm there are some questions that are asked every few days. its hard to say if with settling of the framework and improving the documentation in the book traffic will go down again. or if releasing the stable 2 will attract even more beginners with lots of questions. cheers,david Am 17.05.2011 08:45, schrieb Gareth McCumskey: I don't think this is a good idea. I often have a few minutes spare in my busy day and can quickly browse my inbox to see if there are any people I can help. Pushing everything to the forums will mean less people that can just quickly pop in a reply to a problem someone is having. I, personally, am all for splitting the mailing list into Symfony 2 and symfony 1 lists. On Tue, May 17, 2011 at 8:42 AM, Fabien Potencier fabien.potenc...@symfony-project.com mailto:fabien.potenc...@symfony-project.com wrote: On 5/16/11 7:15 PM, keymaster wrote: Having all the symfony 1.x releases mixed in with Symfony 2 posts can sometimes make it difficult to discern which Symfony people are talking about in their posts. Not everyone is explicit on whether they are referring to Symfony1 or Symfony2. This is not only a problem for those working on Symfony2, but even those trying to wade through symfony 1.x have to wade through newbies on symfony 2.x. An additional confusion is some Symfony 1.x people seem to be using Doctrine 2. It might be wise to separate the discussions of the two groups as the two products are different enough from each other to warrant it. That's the problem of the mailing-lists vs a forum. As I said already, I don't want to split the community and add more mailing-lists. This is already quite complicated as we have two mailing-lists and a forum. The real question to me is: Do we need to move all the discussions to the forum, where it is much easier to organize conversations by topic? Fabien -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com http://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 mailto:symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com mailto:symfony-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 http://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 mailto:symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com mailto:symfony-users%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca http://identi.ca: @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 - -- Liip AG // Agile Web Development // T +41 26 422 25 11 CH-1700 Fribourg // PGP 0xA581808B // www.liip.ch -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk3SHQkACgkQqBnXnqWBgItoOgCeMas7YsvEZ8ERsBFA5h1qg53b cVsAoIHiADHBfI/5f5rLP+kxrQlB6c// =CZbK -END PGP SIGNATURE- -- If you want to report a vulnerability issue on symfony, please send it to security at symfony
[symfony-users] [symfony2] which is the correct way to deliver binary content?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 hi, i have binary content that i have to deliver to the client. what is the right way to do it? i found two solutions, but neither seems really good. //in my controller, i get a binary stream (its stored in the database) $picture = $this-method_that_returns_resource_stream(); // i can just use plain php and dump and die. not nice. header('Content-Type: image/jpeg'); fpassthru($picture); die; /* or i can use a response, but then i have to read the stream into memory, which is unefficient. */ $response = new Response(stream_get_contents($picture)); $response-headers-set('Content-Type', 'image/jpeg'); return $response; cheers, david - -- Liip AG // Agile Web Development // T +41 26 422 25 11 CH-1700 Fribourg // PGP 0xA581808B // www.liip.ch -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk3KVdoACgkQqBnXnqWBgIsIGQCgjmrKIolRlfp3cvXG53kFDzYe n+8AmwYrR7y7GPsvkK5MoiTpP3xTWJa+ =8FYf -END PGP SIGNATURE- -- If you want to report a vulnerability issue on symfony, please send it to security at 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: SF 2 - Referrer object similar to Request object?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 hi, hm, yes i think this is what i thought. we did it that way but we have extremly few routes in our project. on the view layer, its easy as we just wrote a small snipped for that element that is included in the base layout. maybe somebody else knows how to generate the current route but with a different locale generically? sounds like an important use case for sites that are multilanguage. cheers,david Am 10.05.2011 20:39, schrieb theinterned: On the other point: I am not sure what you mean by your suggestion - I you suggesting that every controller action pass down a 'switched url' of itself to be rendered by the view? That seems like a lot to maintain. I am new to Symfony 2; maybe there is an elegant way to achieve this? On May 10, 11:56 am, theinterned ned...@gmail.com wrote: I solved this. I found the $router-match() method, which I am using against a cleaned up version of the $request-server-get('HTTP_REFERER'). This gives me the route parameters I need to generate my redirect route. Here is the completed action: public function switchLangAction($_locale) { $newLang = ($_locale == en) ? fr : en; $request = $this-get('request'); $router = $this-get('router'); $domain = $request-server-get('HTTP_HOST'); $referrer = $request-server-get('HTTP_REFERER'); // remove the protocol $referrer = preg_replace(';\b((ftp|https?)://)+?\b;', '', $referrer); // remove the domain $referrer = str_replace($domain, '', $referrer ); // remove the controller $referrer = str_replace($request-getBaseUrl(), '', $referrer); // remove the query string $referrer = preg_replace('/\?.*/', '', $referrer); // match the resulting cleaned up route $referrerParams = $router-match( $referrer ); // pluck the _route out of the params $referrerRoute = $referrerParams['_route']; unset($referrerParams['_route']); // switch the locale $referrerParams['_locale'] = $newLang; $response = new RedirectResponse( $this-generateUrl( $referrerRoute, $referrerParams )); return $response; } On May 9, 1:01 pm, Matt matthieu.o.vac...@gmail.com wrote: Hi, This is how I did it: public function changeLocaleAction($locale) { if ($this-request-hasSession()) $this-session-setLocale($locale); $referer = $this-request-server-get('HTTP_REFERER'); if (!isset($referer)) $referer = $this-generateUrl('index'); return new RedirectResponse($referer); } I'm not sure if it is the best to do it way but it works for me in my use cases. Regards, Matt - -- Liip AG // Agile Web Development // T +41 26 422 25 11 CH-1700 Fribourg // PGP 0xA581808B // www.liip.ch -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk3KXKwACgkQqBnXnqWBgIsWSQCfbgjOF00tQmRzCl/QvSicSD5j ZUIAnAiX2oMNvf0A6s6hOtBA/uTisJef =45v0 -END PGP SIGNATURE- -- If you want to report a vulnerability issue on symfony, please send it to security at 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: SF 2 - Referrer object similar to Request object?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 hi i think you should generate the current route with all locales you support and directly use those to switch the language, instead of having the client send a request and then redirecting. as a side note, instead of the string replacement, you could use the php method parse_url to get the elements from an url. cheers, david Am 10.05.2011 17:56, schrieb theinterned: I solved this. I found the $router-match() method, which I am using against a cleaned up version of the $request-server-get('HTTP_REFERER'). This gives me the route parameters I need to generate my redirect route. Here is the completed action: public function switchLangAction($_locale) { $newLang = ($_locale == en) ? fr : en; $request = $this-get('request'); $router = $this-get('router'); $domain = $request-server-get('HTTP_HOST'); $referrer = $request-server-get('HTTP_REFERER'); // remove the protocol $referrer = preg_replace(';\b((ftp|https?)://)+?\b;', '', $referrer); // remove the domain $referrer = str_replace($domain, '', $referrer ); // remove the controller $referrer = str_replace($request-getBaseUrl(), '', $referrer); // remove the query string $referrer = preg_replace('/\?.*/', '', $referrer); // match the resulting cleaned up route $referrerParams = $router-match( $referrer ); // pluck the _route out of the params $referrerRoute = $referrerParams['_route']; unset($referrerParams['_route']); // switch the locale $referrerParams['_locale'] = $newLang; $response = new RedirectResponse( $this-generateUrl( $referrerRoute, $referrerParams )); return $response; } On May 9, 1:01 pm, Matt matthieu.o.vac...@gmail.com wrote: Hi, This is how I did it: public function changeLocaleAction($locale) { if ($this-request-hasSession()) $this-session-setLocale($locale); $referer = $this-request-server-get('HTTP_REFERER'); if (!isset($referer)) $referer = $this-generateUrl('index'); return new RedirectResponse($referer); } I'm not sure if it is the best to do it way but it works for me in my use cases. Regards, Matt - -- Liip AG // Agile Web Development // T +41 26 422 25 11 CH-1700 Fribourg // PGP 0xA581808B // www.liip.ch -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk3JfDgACgkQqBnXnqWBgIuDHwCfVp25iEopMHTigFm5Q8AQmzM0 NdwAn2hCK2FCW+T/xbj118tgjHnzNqPA =E/QL -END PGP SIGNATURE- -- If you want to report a vulnerability issue on symfony, please send it to security at 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 Beta1 - git branch
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 hi robert, the master branch is where development takes place, so it is the latest version. (except for development branches when some area is heavily reworked - the rest comes in mostly with pull requests) the beta1 distribution includes a slightly older version of symfony in vendor/symfony . on github, you can explicitly get to that version with the tag v2.0.0BETA1 https://github.com/symfony/symfony/tree/v2.0.0BETA1 if you want to fix something, send a pull request against master. if you want to develop, you can either directly track master (and have the hotest and latest symfony, but you might need to adapt to upstream changes at random moments) or stick to the BETA1 tag until BETA2 is out (and have a slightly older version, and have a bigger upstream adaption moment when switching the tag). cheers, david Am 02.05.2011 12:13, schrieb Robert Gründler: Hi all, does the master branch on https://github.com/symfony/symfony correspond to the symfony version which works with the Beta1 Standard Distribution (http://symfony.com/download) ? And is the current development taking place in that master branch too ? -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 - -- Liip AG // Agile Web Development // T +41 26 422 25 11 CH-1700 Fribourg // PGP 0xA581808B // www.liip.ch -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk2+tcEACgkQqBnXnqWBgIucfwCgkSq/L/s/6U4HhDGoO8FvR0VI peIAnA//5nF59M3dyO3JgbbxohYDynJF =WtwX -END PGP SIGNATURE- -- If you want to report a vulnerability issue on symfony, please send it to security at 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] Varnish with ESI and Symfony2 Beta1
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 i while ago (back in march) i had tried to use ESI and never managed to have symfony render an esi:include tag. i gave up at some point, not sure if we do something wrong or if symfony has a bug. you do tell varnish to send the esi capability headers along with the request? you have to manually do that, as well as parse esi - the doc about that is in the book... (but i did that back then, with no luck) cheers,david Am 30.04.2011 09:01, schrieb Matt Drollette: I was able to get ESI's to work with the built in Symfony reverse proxy. But then i switched to Varnish and they weren't behaving the same. I can make ESI work correctly if I manually put the esi:include in the template. But if i use: {% render '...:news' with {}, {'standalone': true} %} Then it just renders the component inline and not using an ESI. I do have esi: { enabled: true } in my config.yml. I noticed if i changed the service definition in FrameworkBundle\Resources\config\esi.xml from: service id=esi class=%esi.class% public=false / to: service id=esi class=%esi.class% public=true / then the ESI's work as expected. I don't understand the DIC stuff well enough yet to know if this is a bug or if i'm just doing something wrong. Any ideas? Is anyone using sf2 beta1 with varnish and ESI's ? -- If you want to report a vulnerability issue on symfony, please send it to security at 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 - -- Liip AG // Agile Web Development // T +41 26 422 25 11 CH-1700 Fribourg // PGP 0xA581808B // www.liip.ch -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk2+tmUACgkQqBnXnqWBgItb0QCdFWJVWYTuUA919XhSwMATjPIg 0UgAnRds8g8WnNd/w/YAyljvMQKph647 =9YYe -END PGP SIGNATURE- -- If you want to report a vulnerability issue on symfony, please send it to security at 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: [symfony2] parameters.ini
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 no, config_prod.yml (and _test, _dev) are for different situations of your application. _dev makes the developper toolbar show, and if you use assetic, compiles assets on the fly each time you access them... those config files still live in git and should thus not contain secrets like a production db password. (if you are in a bigger context, you do not want developpers to access a production db with the webserver rights, for example) cheers,david Am 29.04.2011 13:25, schrieb robjensen82: Thanks for the reply David. I would have thought config_prod.yml would have been useful for exactly the situation you're describing. O well I've managed to chop it out. Rob On Apr 29, 11:20 am, David Buchmann david.buchm...@liip.ch wrote: Am 29.04.2011 12:09, schrieb robjensen82: What's the point in the parameters.ini? why not just stick to config.yml? the idea is that config.yml is under version control, while parameters.ini contains confidential data like database password and such. as well as setup specific stuff (database server name and so on, which would vary if you run your prod code on an integration server ...) that said, i don't know why its in .ini format and not a .yml file. in our projects, we use a dynamic.yml for such information. cheers,david - -- Liip AG // Agile Web Development // T +41 26 422 25 11 CH-1700 Fribourg // PGP 0xA581808B // www.liip.ch -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk27vDAACgkQqBnXnqWBgIvQfQCeMNFU7GEQt3dzlVIyNjflFBMv QiQAn22O++JSxGQl+N6vOP1t8osJdgM4 =IMlO -END PGP SIGNATURE- -- If you want to report a vulnerability issue on symfony, please send it to security at 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] parameters.ini
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Am 29.04.2011 12:09, schrieb robjensen82: What's the point in the parameters.ini? why not just stick to config.yml? the idea is that config.yml is under version control, while parameters.ini contains confidential data like database password and such. as well as setup specific stuff (database server name and so on, which would vary if you run your prod code on an integration server ...) that said, i don't know why its in .ini format and not a .yml file. in our projects, we use a dynamic.yml for such information. cheers,david - -- Liip AG // Agile Web Development // T +41 26 422 25 11 CH-1700 Fribourg // PGP 0xA581808B // www.liip.ch -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk26kQEACgkQqBnXnqWBgItqtwCfbC8WFBe2xXk25bWb/dzElq2d N3QAoMulGV9JLKjL7fTTDJuMrpumtOER =A2eP -END PGP SIGNATURE- -- If you want to report a vulnerability issue on symfony, please send it to security at 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] Doctrine data-dump and data-load Fixtures
I have loaded a MySQL table then dumped it for creating a fixture file and one of the fields is defined as a string, but it can have characters and numbers. When it is dumped to yaml, the data that has the characters and numbers are not being put in quotations, while the data with all numbers are. Since the mixed data is not in quotations, I end up with INF or exponential notation for the data being loaded in the fields where the data looks like this 3675E5770. So, it looks like the E is being interpreted as hex, hence the INF and exponential notation. Has anyone found a work around for such a situation or is there a bug in the cli doctrine:dump-data? My definitions are below and any help would be appreciated. Thanks. schema.yml Testtable: tableName: testtable columns: city: { type: string(13), notnull: true, fixed: true } officeuid: { type: string(13), notnull: true, fixed: true } county: { type: string(55), notnull: true, fixed: true } Generated fixture.yml from dump: Testtable: 0: city: City0 officeuid: '367555770' county: County0 1: city: City1 officeuid: 3675C5770 county: County1 2: city: City2 officeuid: 3675C5770 county: County2 3: city: City3 officeuid: 3675E5770 county: County3 4: city: City4 officeuid: 3675E5270 county: County4 The loaded data for 0, 1, and 2 looks good, but 3 and 4 turn into INF. PHP 5.3.5 MySQL 5.1.41 Symfony 1.4.10 Doctrine Version: 1.2.4 -- If you want to report a vulnerability issue on symfony, please send it to security at 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] Doctrine2 Associated Entities as Id Fields issue
Yes the yaml specifies a primary key and the ddl being generated also specifies one. As a matter of fact the real table that I am trying to unload and load has both a primary and foreign key. The test table is just a re-creation of the problem. See ddl below: CREATE TABLE testtable ( id INT NOT NULL AUTO_INCREMENT , city CHAR(25) COLLATE utf8_unicode_ci NOT NULL , officeuid CHAR(13) COLLATE utf8_unicode_ci NOT NULL , county CHAR(55) COLLATE utf8_unicode_ci NOT NULL , PRIMARY KEY(id) ) ENGINE = InnoDB DEFAULT CHARSET = utf8 Thanks. _ From: symfony-users@googlegroups.com [mailto:symfony-users@googlegroups.com] On Behalf Of Carl Sent: Sunday, April 24, 2011 7:55 PM To: symfony-users@googlegroups.com Subject: Re: [symfony-users] [Symfony2] Doctrine2 Associated Entities as Id Fields issue It sounds like you have an entity without a primary/foreign key defined for it. If you're certain that your entities have the correct annotations, make sure any database tables match them. Every entity must have a primary/foreign key or it won't work with Doctrine. It's kind of annoying since not every entity needs a primary key. Try adding a primary key to all of you entities and see if the problem goes away. -- If you want to report a vulnerability issue on symfony, please send it to security at 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] Re: R: Doctrine data-dump and data-load Fixtures
Yes, I built the model before loading. I was also able to replicate the errors in the doctrine sandbox. It looks like the real problem is that the doctrine data dump is not correctly adding quotes to the string fields. I have loaded to gist see: https://gist.github.com/943444 Thanks for taking a look at this. On Apr 26, 4:20 pm, ftassi tassi.france...@gmail.com wrote: Il giorno lunedì 25 aprile 2011 02:24:54 UTC+2, David ha scritto: Has anyone found a work around for such a situation or is there a bug in the cli doctrine:dump-data? My definitions are below and any help would be appreciated. Thanks. Can you post a mysqldump of the table so I can try to replicate your problem ? Cheers Francesco --- Francesco Tassi More about mehttp://flavors.me/ftassi -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] Re: symfony2: session handling and varnish
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 hello mauricio, i found no bullet proof thing to control it in general. however, i realized that i had framework.session.auto_start: true in my config.yml i set this to false and now i only get a session if one is started for some specific reason (i.e. csrf in forms needs a session - and does not kill it after the form has been successfully submitted) to be perfectionist, you could try to add some code to remove session cookies when they are present but user is not logged in and there is no reason for a session. but i think its pretty hard to know for sure, you would need to check all components involved in your request... not sure if symfony2 might have some clever way to handle this situation. i just worked my way around it by configuring varnish to ignore cookies for pages that do not differ on logged-in-status. hope this helps, cheers,david Hey David, I was just looking at your post because I'm kind of facing the same issue, I want to avoid sending session cookies for users that are not logged in. I wonder whether you managed to solve it, did you? Cheers!, Mauricio. Am 19.03.2011 11:56, schrieb David Buchmann: hello, i try to set up varnish in front of our symfony2 application and have a few questions that seem not to be covered by the documentation [1] [2] [3] we use form authentication with native sessions and the remember me feature active. 1. can i tell symfony2 to not start a session unless the user wants to log in? thus have no session cookie except for logged in users? this would tremendously help with the varnish setup. 2. the session cookie has a lifetime of 1 hour. it is not refreshed on each request (i see no Set-Cookie: header in responses for a logged in user). how is the session kept alive? or does the user lose his session after that hour even if he is constantly active on the site, and then remember me triggers him to be logged back in? not sure is this is really a symfony question, but i found no information on the topic at php.net either, except for some people re-sending the cookie on each request - which i do not want to work around symfony2 to do it. and it would be bad for caching. my current idea is: make the part that is session specific an esi include that varies on cookies and has a lifetime matching the expected age of the session. if the client loses his cookie, he sees immediately that he is no longer logged in (resp. rememberme can trigger and log him back in). does this make sense? if the docs + cookbook are on github, i could send some pull request afterwards with the result of this discussion integreated... cheers,david [1] http://symfony.com/doc/2.0/book/security/authentication.html [2] http://symfony.com/doc/2.0/book/http_cache.html [3] http://symfony.com/doc/2.0/cookbook/cache/varnish.html - -- Liip AG // Agile Web Development // T +41 26 422 25 11 CH-1700 Fribourg // PGP 0xA581808B // www.liip.ch -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk21UeIACgkQqBnXnqWBgIvuzACfeV8ymEJhvrK1zVU77NbKJd+V uP0An3xLEp6kbsoqgZUc4r/HuQtGGyga =DQjU -END PGP SIGNATURE- -- If you want to report a vulnerability issue on symfony, please send it to security at 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] twig check for array field existence
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 thanks oscar, john and jordi a cool syntax, the for/else, twig is really useful :-) actually i need to distinguish whether i have 0 children, 0 children or the children array is missing, which means the code did not check whether there where children or not... so what i am going to combine your explanations into something like {% if entry.children is defined %} {% if entry.children|length %} children {% else %} no children {% endif %} {% else %} undefined {% endif %} Am 16.04.2011 21:35, schrieb John Bohn: A nice built in feature of TWIG is the for/else loop. Not sure if it's exactly what you are looking for it would look like this: {% for child in entry.children %} child {% else %} no children {% endfor %} It will loop the entry.children if it exists and is not empty, otherwise it will fall back to the else statement. Hope it helps, John Bohn jjb...@gmail.com On Sat, Apr 16, 2011 at 2:03 PM, Jordi Boggiano j.boggi...@seld.be wrote: On 16.04.2011 20:39, oscar balladares wrote: Hi. You must use the 'length' filter: {{ entry|length }} That must do the trick. That will check the length of the array, if it exists. To check whether entry.children is there, you need to use: {% if entry.children is defined %} children {% else %} no children {% endif %} If it can be defined and empty, then you can use: {% if entry.children is defined %} {% for child in entry.children %} children {% else %} no children {% endfor %} {% endif %} Cheers -- Jordi Boggiano @seldaek :: http://seld.be/ -- If you want to report a vulnerability issue on symfony, please send it to security at 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 - -- Liip AG // Agile Web Development // T +41 26 422 25 11 CH-1700 Fribourg // PGP 0xA581808B // www.liip.ch -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk2qqRIACgkQqBnXnqWBgIt06QCgwspybweqyCvg575Fk5gPdkxC x24An3L2eYeFDwyzob9i9z+GP7hXBOyg =3l0a -END PGP SIGNATURE- -- If you want to report a vulnerability issue on symfony, please send it to security at 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] Controller before and after action (controller filters)
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 was starting to write you should have a look at the doc http://symfony.com/doc/2.0/book but actually, it is not in there, or at least not where i would expect it to be. however, google for symfony2 event brings up this as second result: http://blog.bearwoods.dk/symfony2-adding-a-event-listener there is also a way to specify what event you want to listen to, for example services: liip.demo.cachecontrol: class: Liip\CoreBundle\Helper\CacheControl tags: - { name: kernel.listener, event: onCoreResponse } Am 17.04.2011 16:33, schrieb A A: Could you please provide some piece of code? 2011/4/16 Jordi Boggiano j.boggi...@seld.be mailto:j.boggi...@seld.be On 15.04.2011 09:23, noRerih wrote: Hi all, is there way to execute some code before (and after) every action in Symfony2? Constructor doesn't work 'cause it invokes before services are launched and has no access to them, and therefore I can't get Request object. You should look into register core.request and core.response event listeners, they can receive any service, including the request. Cheers -- Jordi Boggiano @seldaek :: http://seld.be/ -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com http://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 mailto:symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com mailto:symfony-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 - -- Liip AG // Agile Web Development // T +41 26 422 25 11 CH-1700 Fribourg // PGP 0xA581808B // www.liip.ch -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk2rAJkACgkQqBnXnqWBgIv4zgCfSb+LVWF1LGQ2CVmWPkwHDWX9 2xIAnjwiYl6hlaoLNYZJukLAgRbT5zj3 =APYk -END PGP SIGNATURE- -- If you want to report a vulnerability issue on symfony, please send it to security at 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] twig check for array field existence
hi, for a symfony2 project, i use twig. i have a template that outputs a tree (nested php array) what i try to do is: check if there is a 'children' field on the entry, then if the children list contains at least one entry. (i have 3 cases: an entry has children, it has no children (empty array) or we do not know if there where children because we did not look). my current code is this (and it fails on the first line. the next line is not good either, because there is no count() in twig.) {% if entry.children %} {% if count(entry.children) %} children {% else %} nochildren {% endif %} {% endif %} http://www.twig-project.org/doc/templates.html#variables this claims that entry.children would return null if the entry has no children field, but i get Item children for Array does not exist 1. how to check whether an array field is defined? 2. how to check whether a variable is a non-empty array? cheers, david -- If you want to report a vulnerability issue on symfony, please send it to security at 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: [Symfony2] Upgrade to PR11 = white screen of death in prod environment
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 yeah, that rename confused me as well. i opened an issue to at least improve the exception message to something more clear. Am 13.04.2011 12:32, schrieb Carl: Well then. I guess I should have just waited 20 minutes before posting anything. It looks like the configuration for Monolog changed slightly. Now instead of fingerscrossed, it's fingers_crossed. Hopefully this will help someone else. :) -- If you want to report a vulnerability issue on symfony, please send it to security at 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 - -- Liip AG // Agile Web Development // T +41 26 422 25 11 CH-1700 Fribourg // PGP 0xA581808B // www.liip.ch -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk2ljroACgkQqBnXnqWBgIut6ACgmt0O02X5Sh4uk9xdGMTZRdN3 nV0AoLvn6UXkLhveuV2urSajTKmlhN9w =kQwd -END PGP SIGNATURE- -- If you want to report a vulnerability issue on symfony, please send it to security at 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] How Tree Routing can be achieved in sf2 ?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 hi cezar, you can do something along navigation: pattern: /{path} defaults: { _controller: your controller } requirements: { path: .* } the requirements for path make it also use the / character. cheers,david Am 13.04.2011 11:38, schrieb seven seven: Hi everyone, I am trying to implement a route for my project that is based on a nested behavior and I will like to have a route something like */rootCategory/Child1Category/Child2Category* etc... How should the route look like here ? Thanks in advance ! -- br Cezar -- If you want to report a vulnerability issue on symfony, please send it to security at 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 - -- Liip AG // Agile Web Development // T +41 26 422 25 11 CH-1700 Fribourg // PGP 0xA581808B // www.liip.ch -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk2ljl0ACgkQqBnXnqWBgIt7zACZAeYhxLCwKMgDLCyxlfiHs0Nz bUUAn08pjUZf9ttzXdS7qiyBXxrvoP0H =UsPt -END PGP SIGNATURE- -- If you want to report a vulnerability issue on symfony, please send it to security at 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: AsseticBundle Configuration + Usage
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 until there is a doc up, i just post findings about assetic here. we have now lessphp working if you want a less filter. you can update your vendors.sh to get lessphp from git://github.com/leafo/lessphp.git and put it into vendor/lessphp/ to make it work with symfony, you need this in your config.yml (and no entry in autoload - lessphp is currently not autoload-compatible) debug: %kernel.debug% use_controller: false filters: lessphp: file: %kernel.root_dir%/../vendor/lessphp/lessc.inc.php now use it with {% stylesheets output='all.css' filter='lessphp' '@XyBundle/Resources/less/file.less' %} cheers,david - -- Liip AG // Agile Web Development // T +41 26 422 25 11 CH-1700 Fribourg // PGP 0xA581808B // www.liip.ch -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk2bCcIACgkQqBnXnqWBgIvT5QCgualIZez/UgBUWS0I1vGaV3++ euYAoKb4AtUDHpJPiM59z88HRwQylJNp =8CLI -END PGP SIGNATURE- -- If you want to report a vulnerability issue on symfony, please send it to security at 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: AsseticBundle Configuration + Usage
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 hi and thanks for documenting this, it really helps. i think there are two glitches in your config: you duplicate bundles by having it both in write_to and and in your stylesheet tag. the most simple use case is probably: write_to: %kernel.root_dir%/../web ... output='all.css' if you want assetic to do more than concatenate the files, you need to specify a filter. you just enable them in your config, but assetic only uses them when they are specified in the stylesheets tag: {% stylesheets output='all.css' filter='less' '@PlaysoftHR/...f.less' %} check the dependency injection file to see what you can configure - you will need to specify something for some of the filters. some just need the necessary 3rd party installed and if you do it at the default location, they just work vendor/symfony/src/Symfony/Bundle/AsseticBundle/DependencyInjection/AsseticExtension.php cheers,david Am 01.04.2011 01:04, schrieb Wizermil: Hi, I confirm it was a mistake in my code, my bad. I didn't write the right path in output attribute. I forget about the system folder web/bundles (generated automatically by app/console assets:install web) I thought it was handled by the framework but not : (. Whatever, I can explain how I fixed it. Maybe it can help other devs waiting for awesome official Symfony documentation. The lines below describe what I did to shrink the css files hosted in my bundle (PlaysoftHR) in the folder public/css/* and in an extra folders called public/lib/* (jquery-ui, ...). 1. Setup app/config.yaml Add write_to: %kernel.root_dir%/../web/bundles to the assetic section. Example: assetic: debug: %kernel.debug% use_controller: false write_to: %kernel.root_dir%/../web/bundles filters: cssrewrite: ~ closure:~ 2. About Twig Syntax You can use the {% stylesheets %}, {% javascripts %} and {% image %} extensions depending of what you want to do. Example to Shrink CSS: {% stylesheets output='bundles/playsofthr/css/all.css' '@PlaysoftHR/ Resources/public/css/hr.css' '@PlaysoftHR/Resources/public/lib/ shjs-0.6/sh_style.css' '@PlaysoftHR/Resources/public/lib/jquery- ui-1.8.11.custom/css/ui-lightness/jquery-ui-1.8.11.custom.css' '@PlaysoftHR/Resources/public/lib/CLEditor1_3_0/jquery.cleditor.css' %} link href={{ asset_url }} type=text/css rel=stylesheet / {% endstylesheets %} Note: You have to be careful about the output to be sure that it will be compliant with Symfony2 bundles public resources path web/ bundles/... 3. Generate assets using the console Debug Env: app/console assetic:dump Prod Env: app/console --no-debug --env=prod assetic:dump 4. Check Double check that you can see the files you define in output of the twig block 5. Debug Finally using any Developer Tool (Chrome, Firefox, DragonFly ...) you have to verify that you are able to download the file without 404 errors. If it doesn't work it probably means that the path you defined in the output is wrong like I did the first time ;) I hope that it will help other devs. Cheers, Mathieu On Mar 31, 7:11 pm, Wizermil mathieu.gar...@gmail.com wrote: Hi Albert, Thanks for the reply. When I use this syntax: {% assets 'mybundle/css/*.css' output='css/all.css' %} {{ asset_url }} {% endassets %} It throw an exception: Unknown tag name assets in PlaysoftHR::layout.html.twig line 6 That's why I checked in assetic to see that the method stylesheets is available in twig. Moreover it works in debug environment. But maybe I'm doing something wrong I'll check this evening. Regards, Mathieu On Mar 31, 7:22 am, Albert Jessurum ajessu...@gmail.com wrote: In my view I have the following code to generate assets: File: @MyBundle/Resources/views/layout.twig.html {% assets 'mybundle/css/*.css' output='css/all.css' %} {{ asset_url }} {% endassets %} You're missing the @ when refering to a resource. It should be {% assets '@MyBundle/Resources/css/*.css' ... %} - -- Liip AG // Agile Web Development // T +41 26 422 25 11 CH-1700 Fribourg // PGP 0xA581808B // www.liip.ch -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk2W8TkACgkQqBnXnqWBgItCHQCfQK/q3RqAcf3kjxokPa3UTwZE /OYAoIuqSsmPVGRDW2ePKOfe8cNyyn2W =RU20 -END PGP SIGNATURE- -- If you want to report a vulnerability issue on symfony, please send it to security at 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
Re: [symfony-users] sample sites
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 hi jab, one of our customers just went online with http://www.joiz.ch/ all shiny new symfony2. cheers, david Am 29.03.2011 20:23, schrieb Jab..: Any real time websites built with symfony that I could look at to understand its capability On 29-Mar-2011 11:15 PM, Pete Sisson petes...@gmail.com mailto:petes...@gmail.com wrote: Hi folks I've been trying to move my bundle from importing the config in to the apps config.yml with imports (which I have working fine), to using a container extension. With # /app/config/config.yml foo: data1: stuff data2: morestuff and a FooExtension class in # /src/Bar/FooBundle/DependencyInjection/FooExtension.php which has a public load method implemented, I've tried a number of things but can't get away from an error: Fatal error: Uncaught exception 'InvalidArgumentException' with message 'There is no extension able to load the configuration for foo ' I think I don't really understand how Symfony2 locates the extension class, so I don't know if I have missed registering it somewhere, or is there a naming convention I need to follow? I've tried a large number of things based on browsing the core bundles, but I am missing something for sure. I have the following before I declare the class in FooExtension.php // namespace Bar\FooBundle\DependencyInjection; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\Config\Definition\Processor; use Symfony\Component\HttpKernel\DependencyInjection\Extension; use Symfony\Component\DependencyInjection\Loader\YmlFileLoader; use Symfony\Component\Config\FileLocator; // I have been following the docs here http://symfony.com/doc/2.0/book/service_container.html so far, but when they get to this section they don't really say how you do it. Just that you can, and should, do it, if you want to distribute your bundle. That's not a dig at the docs btw - considering Symfony2 isn't even released yet the docs are great. Can anyone point me in the right direction with this issue? Thanks Pete -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com http://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 mailto:symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com mailto:symfony-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 - -- Liip AG // Agile Web Development // T +41 26 422 25 11 CH-1700 Fribourg // PGP 0xA581808B // www.liip.ch -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk2S9ckACgkQqBnXnqWBgIvV9ACguC5qmMxoAuxI2rCIc66gexET AoYAoLia55fRu4PMRdm80LdijUibonN2 =XgtR -END PGP SIGNATURE- -- If you want to report a vulnerability issue on symfony, please send it to security at 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] Use only one controller
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 hi chris, this approach sounds ok to me. you might realise that you want to have some routes outside your cms anyways, for applications that display data (like lists of pages or rss feeds). i guess the most fancy approach would be to hook deeper into the routing of symfony2 and use your own routing component instead of the default one. but if it works out ok for you like this, i think it is a valid approach. just make sure you only use that route for cms things only and build separate routes for urls that are not supposed to changed. by the way: you might be interested in the symfony cmf project. we want to build a content management framework, that can be used as common base for cms systems on top of symfony2 as well as to build custom cms-components into custom web applications. there is no finished library yet, information is at http://cmf.symfony.com cheers, david Am 16.03.2011 13:28, schrieb Chris: Hey everyone, I'm fairly new to Symfony 2 and currently working on a content management project. Since this project has just a single entry point (PageController) to handle a regular request I want to skip the routing process and always use one controller. The complex internal routing (rewrite url = page) is done within this controller. I'm not quite sure if this is the proper way to do it. The reason why I did this in first place was that my routing system does not return a simple array with _controller etc. but rather a complex PageRouteResponse object with information needed by PageController. Is it useful in this case to hook into the internal routing or am I right with my approach? If I'm right, how do I redirect every request to a single controller? Cheers, Chris - -- Liip AG // Agile Web Development // T +41 26 422 25 11 CH-1700 Fribourg // PGP 0xA581808B // www.liip.ch -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk2EonUACgkQqBnXnqWBgItWeQCfQ6pvlcNP6hCycI7tyhmp1/6u WgsAn3Bh8tPoW2xN5OHcwbA9t16VmFqC =jv10 -END PGP SIGNATURE- -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] symfony2: session handling and varnish
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 hello, i try to set up varnish in front of our symfony2 application and have a few questions that seem not to be covered by the documentation [1] [2] [3] we use form authentication with native sessions and the remember me feature active. 1. can i tell symfony2 to not start a session unless the user wants to log in? thus have no session cookie except for logged in users? this would tremendously help with the varnish setup. 2. the session cookie has a lifetime of 1 hour. it is not refreshed on each request (i see no Set-Cookie: header in responses for a logged in user). how is the session kept alive? or does the user lose his session after that hour even if he is constantly active on the site, and then remember me triggers him to be logged back in? not sure is this is really a symfony question, but i found no information on the topic at php.net either, except for some people re-sending the cookie on each request - which i do not want to work around symfony2 to do it. and it would be bad for caching. my current idea is: make the part that is session specific an esi include that varies on cookies and has a lifetime matching the expected age of the session. if the client loses his cookie, he sees immediately that he is no longer logged in (resp. rememberme can trigger and log him back in). does this make sense? if the docs + cookbook are on github, i could send some pull request afterwards with the result of this discussion integreated... cheers,david [1] http://symfony.com/doc/2.0/book/security/authentication.html [2] http://symfony.com/doc/2.0/book/http_cache.html [3] http://symfony.com/doc/2.0/cookbook/cache/varnish.html - -- Liip AG // Agile Web Development // T +41 26 422 25 11 CH-1700 Fribourg // PGP 0xA581808B // www.liip.ch -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk2Ei9YACgkQqBnXnqWBgItEXQCfe2DW3YwkFSiWtXN86nrWPaf1 OxwAoKR87nZIMxp8JOvxDRDeXTj9hYnD =y5yJ -END PGP SIGNATURE- -- If you want to report a vulnerability issue on symfony, please send it to security at 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] O symfony 2 tem o comando de importar esquema do banco??
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 hi, try to run app/console you will see a list of available commands, one of them being doctrine:schema:create Processes the schema and either create it directly on EntityManager Storage Connection or generate the SQL output. there is a lot of documentation available, the central source being: http://symfony.com/doc/2.0/ what you probably want to look into is this: http://symfony.com/doc/2.0/book/doctrine/orm/index.html cheers, david Am 16.03.2011 20:25, schrieb André: Boa tarde tenho um projeto, e gostaria de saber se o Symfony 2 tem a opção de importar esquema do banco de dados para ele igual o Symfony 1. E se tiver pode dizer qual é o comando e como faz? Good afternoon I have a project, and I wonder if the Symfony 2 has the option to import the database schema for it like the Symfony 1. And if you can tell what the command does and how? thank you hug - -- Liip AG // Agile Web Development // T +41 26 422 25 11 CH-1700 Fribourg // PGP 0xA581808B // www.liip.ch -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk2DDlMACgkQqBnXnqWBgIv9ggCfbfkwzVSJXeUluGeuzNAvBz8k RRQAn2Dleh0fqyeGACE+U6wyRPMecEtA =yMto -END PGP SIGNATURE- -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] Symfony 1.4 sending output twice for sf_view::
I have implemented some graphs using a chart library. Inside this library, there are various gd calls to create and render a png file. I have a wrapper class that requires the library class. Inside this class I have a stroke() method that concludes with this: $context = sfContext::getInstance(); $this-setHeaders($context); $context-getResponse()-send(); $pPicture-out(); the out() method has various gd calls and ultimately this: imagepng($this-Picture); imagedestroy($this-Picture); Here is setHeaders() protected function setHeaders($context) { $expireDateTime = new DateTime('tomorrow', new DateTimeZone('UTC')); $response = $context-getResponse(); $response-setHttpHeader('Expires', $expireDateTime-format(DATE_RFC1123)); $response-setContentType('image/png'); } The controller code has this: sfConfig::set('sf_web_debug', false); $this-getController()-setRenderMode(sfView::RENDER_NONE); $this-setLayout(false); ... model code, to fill variables, creation of graph object. $graph-stroke(); return sfView::NONE When I load the url for the graph controller and look at the net connections in firebug I see the graph loaded twice. The symfony log shows this: Mar 16 10:26:44 symfony [info] {sfWebResponse} Send status HTTP/1.1 200 OK Mar 16 10:26:44 symfony [info] {sfWebResponse} Send header Expires: Thu, 17 Mar 2011 00:00:00 + Mar 16 10:26:44 symfony [info] {sfWebResponse} Send header Content-Type: image/png Mar 16 10:26:44 symfony [info] {sfWebResponse} Send content (0 o) Mar 16 10:26:44 symfony [info] {sfWebResponse} Send content (0 o) I have tried a lot of different variations on the code, but I still seem to have this unexplained issue with the 2x Send Content calls, and the 2x requests for graph.png. What can I do to remedy this issue? -- If you want to report a vulnerability issue on symfony, please send it to security at 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: Production environment
hi federico, did you check the apache error log? can it be that your app/cache/prod directory does not exist or is not writeable for the web server? cheers, david Am 14.03.2011 18:44, schrieb Federico Bernardin: Hi, yes the production deployment is on the root of the domain. If I write: http://www.mysite.com/app.php/hello/Fede the page is blank, but if I write http://www.mysite.com/app_dev.php/hello/Fede all works correctly. Thanks in advance. federico Il giorno 14/mar/2011, alle ore 13.05, Michael Van Sickle ha scritto: Is your production deployment on the root of the domain? If not, then mod_rewrite needs to know the base name using the RewriteBase directive in your .htaccess. For example, if your base address for your site is http://www.example.com/mysite, then the .htaccess would need a line 'RewriteBase /mysite' in order to resolve the rewrite rule properly. -- If you want to report a vulnerability issue on symfony, please send it to security at 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 -- Liip AG // Agile Web Development // T +41 26 422 25 11 CH-1700 Fribourg // PGP 0xA581808B // www.liip.ch -- If you want to report a vulnerability issue on symfony, please send it to security at 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: Production environment
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 hi federico, did you check the apache error log? can it be that your app/cache/prod directory does not exist or is not writeable for the web server? cheers, david Am 14.03.2011 18:44, schrieb Federico Bernardin: Hi, yes the production deployment is on the root of the domain. If I write: http://www.mysite.com/app.php/hello/Fede the page is blank, but if I write http://www.mysite.com/app_dev.php/hello/Fede all works correctly. Thanks in advance. federico Il giorno 14/mar/2011, alle ore 13.05, Michael Van Sickle ha scritto: Is your production deployment on the root of the domain? If not, then mod_rewrite needs to know the base name using the RewriteBase directive in your .htaccess. For example, if your base address for your site is http://www.example.com/mysite, then the .htaccess would need a line 'RewriteBase /mysite' in order to resolve the rewrite rule properly. -- If you want to report a vulnerability issue on symfony, please send it to security at 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 - -- Liip AG // Agile Web Development // T +41 26 422 25 11 CH-1700 Fribourg // PGP 0xA581808B // www.liip.ch -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk1/FLsACgkQqBnXnqWBgIt5ZwCgxEccVv+ROcZyx/4nCXlJZxmC oqMAoJNGcK9wQ/iZ1ma9FiXzrGHym5ez =AYA1 -END PGP SIGNATURE- -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] Re: Table meta-data in Symfony
To flesh this out more -- we have the following schema: Instrument: columns: name: { type: string(255), notnull: true, unique: true } description: clob Question: columns: instrument_id: { type: integer, notnull: true } item_number: { type: integer, notnull: true } name: string(255) type_id: integer relations: Instrument: { local: instrument_id, foreign: id, foreignAlias: Instrument } Test: actAs: [ Timestampable ] columns: client_id: { type: integer, notnull: true } staff_id: { type: integer, notnull: true } instrument_id: { type: integer, notnull: true } relations: Instrument: { local: instrument_id, foreign: id, foreignAlias: Instrument } Staff: { local: staff_id, foreign: id, foreignAlias: Test } Instrument: { local: instrument_id, foreign: id, foreignAlias: Instrument } Answer: columns: test_id: { type: integer, notnull: true } question_id: { type: integer, notnull: true } response: string We need to generate a form for the test model. It will have many questions whose answers goto into the answers We know about http://itsmajax.com/2010/10/09/customize-sfguarduser-sfdocrineguard/ and use it for another for another model. any ideas? On Mar 1, 1:30 pm, ArtHuston a...@arthuston.com wrote: We have tables with many test questions. Instead of putting each test type in its own table, we are exploring the idea of storing the test meta-data in a table, and generating the forms for each test from the meta-data. This would give the user the ability to add/delete/view/edit the test meta-data. Does anyone have any examples of this technique, or Symfony plugins that would help? 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
Re: [symfony-users] Re: How to create custom Doctrine data validation?
Hi Derrek, I found the answer to this question by digging through the documentation. Based on the docs, symfony's default configuration settings don't enable all of Doctrine's validations. So you need to change the default configuration. I changed my system's configuration by adding the following code to lib/config/PropertyConfiguration.class.php: public function configureDoctrine(Doctrine_Manager $manager) { $manager-setAttribute(Doctrine_Core::ATTR_VALIDATE, Doctrine_Core::VALIDATE_ALL); } I added this code, rebuilt the models/forms/filters and cleared the cache. After that, all custom validations worked fine. Hope this helps! David On Mon, Sep 20, 2010 at 9:46 AM, Derrek dle...@allofzero.com wrote: Did you find the answer to this? I'm having the same problem. On Sep 15, 8:53 pm, David Park dpark...@gmail.com wrote: Hi All, I'm having problems creating a custom Doctrine data validation rule. After reading the Doctrine More Validation documentation ( http://www.doctrine-project.org/documentation/manual/1_2/hu/component-overvi... ), I created a protected validate() function in my model class file Game.class.php. When I update a record, however, the Game.validate() record doesn't get called at all. Can anyone give me advice on how to get the custom validation to work? Any advice would be appreciated as I'm a newbie! -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] How to create custom Doctrine data validation?
Hi All, I'm having problems creating a custom Doctrine data validation rule. After reading the Doctrine More Validation documentation (http:// www.doctrine-project.org/documentation/manual/1_2/hu/component-overview:validator:more-validation), I created a protected validate() function in my model class file Game.class.php. When I update a record, however, the Game.validate() record doesn't get called at all. Can anyone give me advice on how to get the custom validation to work? Any advice would be appreciated as I'm a newbie! -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] Re: Problem With Jobeet: Day 5
Hmm, that seems to work if you only want to slug one column in the table. What if I wanted to slug title and category name? Also, I noticed it said you can change the function used to create the slug using the builder option...where can you find a list of the available functions for this? Although, I am wanting to slug two columns, so this method may not work anyway. On Aug 2, 6:13 pm, Gustavo Adrian comfortablynum...@gmail.com wrote: The problem here is that using a custom method without further configuration there's no way the routing system can find the article based on the title_slug parameter, because the field actually doesn't exist on the database. The best way to do it is using the Sluggable behaviour of Doctrine. It automatically creates a slug field on your table based on a field (or fields) you configure. So, when you create an item, it automatically fills that field with a slug of the fields you configure (in this case, the title field). Then, instead of using title_slug, you could use directly slug as the route parameter. The routing system would find your Article based on that field (because now it exists on your Article table). More information about the Sluggable behaviour: http://www.doctrine-project.org/projects/orm/1.2/docs/manual/behavior... http://www.doctrine-project.org/projects/orm/1.2/docs/manual/behavior... Cheers. On Mon, Aug 2, 2010 at 5:40 PM, David Savage armaka...@gmail.com wrote: Hey all, So, I just downloaded symfony and decided to try and learn it by following the Jobeet tutorial. After some bumps and starts (not sure if the symfony website maintainers read this, but they might think of including a specialized install guide for Snow Leopard, took me forever and a ton of googling to get everything set up right), I've made it to Day 5. Everything works fine until i try to use the slugify methods. I'm following the tutorial completely, but I am setting up a news site instead of a job site, so I'll be referencing a job as an article. So, I went into lib/model/doctrine/Article.class.php and created the function getTitleSlug() as described in the tutorial. I then created the lib/Article.class.php Article class with static public function slugify. Now comes the problem. If I leave my article_show_user method as such: article_show_user: url: /article/:title_slug I get an error when viewing the index that says: The / article/:title_slug route has some missing mandatory parameters (:title_slug). However, when I remove the _slug part (so it just says url: / article/:title) everything works fine, but obviously I'm not getting what I want: slugified titles! I created one article (where the title was: A Test Featured Article). If I enter article/a-test-featured-article as the test url, I get the correct page...so, I'm confused how this is working on the show article itself but NOT the index. If it helps any, here's the code I'm using for my indexSuccess.php: h1Articles/h1 div class=article_list ?php foreach ($articles as $article): ? div class=article ?php echo link_to($article-getTitle(), 'article_show_user', $article) ? /div ?php endforeach; ? /div a href=?php echo url_for('article/new') ?New/a Any help is greatly appreciated!!! -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] Problem With Jobeet: Day 5
Hey all, So, I just downloaded symfony and decided to try and learn it by following the Jobeet tutorial. After some bumps and starts (not sure if the symfony website maintainers read this, but they might think of including a specialized install guide for Snow Leopard, took me forever and a ton of googling to get everything set up right), I've made it to Day 5. Everything works fine until i try to use the slugify methods. I'm following the tutorial completely, but I am setting up a news site instead of a job site, so I'll be referencing a job as an article. So, I went into lib/model/doctrine/Article.class.php and created the function getTitleSlug() as described in the tutorial. I then created the lib/Article.class.php Article class with static public function slugify. Now comes the problem. If I leave my article_show_user method as such: article_show_user: url: /article/:title_slug I get an error when viewing the index that says: The / article/:title_slug route has some missing mandatory parameters (:title_slug). However, when I remove the _slug part (so it just says url: / article/:title) everything works fine, but obviously I'm not getting what I want: slugified titles! I created one article (where the title was: A Test Featured Article). If I enter article/a-test-featured-article as the test url, I get the correct page...so, I'm confused how this is working on the show article itself but NOT the index. If it helps any, here's the code I'm using for my indexSuccess.php: h1Articles/h1 div class=article_list ?php foreach ($articles as $article): ? div class=article ?php echo link_to($article-getTitle(), 'article_show_user', $article) ? /div ?php endforeach; ? /div a href=?php echo url_for('article/new') ?New/a Any help is greatly appreciated!!! -- If you want to report a vulnerability issue on symfony, please send it to security at 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] one backend multiple sites
Hi, I've got multiple sites with duplicated backend in each of them. My idea is to have one single symfony project with one backend with one DB and mutiple frontend apps for all different sites so domain1.com redirects to the first app, domain2.com redirects to the second app and domain.com/backend.php/ redirects to the unique backend. Is this possible and if so, could you give some steps to follow or reference?, thanks. -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] factories.yml configuration for Swift_FailoverTransport
I'm trying to setup the mailer for my Symfony project to use the Swift_FailoverTransport to allow Swift to failover to a second SMTP server if the first SMTP server does not connect. I can't hover figure out how I would setup the configuration parameters in factories.yml to properly configure the FailoverTransport for the multiple transports, and I can't find any examples out there of how to do this. Any suggestions? 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 To unsubscribe, reply using remove me as the subject.
[symfony-users] Custom generator
I have a bunch of very similar actions with very similar support files (classes, templates, etc.). I'd like to use a generator to cut down on my copy-and-pasting every time I need a new one: I'd fill out the unique parts of the action in generator.yml (or similar), and Symfony would generate the action, associated classes and templates for me. I am familiar with and use the admin generators a lot, and they're great. But what I need in this case is really nothing like CRUD - it would be a completely custom generator. I've been looking through sfGenerator, etc. to see how this would work, but I don't quite understand it, and I haven't been able to find any documentation that isn't specific to the admin generator. Any pointers to get me started? e.g. which classes to extend, which methods to implement? Maybe a brief description of the execution path Symfony takes once it finds a generator.yml file? David -- If you want to report a vulnerability issue on symfony, please send it to security at 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 To unsubscribe, reply using remove me as the subject.
[symfony-users] special interpretation of a form field before saving the associated object
I have a slightly odd case I'm trying to figure out: I have two model classes, defined with the following schema: Widget: columns: title: { type: string, notnull: true } description: { type: string } FeaturedWidgetStatus: actAs: Sortable: ~ columns: widget_id: { type: integer, notnull: true } relations: Widget: { onDelete: CASCADE, local: widget_id, foreign: id, foreignAlias: Featured, foreignType: one } To explain this schema: Featured Widgets can be sorted amongst themselves, so rather than just having a boolean featured flag on the Widget model I have the featuredness indicated by whether or not a Widget object has (or has not) an associated FeaturedWidgetStatus object. (In reality there are a number of other fields on both of these models but they aren't relevant for this discussion.) In my Widget editing form, I want to have a checkbox where the user can indicate whether the Widget is featured (checkbox is checked) or not featured (checkbox is not checked). When the Widget editing form is submitted, I want to take a look at the submitted checkbox value and if it is unchecked (but the Widget has an associated FeaturedWidgetStatus), I'll delete the Widget's associated FeaturedWidgetStatus object. Conversely, if the submitted checkbox value is checked (but the Widget does not already have an associated FeaturedWidgetStatus), then I'll create a new FeaturedWidgetStatus associated with this Widget. My problems is I'm not sure where to put this logic - where can I see the value of the checkbox after the form has been submitted? Where should I hook into the default form-submission / binding / object-saving procedure in order to interject this special logic (creating or deleting the FeaturedWidgetStatus based on the value of the checkbox)? Thanks. -david -- You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
[symfony-users] Re: CSRF attach with admin generator
Are you by any chance using sfAdminThemejRollerPlugin? I recently noticed a bug in the auto-generated templates for that jRoller admin generator plugin. If you look in _list_batch_actions.php (in your cache, under the module's templates folder), for the standard Symfony admin generator, it creates the CSRF hidden field for the batch actions form like this: ?php $form = new BaseForm(); if ($form-isCSRFProtected()): ? input type=hidden name=?php echo $form-getCSRFFieldName() ? value=?php echo $form-getCSRFToken() ? / ?php endif; ? However, in the jRoller admin generator, it does this: ?php $form = new sfForm(); if ($form-isCSRFProtected()): ? input type=hidden name=?php echo $form-getCSRFFieldName() ? value=?php echo $form-getCSRFToken() ? / ?php endif; ? The only difference is that jRoller creates an sfForm whereas the Symfony admin generator creates a BaseForm. If you override the auto-generated template (copy it from the cache into your module's templates folder) and change sfForm to BaseForm it gets rid of that CSRF error. I don't know why, but it works -david On Feb 4, 5:52 am, HAUSa jeroen_heeft_behoefte_aan_r...@hotmail.com wrote: For some reason, I _always_ get a CSRF attack error message when I use the admin generator and want to execute a batch action. I can't fix it as well, I don't know where that error is coming from. Is there anyone who ran into the same problem or can help me? -- You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-us...@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: Cross-Server Communication from Controllers
i would recommend your first option which is going over ssl. if this is all within the same network, then SSL will be enough to keep prying eyes out. if its over public networks, then would probably suggest trying to figure out what is going wrong with the encrypt/decrypt function you are using (base64 suggestion below). -d ..oO David Wang Oo.. ..oO blog - http://www.udfi.biz ..oO JennieBot! - http://www.jenniebot.com On Feb 1, 2010, at 12:59 PM, pghoratiu wrote: If you have problems with data transmission I suggest you try out one of the following functions: http://php.net/manual/en/function.convert-uuencode.php http://www.php.net/manual/en/function.base64-encode.php to convert the binary string into something that can be safely transfered over the network. Best regards, gabriel On Feb 1, 6:50 pm, Paul Frazee pfra...@gmail.com wrote: Heyo. This is a repost from the forums; I'm in need of some sage advice here. Read on: The company keeps two databases - the master, which holds sensitive data, and the slave, which replicates only the insensitive data. This is actually pretty easy in MySQL, you should check it out. Anywho, every so often, the website, which typically uses the public slave database, needs to modify data on the private master database. (AKA the user changes his profile or buys something.) No problem, I just need to create a secure (and mostly one-way) webservice that accepts the data from the website. The trick is that I need to send this data from the controller, and I need to encrypt the data. My first solution was to create a POST request using the sfWebBrowser plugin, which then gets an XML response. Yaba-daba-doo, that works. Then I decide to encrypt. I mycrpt and send and... can't seem to get the data or initialization vector to arrive. Why-oh-why? My best guess is that encrypted data doesn't play nicely with POST validation. The data is probably out of typical character range. So at this juncture I decide to stop and ask, is my path righteous? Is there an algorithm which will play nicely with POST, or should I use cURL to create an SSL connection, or is a POST request completely off- base? Has anybody had similar experience? Thanks -- You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-us...@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. -- You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-us...@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: Cross-Server Communication from Controllers
Sorry, I meant to infer that you should use both SSL and Encryption. -d On Feb 1, 2010, at 2:53 PM, Paul Frazee wrote: This is over public networks. I did get the encryption to work, but I'm curious why you recommend not using SSL in this case? On Feb 1, 1:09 pm, David Wang dw...@udfi.biz wrote: i would recommend your first option which is going over ssl. if this is all within the same network, then SSL will be enough to keep prying eyes out. if its over public networks, then would probably suggest trying to figure out what is going wrong with the encrypt/decrypt function you are using (base64 suggestion below). -d ..oO David Wang Oo.. ..oO blog -http://www.udfi.biz ..oO JennieBot! -http://www.jenniebot.com On Feb 1, 2010, at 12:59 PM, pghoratiu wrote: If you have problems with data transmission I suggest you try out one of the following functions: http://php.net/manual/en/function.convert-uuencode.php http://www.php.net/manual/en/function.base64-encode.php to convert the binary string into something that can be safely transfered over the network. Best regards, gabriel On Feb 1, 6:50 pm, Paul Frazee pfra...@gmail.com wrote: Heyo. This is a repost from the forums; I'm in need of some sage advice here. Read on: The company keeps two databases - the master, which holds sensitive data, and the slave, which replicates only the insensitive data. This is actually pretty easy in MySQL, you should check it out. Anywho, every so often, the website, which typically uses the public slave database, needs to modify data on the private master database. (AKA the user changes his profile or buys something.) No problem, I just need to create a secure (and mostly one-way) webservice that accepts the data from the website. The trick is that I need to send this data from the controller, and I need to encrypt the data. My first solution was to create a POST request using the sfWebBrowser plugin, which then gets an XML response. Yaba-daba-doo, that works. Then I decide to encrypt. I mycrpt and send and... can't seem to get the data or initialization vector to arrive. Why-oh-why? My best guess is that encrypted data doesn't play nicely with POST validation. The data is probably out of typical character range. So at this juncture I decide to stop and ask, is my path righteous? Is there an algorithm which will play nicely with POST, or should I use cURL to create an SSL connection, or is a POST request completely off- base? Has anybody had similar experience? Thanks -- You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-us...@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. -- You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-us...@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. ..oO David Wang Oo.. ..oO blog - http://www.udfi.biz ..oO JennieBot! - http://www.jenniebot.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-us...@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] What do you use symphony for?
I use symfony for my user generated reminder system JennieBot. check it out at http://www.jenniebot.com. [ i know, selfless promo... you asked for it :) ] ..oO David Wang Oo.. ..oO blog - http://www.udfi.biz ..oO JennieBot! - http://www.jenniebot.com On Jan 31, 2010, at 3:32 PM, Alexandru-Emil Lupu wrote: Would you publish your report ? Mabye some others might need some parts of the report convince their management to switch to symfony. Also some others might be able to know what is symfony used for. :) Alecs On Sun, Jan 31, 2010 at 9:15 PM, Ravi Undupitiya ravi.undupit...@gmail.com wrote: Thanks for the replies and helping me out with my report. Yes, symFony. I keep doing that. Best, Ravi On Sun, Jan 31, 2010 at 8:26 AM, Eno symb...@gmail.com wrote: On Tue, 26 Jan 2010, raviu wrote: Could you tell us what you use symphony for BTW, that should be symfony not symphony :-) -- -- You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-us...@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. -- You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-us...@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. -- Have a nice day! Alecs As programmers create bigger better idiot proof programs, so the universe creates bigger better idiots! I am on web: http://www.alecslupu.ro/ I am on twitter: http://twitter.com/alecslupu I am on linkedIn: http://www.linkedin.com/in/alecslupu Tel: (+4)0722 621 280 -- You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-us...@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. -- You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
[symfony-users] Re: tinymce in symfony
Hi Why don't you trying install sfFormExtPlugin again? On 28 ene, 12:30, mr_question lolekzbol...@gmail.com wrote: Ok, now I use sfWidgetFormTextareaTinyMCE() but I still don't have tinymce. What is more I don't have in view - source in browser: script type=text/javascript src=/js/tiny_mce/tiny_mce.js/ script why ? On 28 Sty, 17:09, Gábor Fási maerl...@gmail.com wrote: http://www.symfony-project.org/forms/1_2/en/A-Widgets#chapter_a_sub_s... On Thu, Jan 28, 2010 at 09:06, mr_question lolekzbol...@gmail.com wrote: I inserted in /js catalog 'tiny_mce', added to settings.yml: rich_text_js_dir: js/tiny_mce and my sfWidgetFormTextarea's aren't rich text editors, why ? -- You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-us...@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. -- You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-us...@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] Is it possible to define a sfPropelRoute with multiple objects??
Hi, I am defining all routes for a directory web site. While browsing the directory I need to pass trough url multiple objects (category, article, location). Is it possible to define sfPropel Routes to work with multiple objects in the URL. If so, please, could give an example of routing.yml and how to get all objects in the action, please. I have made it to work for one object (category) but don't know how for multiple values. Already looked in Google with no results ;). Thanks!! -- You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-us...@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] Various projects sharing the same virtual URL
I have some projects for different customers, and I have configured one virtual server (in Apache 2) for each one. Examples: - http://customer_acme - http://customer_jamesbond My question: is there some way to create one virtual server for all of them, and differenciate them with a virtual subfolder? Examples: - http://customers/acme - http://customers/jamesbond Of course, that should work with symfony (go directly into the web subfolder). -- You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-us...@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] Reasons NOT To Use CakePHP
I'd second what Pablo said. You can always get a list of reasons for or against a framework. In the end, if the client can support Cake but not symfony, then i'd just use cakephp. CakePHP is pretty easy to develop in. If you can develop in symfony, cakephp will be... cake :) -d On Dec 17, 2009, at 10:52 AM, Pablo Godel wrote: Hi Stephen, As much as you may not like it, I think you should do what the customer asked. If they have someone already that can (or think that can) maintain CakePHP, for the customer this is very important. There are many reasons why not use CakePHP, but there can also be many why not use symfony, and having someone that does not know it is one of them. Good luck! Pablo On Thu, Dec 17, 2009 at 9:24 AM, Stephen Melrose step...@sekka.co.uk wrote: Hey guys, We've specced a project here for Symfony, and the client has come back saying they want to use CakePHP instead because someone there end has used it, therefore can maintain it. I've heard CakePHP isn't one of the better frameworks, but I haven't used it so I don't know why. What we need is some justified reasons. Anyone got any they can throw my way? Preferably from a maintenance perspective? Cheers, Stephen -- You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-us...@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. -- You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-us...@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. -- You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-us...@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] [sfDoctrineGuardPlugin] Change username into email
I would need to change the username field of sfDoctrineGuardPlugin into email, because my site will not need usernames, but unique emails. I tried to just change the name and type of the username field, but when I rebuild all I get this error: Unknown record property / related component username on sfGuardUser So I suppose I can't change the username field. My workaround would be using the username as an email (and also adding an email:true validation to the field). Is this approach correct enough? Is there any cleaner workaround? -- You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-us...@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: DBFinderPlugin future
Tony Piper wrote: +1 from me. It would be great if François could update it for Propel 1.4 and Symfony 1.3/1.4 compatibility - it would probably take him just a few minutes (relative to how long it would take me)… The lack of DbFinder is a show-stopper for my 1.2-1.3 upgrade testing and migration plans. +1 from me too. Our project also heavily depends on DbFinder for Propel, because I used it for all the queries that are a little too complex for Criteria only. David -- You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
[symfony-users] Re: sfDoctrineGuard Plugin uses deprecated Stuff
I also upgrade to 1.4 and when I use the sfGuardUser backend, it throws an error when I try to edit a user: Fatal error: Call to a member function setLabel() on a non-object in plugins/sfDoctrineGuardPlugin/lib/form/doctrine/base/ BasesfGuardUserAdminForm.class.php on line 26 I have no idea how to solve this. Maybe the functions are deprecated for the forms are deprecated in symfony 1.4 On 30 nov, 13:00, Fabien Potencier fabien.potenc...@symfony- project.com wrote: Christopher Schnell wrote: Hi all, I just upgraded a new project to 1.4 and ran the project:validate Task. It shows an error in sfDoctrineGuard Plugin, meaning that it is not ready for 1.4. The error reads as follows: 1. 7. Checking usage of array notation with a parameter holder 2. 3. 1 file(s) need to be changed. 4. ROOT/plugins/sfDoctrineGuardPlugin/modules/sfGuardUser/lib/BasesfGuardUserActions.class.php 5. 6. The files above use the array notation with a parameter holder, 7. which is not supported anymore in symfony 1.4. 8. For instance, you need to change this construct: 9. 10. $foo = $request-getParameter('foo[bar]') 11. 12. to this one: 13. 14. $params = $request-getParameter('foo') 15. $foo = $params['bar']) Should I report to the symfony Bugtracker or is there any other location for sfDoctrineGuard Plugin? fixed. Thanks, Fabien Regards, Christopher. -- You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-us...@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. -- You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-us...@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] deployment question
You're getting auth errors when it's trying to create the files folders - so it's not an issue of keys. As you're coming from a windows machine - you're likely to have an issue when it's trying to set the right perms on the top level folders (-a flag attempts to match the perms from the source to the target). This might help with your issues: http://sial.org/howto/rsync/ and talks about permissions. Otherwise - for the deployment process - it might be an idea to set permissions to be very permissive on the target folder and to set them as sticky - which should then filter down as things are replicated. You'll then need to fix the perms once the sync is done. On Tue, 2009-11-24 at 12:59 -0800, Parijat Kalia wrote: but that did not work eitherYes I use windows btw...Can anyone explain me the steps taken (please not the wiki by symfony) coz that hasn't worked for me. I'll be really greatfull! On Tue, Nov 24, 2009 at 12:27 PM, Gareth McCumskey gmccums...@gmail.com wrote: I guess that you use Windows? The key he is referring to is the SSH key as Gabor has so eloquently explined. You don't however have to use a key as that is just one of the many fine and damned useful authentication mechanisms available. You can use just plain-old username/password authentication as well. On Tue, Nov 24, 2009 at 7:21 PM, Parijat Kalia kaliapari...@gmail.com wrote: Hey guys, on the jobeet deployment page, here is a statement I read (Before running the project:deploy task for the first time, you need to connect to the server manually to add the key in the known hosts file.): Before running the project:deploy task for the first time, you need to connect to the server manually to add the key in the known hosts file. What exactly does he mean that I need to manually connect to the server to add a key?? I guess this is something that is proving to be an obtrusion! -- You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-us...@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 -- You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-us...@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. -- You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-us...@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. -- You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-us...@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] Upgrade path: 1.2 w/sfCompat10Plugin - 1.4
Hi all. I've got a few projects I'd like to upgrade from 1.2 to 1.4. I'm currently using the sfCompat10Plugin on my 1.2 projects. I'm thinking the upgrade path is going to be a 3 step process like this: 1. Get projects working on 1.2 WITHOUT the sfCompat10Plugin. 2. Upgrade projects to 1.3 and verify they work. 3. Upgrade projects to 1.4 and hunt for deprecated features that need fixing. Does this seem like a sensible path? And, is there anywhere I can find a list of all the deprecated features that sfCompat10Plugin provides to use as a checklist in finding and destroying them all? :-) David Brewer -- You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
[symfony-users] Re: Doctrine, MySQL and Latin1. Symfony 1.3
Use something along the line of the following in the top of your schema.yml; options: collate: utf8_unicode_ci charset: utf8 On Mon, 2009-11-16 at 15:34 -0800, MaEcTPo wrote: Hi, I am new on doctrine, and I have a problem. When I run task $: symfony doctrine:build-all I receive in MySQL database tables with latin1 charset. Ok, I go to the phpmyadmin, and change default charset for the database to utf8_general_ci. But after runnig the task I have tables with latin1 again. What can I do for fix it? With propel I didn't have the problem. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Doctrine nestedSet delete with application level cascade
Setup a Doctrine Record Event listener: http://www.doctrine-project.org/documentation/manual/1_1/en/event-listeners#record-listeners Pre or Post Delete - it's up to you. On Mon, 2009-11-09 at 21:02 +0100, Georg Gell wrote: Is there a way to have a table with the nestedSet behaviour cascade it's delete on the application level (like cascade: [delete]? I have a file for each record in the file system that I would like to delete also. Georg --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: form for internationalization
Remove the description from the fields listed in I18n, build-all, clear-cache. On Sun, 2009-11-08 at 03:27 -0800, dziobacz wrote: I have schema.yml: Firm: actAs: I18n: fields: [description, address] columns: id_firm: type: integer(1) primary: true autoincrement: true email: type: string(100) notnull: true description: type: clob notnull: true address: type: clob Symfony generated for me tables: firm: id_firm email firm_translation: id_firm description address lang Nobody know how I can unset i18n field 'description' ? On 7 Lis, 14:53, dziobacz aaabbbcccda...@gmail.com wrote: I have table Firm with columns: id_firm description contact I want 1 textarea in polish for column 'contact' and 1 textarea in english for column 'contact'. I would like to create form to edit column 'contact' so I read this site:http://www.symfony-project.org/jobeet/1_2/Doctrine/en/19 on which was used method configure() to configure form. I would like to use method setUp() to build form by myself so I have made something like that: class ContactForm extends sfFormDoctrine { public function setUp() { $this-embedI18n(array('pl', 'en')); $this-widgetSchema-setLabel('pl', 'Polish'); $this-widgetSchema-setLabel('en', 'English'); $this-widgetSchema['contact'] = new sfWidgetFormTextarea(); $this-widgetSchema['contact']-setAttribute('rows', 20); $this-widgetSchema['contact']-setAttribute('cols', 80); $this-widgetSchema-setNameFormat('data[%s]'); } public function getModelName() { return 'Firm'; } } but $this-embedI18n(array('pl', 'en')); generates 1 textarea in polish for column 'description', 1 in polish for column 'contact', 1 textarea in english for column 'description' , 1 in english for column 'contact' + 1 textarea without language for column 'contact', why ? I want only 1 textarea in polish for column 'contact' and 1 textarea in english for column 'contact'. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: [sf1.3][doctrine 1.2] baseClassName
I've not tried it - but as it's an option does the following not work? Message: options: baseClassName: somethingElse actAs: Timestampable: ~ tableName: messages columns: id: type: integer(4) primary: true autoincrement: true messageType: type: integer(4) subject: type: string(100) details: type: clob On Sat, 2009-11-07 at 12:49 +, Jonathan Franks wrote: baseClassName --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Unable to open PDO connection [wrapped: could not find driver]
Checking out: http://es2.php.net/manual/en/ref.pdo-oci.php Suggests: The PDO_OCI php_pdo_oci8.dll library (for use with Oracle version 8 client libraries) is no longer being built [with PHP 5.3]. Instead, use php_pdo_oci.dll (note no '8') with Oracle 10 or 11 client libraries. Connection to other database versions is still supported. On Wed, 2009-11-04 at 08:22 -0200, Paulo Roberto de Camargo Mello Junior wrote: Hi Deivid, Thank you a lot. But i was checking at Get Started, and I identified I didn't do the step configuration with doctrine (Switching to Doctrine) I mapped my schema with Propel configuration. Well I'll Switch Propel to Doctrine. I hope it can work very well now. Do you have a link or url of documentation that explain to set a oracle configuration and check the drivers? Thank you again! On 11/3/09, Eno symb...@gmail.com wrote: On Tue, 3 Nov 2009, Jota wrote: My last connection was an MySQL connection. It was working very well. But now I had to change to an Oracle connection and this connection is not working. Each type of database server needs its own driver, so: Show me the following error: Unable to open PDO connection [wrapped: could not find driver] shows you dont have PDO driver for Oracle installed. I forgot to configure something? I need to change something? There are a tutorial or documentation that explain this kind of connection? http://us2.php.net/manual/en/pdo.drivers.php -- --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Extending sfDoctrineGuard in 1.3
DoctrineGuard for auth + permissions DoctrineGuardApply for Profiles. Both work well and without any major issues in sf 1.3. With some minor changes the call-the-expert article works also. It's probably best to go back to basics - get Guard installed and working without profiles, ensure you can login and manage users in the backend - do the same for profiles then work on linking the 2. Then you're building on something stable that you know works. On Wed, 2009-11-04 at 02:44 -0800, juro wrote: Thank you for the information. Unfortunately there is no way that I can use sfDoctrineGuard without being able to associate a profile with each user. On Nov 4, 12:41 pm, Alexandre SALOME alexandre.sal...@gmail.com wrote: Yes, It works... try to make it work without the Profile extension. DoctrineGuard as basic as possible. 2009/11/4 juro fo...@juro.at Hi, I am trying to get this http://www.symfony-project.org/blog/2008/11/12/call-the-expert-custom... to work on Symfony 1.3 Everything works aas expected until I try to access http://yourhost/backend_dev.php/sf_guard_user I have figured out that the url should be http://yourhost/backend_dev.php/sfGuardUser but now I get this error: The route sf_guard_user_collection does not exist. Has anyone hay success? juro -- Alexandre Salomé -- alexandre.sal...@gmail.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Doctrine:data-load error: which table, which
jw fixed the bug last night. If you use the svn version of sf 1.3 - you'll receive correct version of doctrine with the fix in :) On Tue, 2009-11-03 at 08:26 +0100, Georg Gell wrote: Sorry, forgot to mention that I am using Doctrine. I am going to upgrade to symfony 1.3 today, if you can send me your patch I would be grateful. Thanks Georg David Ashwood schrieb: Assuming you're using Doctrine - which version of symfony are you using? I have a small patch for 1.3 that gives more detail for errors that I can easily convert to sf 1.2. I mentioned the issues with non-verbose error messages in a Doctrine ticket recently with data imports and I think it's something in the pipeline. On Mon, 2009-11-02 at 11:20 +0100, Georg Gell wrote: Hi, I changed parts of my table definitions to a behaviour, and now doctrine_data-load does not work any more with data, that were previously working. No big problem so far, probably made an error. BUT: The only message I have is this: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1' for key 1 This does not help me, because I have no idea what the problem could be. I tried to run symfony with -t option, but this does not help. How can I find out in which table, in which field and which value should be inserted, when the error occured? Thanks in advance Georg --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Unable to open PDO connection [wrapped: could not find driver]
Looks like you don't have one of the oracle extensions loaded: extension=php_pdo_oci.dll or extension=php_pdo_oci8.dll You'd have to check with the doctrine docco about which one they support/use. On Tue, 2009-11-03 at 10:40 -0800, Jota wrote: My last connection was an MySQL connection. It was working very well. But now I had to change to an Oracle connection and this connection is not working. Show me the following error: Unable to open PDO connection [wrapped: could not find driver] I forgot to configure something? I need to change something? There are a tutorial or documentation that explain this kind of connection? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Doctrine:data-load error: which table, which field, which value???
Assuming you're using Doctrine - which version of symfony are you using? I have a small patch for 1.3 that gives more detail for errors that I can easily convert to sf 1.2. I mentioned the issues with non-verbose error messages in a Doctrine ticket recently with data imports and I think it's something in the pipeline. On Mon, 2009-11-02 at 11:20 +0100, Georg Gell wrote: Hi, I changed parts of my table definitions to a behaviour, and now doctrine_data-load does not work any more with data, that were previously working. No big problem so far, probably made an error. BUT: The only message I have is this: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1' for key 1 This does not help me, because I have no idea what the problem could be. I tried to run symfony with -t option, but this does not help. How can I find out in which table, in which field and which value should be inserted, when the error occured? Thanks in advance Georg --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Check fields without submit
When you generate the field - you'd need to annotate with some kind of markup - which then js could work with for validating in the browser. A simple but crude approach would be to use the class of the element: input ...class=displayClass numeric-30 Then with js - obtain a collection of all classes starting with numeric and parse it's full name for the extra data. On Mon, 2009-11-02 at 06:01 -0800, HAUSa wrote: Is it possible to check form values without the user submitting it? It seems that the validators set in the form class only work when you submit. I want to have that when a user completes a field (onblur), the entered value is checked immediately. I know I can do this with AJAX, but how do I make the call to find the corresponding validator? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Check fields without submit
There's no reason why it can't be abstracted into something generic that works with the existing validation system. A quick search found this: http://blog.adryjanek.eu/2009/01/15/symfony-12-using-sfform-with-jquery-validate-plugin/ Checkout the comments at the end On Mon, 2009-11-02 at 06:26 -0800, HAUSa wrote: Yeah, but it is not in my profit as a developer to develop the validation twice (in JS and PHP). That's why I want to check the value by use of AJAX from the sf Form validator. On 2 nov, 15:16, David Ashwood da...@inspiredthinking.co.uk wrote: When you generate the field - you'd need to annotate with some kind of markup - which then js could work with for validating in the browser. A simple but crude approach would be to use the class of the element: input ...class=displayClass numeric-30 Then with js - obtain a collection of all classes starting with numeric and parse it's full name for the extra data. On Mon, 2009-11-02 at 06:01 -0800, HAUSa wrote: Is it possible to check form values without the user submitting it? It seems that the validators set in the form class only work when you submit. I want to have that when a user completes a field (onblur), the entered value is checked immediately. I know I can do this with AJAX, but how do I make the call to find the corresponding validator? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Check fields without submit
And there appears to be a plugin that does it: http://www.symfony-project.org/plugins/sfJqueryFormValidationPlugin On Mon, 2009-11-02 at 06:26 -0800, HAUSa wrote: Yeah, but it is not in my profit as a developer to develop the validation twice (in JS and PHP). That's why I want to check the value by use of AJAX from the sf Form validator. On 2 nov, 15:16, David Ashwood da...@inspiredthinking.co.uk wrote: When you generate the field - you'd need to annotate with some kind of markup - which then js could work with for validating in the browser. A simple but crude approach would be to use the class of the element: input ...class=displayClass numeric-30 Then with js - obtain a collection of all classes starting with numeric and parse it's full name for the extra data. On Mon, 2009-11-02 at 06:01 -0800, HAUSa wrote: Is it possible to check form values without the user submitting it? It seems that the validators set in the form class only work when you submit. I want to have that when a user completes a field (onblur), the entered value is checked immediately. I know I can do this with AJAX, but how do I make the call to find the corresponding validator? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Custom error messages
You can customize them: http://www.symfony-project.org/forms/1_2/en/02-Form-Validation#chapter_02_sub_customizing_error_messages On Mon, 2009-11-02 at 08:58 -0800, Mark Smith wrote: Is it possible to customise the error message coming from an sfForm so that the contents of the validated field don't get spat back out? I.e. at the moment the getMessage() function is returning: ID [abc is not an integer.] But I would rather have ID is not an integer. Thanks for any help --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Symfony has definitely become too complicated framework
What's the going rate for support from Sensio for an app developed against symfony? On Mon, 2009-11-02 at 19:15 +0200, Alexandru-Emil Lupu wrote: However, symfony is open source ... :) as fabien said ... no one has thought to help financial sensio labs or symfony project ... if is so powerfull and your managers are satisfied about the product, you could try convince them to donate a small amount of money to symfony project ... Unfortunatelly, my manager is not a tech person and also does not understand the donation concept... he's an accountant Alecs On Mon, Nov 2, 2009 at 7:10 PM, Derrek dle...@allofzero.com wrote: I would love to see a TCO study as well. It's just hard to compare. One of my clients that has been resisting symfony/php for a while just opted to have me build a standalone module in it. The module is a reporting tool that seamlessly integrates with their database. The module took a month to build and exposes all of the databases tables (over 200 tables) for statistical processing. I couldn't have built it without symfony + doctrine. It could have taken months or even years on a non-mvc-orm platform. I didn't have to write any form code (because of widgets/validators), sql (because of doctrine) or handle anything but building my own report logic. *and* it works on SQL server and MySQL which is huge since this client is migrating from SQL to MySQL at the same time as releasing this tool. It's so powerful that the client is thinking about selling it as an add-on component as their user base would not need crystal reports or other reporting tools anymore. If you factor in situations like that, symfony would pay for itself dozens or hundreds of times over. --Derrek On Nov 2, 10:25 am, Lee Bolding l...@leesbian.net wrote: OK, now that you've mentioned porting an existing application, I can *kind of* understand that. I'd expect most management to take the approach if it ain't broke, don't fix it - and in their eyes it ain't broke. A while back I was in a similar situation - like you, I tried to explain the case of doing it the correct way (cheaper, faster, easier to maintain, following conventions(!) less risk, etc) but they weren't interested. If I had the time, I'd do a TCO study for my next symfony project - showing how long certain aspects took with symfony, how long they'd have taken without symfony, and how that affected the overall cost/ profitability of the project. It would also be good to see a similar thing to compare different frameworks - after all, apart from availability of developers with experience, the next most important thing about a framework (for management) is how much it's going to cost or save them, isn't it? On 1 Nov 2009, at 21:44,Derrekwrote: Do you know the reason they don't want to use symfony? is it because they want to maintain the application themselves? or with labour cheaper than yourself once it's built? it would be interesting to know... as it could spur on a symfony and TCO study or something. It's a bunch of things. Using symfony would actually let them get less costly help than me once the app is written. The problem I think is the up-front investment in conversion. Most of them have tech guys that are comfortable with how things are now. So the tech guys tell management we don't think it's worth the cost. It's much much *much* (let me reiterate *MUCH*) easier to get management to start with symfony on a new project. But if there is an existing system, even in php, they shy away from it. It may be a good idea to have tutorials for showing how efficiently an app can be re-developed in symfony when coming from another platform. I actually find that it takes me considerably longer to do anything when not using symfony now... validators? security? ORM? ergh. Even simple CRUD applications can be knocked out quickly - remember the
[symfony-users] Re: sfLightboxPlugin close on form submit
np. Don't forget to append a return statement - as you're using the onClick attribute of the input statement. onClick=Modalbox.hide(); return true|false; (depending on what the plugin needs for chaining events). You can also quickly test it with firefox + firebug in the console. On Sat, 2009-10-31 at 22:48 -0400, Martin Settle wrote: Thanks for the pointer, David. I will try that Monday at work Alexandre, I have read all the plugin documentation and also scoured the lightbox2 mailing lists. The two functions I tried were taken from those sources. Neither worked. If you can point me to the references in the documentation that I missed, I would thank you for your advice. Marti 2009/10/31 Alexandre SALOME alexandre.sal...@gmail.com: Other solution would be to try reading documentation :) 2009/10/30 David Ashwood da...@inspiredthinking.co.uk Try: Modalbox.hide(); On Fri, 2009-10-30 at 14:51 -0400, Martin Settle wrote: I've got a form appearing in a lightbox, which calls a remote function and updates the parent page. However, I'd like to have the lightbox close on the submission of the form. I'm trying to use an input=submit onClick=--javascript here-- to close the lightbox, but I can't for the life of me figure out what the javascript function call needs to be. I've tried Modalbox.end() and modalbox.end() Modalbox.close() and modalbox.close() and the same using Lightbox. I get a javascript error each time saying there is no such function. Help, please! Marti -- Alexandre Salomé -- alexandre.sal...@gmail.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Symfony 1.3 and Blameable Doctrine Extension
Unset those fields in the form configure method and it should save. It's failing the form validation before the behaviour has a chance to work. On Sun, 2009-11-01 at 05:24 -0800, Fabrizio wrote: Hi, I have installed Blameable Extension in the folder /lib/doctrine_extensions/Blameable/ from the root of my symfony 1.3 project. in the /config/doctrine/schema.yml I have added the following code TableName: tableName: table_name actAs: Timestampable: Sluggable: ... Blameable: columns: created: name: creato_da type: integer length: 4 updated: name: aggiornato_da type: int length: 4 relations: created: name: CreatoDa class: SfGuardUser disabled: false updated: name: AggiornatoDa class: SfGuardUser disabled: false columns: ... After I have execute a ./symfony doctrine:build-all-reload and clear the cache The fields creato_da and aggiornato_da were created with their relations. But when I try to create a new record with the interface of admin generator, getting an error: The item has not been saved due to some errors $form['creato_da'] (sfWidgetFormDoctrineChoice) Required. $form['aggiornato_da'] (sfWidgetFormDoctrineChoice) Required. This means that the Blameable Extension has not added those fields with related values. What could be the problem? I forgot some configuration to work correctly with symfony? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Symfony 1.3 and Blameable Doctrine Extension
You need to create your own listener that extends from Doctrine_Template_Blameable_Listener and then grab the user id. http://www.doctrine-project.org/extension/Blameable/1_2-1_0 You have a couple of options to get the user id: 1) Use the session object of the app: session: symfony/user/sfUser/attributes: { symfony/user/sfUser/attributes: { }, sfGuardSecurityUser: { user_id: '2' }, admin_module: { package.sort: [null, null] } } symfony/user/sfUser/authenticated: true symfony/user/sfUser/culture: en symfony/user/sfUser/lastRequest: 1256775125 2) (frowned upon) use the sfContext object to get the user object and then the user id: sfContext::getInstance()-getUser() On Sun, 2009-11-01 at 07:40 -0800, Fabrizio wrote: http://www.doctrine- project.org/extension/Blameable --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: setters and getters on doctrine
While it has other issues, the Zend Studio 7 beta works with the the phpdoc. On Sun, 2009-11-01 at 16:54 +0200, Alexandru-Emil Lupu wrote: It seems that there is a changeset that is 1 week old that creates the properties and methods needed. however, they are supported only by the application that are phpdoc 1.4 aware. thanks to [MA]Pascal and Noel for the info. Alecs On Sun, Nov 1, 2009 at 11:56 AM, noel guilbert noelguilb...@gmail.com wrote: Hi, Doctrine is designed to retrieve the fields on the fly as soon as you call for a getter or a setter. So, you won't have hardcoded getters and setters in the base classes. However, since symfony 1.3, the base classes are now IDE-friendly. The model builder adds @method annotations to help the IDE to guess the available methods. On Sun, Nov 1, 2009 at 10:09 AM, Alexandru-Emil Lupu gang.al...@gmail.com wrote: Hi ridcully! I know that we can use a patch , but, that would mean to make harder to upgrade symfony / Doctrine ... Also after an upgrade you might forget to apply the patch. If we are using symfony to write our projects, that does not mean that we haven't looked into sf core at least once. So, i guess that we could patch our symfony core to do cool stuff, but, i guess it would be nicer to be embeded into doctrine core. (to avoid things like 10K symfony users 10K patch versions ... ) Another nasty option wwould be to insert a layer between the object class and baseobject class that would contain the the setters and getters... but ... again is not ok. As said in my previous email, i guess it would be nice that Fabien or Jonathan to give us an explication ... I am sure that they may have a good reason for that, and i am looking forward to find it out. Alecs On Sun, Nov 1, 2009 at 10:53 AM, ridcully ohnhei...@googlemail.com wrote: I think its not implemented, but you can use this Builder Patch : http://coolsoft.altervista.org/en/blog/2009/03/how-make-symfonydoctrine-generate-accessors This Patch works under 1.2.9 in our Project. But there is a Bug in the Builder, when you redeclare the name of the getter/setter with an alias in the schema.yml, this alias getter/ setter will not created. Example: Users: alias: MyUsers The builder will create an getUsers() but not getMyUsers(), the same with an foreignAlias. On Nov 1, 9:42 am, Alexandru-Emil Lupu gang.al...@gmail.com wrote: Hi! I have a question ... Why does not Doctrine creates setters and getters as function in the base classes ? I mean is impossible that a developer know all the fields from a project... If that developer uses an autocomplete capable editor, the work inside a model class it would be (actually it is) painfull. Currently, i am trying to swhitch from propel to doctrine an this is one of the things that i am finding quite hard to do. For example, i have a table that has around 15 fields, and around 10 fields depends on the rest 5. That means is quite time consuming to go in the schema file, get the name for the fields, then go and implementing a function that does the calcs.
[symfony-users] Re: graphviz plugin
The graphviz plugin generates the dot files and images from the db (or container if you're using the component)- rather than generating anything from .dot file. With the doctrine plugin version you just install the plugin as usual and then run the task to generate the files images. On Sun, 2009-11-01 at 15:49 -0500, Juan Pablo Romero Bernal wrote: Hi, I have a sample .dot file which I want to use and I guess I am confused about how I can provide the plugin with this .dot file and how this should be produced. There is not much documentation. What version of Symfony are you running ?? What operating system ?? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Project Management / Support tools
Take a look at Redmine - http://www.redmine.org/ Very decent, works with all scm, multiple projects; public private, it's simple to use and configure and has a nice feel to it. On Sun, 2009-11-01 at 20:52 +, Lee Bolding wrote: Hi Gang, Can anybody recommend a good project management and support tool along the lines of BaseCamp or CodeBase? What I'm after specifically, is something that operates in 2 modes - a public facing mode that allows customers to report and browse outstanding bugs etc (but not assign them, or see who they are assigned to), and a backend that allows us to assign bugs internally and integrates the bug tracker with a version control system, so that we can link specific commits to tickets (like Trac does). Also, ideally I would be able to host it myself, and easily be able to make repositories and projects either public (for open source projects) or private (for commercial projects). I know Trac can do most of this, but it's a real PITA to set up - and setting it up badly gives the public access to browse your repository, which ain't good. Both BaseCamp and CodeBase have the backend part covered, but don't have a public frontend where your customers can report bugs (and I can't host myself). Any suggestions? Thanks... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Project Management / Support tools
It requires getting your hands a little dirty but yep. It's a standard MVC based ruby app - so you can customize the views with your own. There's some general info about it here: http://www.redmine.org/boards/3/topics/show/4283 On Mon, 2009-11-02 at 01:19 +, Lee Bolding wrote: Thanks... that looks promising. Just a quick question, as I'm playing with adding issues as a customer... is it possible to hide or deactivate status, priority, assigned to, start date, due date, estimated time etc fields? If you can, that looks like it could be perfect On 1 Nov 2009, at 23:26, David Ashwood wrote: Take a look at Redmine - http://www.redmine.org/ Very decent, works with all scm, multiple projects; public private, it's simple to use and configure and has a nice feel to it. On Sun, 2009-11-01 at 20:52 +, Lee Bolding wrote: Hi Gang, Can anybody recommend a good project management and support tool along the lines of BaseCamp or CodeBase? What I'm after specifically, is something that operates in 2 modes - a public facing mode that allows customers to report and browse outstanding bugs etc (but not assign them, or see who they are assigned to), and a backend that allows us to assign bugs internally and integrates the bug tracker with a version control system, so that we can link specific commits to tickets (like Trac does). Also, ideally I would be able to host it myself, and easily be able to make repositories and projects either public (for open source projects) or private (for commercial projects). I know Trac can do most of this, but it's a real PITA to set up - and setting it up badly gives the public access to browse your repository, which ain't good. Both BaseCamp and CodeBase have the backend part covered, but don't have a public frontend where your customers can report bugs (and I can't host myself). Any suggestions? Thanks... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Migration to Symfony 2.0
It's not that surprising. People are excited about it, thinking longer term - planning ahead. Sf 2.0 is being demo'd at conferences - of course it's going to stir interest :) On Sat, 2009-10-31 at 16:00 -0700, Hugo Hamon wrote: I don't know why developpers already think about how they will migrate their applications to Symfony 2.0 as this new framework will definitively be different as symfony 1.0. Furthermore, Symfony is plan to be released about at the end of 2010. So from today to the next year, Symfony 2.0 will change a lot and it will be an other framework. I think you should worry about to migrate to symfony 1.4 to take benefit of the long time support and think about how you can extend symfony 1.3/1.4 to suite your needs. If you really want to use Doctrine 2.0, which is still in alpha version, there is a special plugin for symfony 1.3. Hugo. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: sfValidatorDoctrineUnique Is there any way to add criteria..
In your form class you'll need something like: public function configure() { parent::configure(); // Common Validation if ($this-isNew) { // extra validation for new objects } else { // extra validation for existing objects } } On Fri, 2009-10-30 at 03:44 -0700, ravi wrote: Hello everyone, I am using sfValidatorDoctrineUnique to validate unique username and i am going to implement to edit the username. so at the time when form comes to edit the user and if i will not change the username then also it gives me the error for uniquenes.. if any one know how to skip a single record for sfValidatorDoctrineUnique while editing the form. for example.. user:- ravi pass:- ravi and if am going to edit the user then without changing username if press save button then it will validate the the value ravi with my own value ravi and throws error.. so is there any way to compare the newly updated record with all records except the edited one. thanx in advance.. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: sfValidatorDoctrineUnique Is there any way to add criteria..
I'm a little confused about what you're actually trying to achieve but in your situation it's probably simplest to use a sfValidatorCallback. Which will allow you to run you own custom logic. http://www.symfony-project.org/forms/1_2/en/B-Validators#chapter_b_sub_sfvalidatorcallback There you can check if the value has changed - and if so - to check against Doctrine if the new field is valid. On Fri, 2009-10-30 at 06:02 -0700, ravi wrote: thanx for the reply david.. but that is not what i need.. i want to use the sfValidatorDoctrineUnique validator for username field. and at the same time i also want that one user can edit his/her user name.. so at the time of edit the user.. when one submits without changing the username it will throw the error for Username already exist... which means that the same recording is validating itself.. On Oct 30, 5:25 pm, David Ashwood da...@inspiredthinking.co.uk wrote: In your form class you'll need something like: public function configure() { parent::configure(); // Common Validation if ($this-isNew) { // extra validation for new objects } else { // extra validation for existing objects } } On Fri, 2009-10-30 at 03:44 -0700, ravi wrote: Hello everyone, I am using sfValidatorDoctrineUnique to validate unique username and i am going to implement to edit the username. so at the time when form comes to edit the user and if i will not change the username then also it gives me the error for uniquenes.. if any one know how to skip a single record for sfValidatorDoctrineUnique while editing the form. for example.. user:- ravi pass:- ravi and if am going to edit the user then without changing username if press save button then it will validate the the value ravi with my own value ravi and throws error.. so is there any way to compare the newly updated record with all records except the edited one. thanx in advance.. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Polls with Doctrine
The search facility on the sf plugins page is pretty decent: http://www.symfony-project.org/plugins/sfDoctrinePollPlugin It's only for sf 1.0 - might work with later versions - otherwise you'll need to bring it up to speed :) On Fri, 2009-10-30 at 10:26 -0300, Nelson Luis wrote: Does Anybody know a plugin to create and manage polls with Doctrine? Thanks! Nelson Luis Rodrigues Pereira Bacharel em Ciência da Computação Desenvolvedor Grupo Agência www.grupoagencia.com.br --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Polls with Doctrine
Attached is an updated package file for it. I've not tested the actual plugin - to see if it works - but the attached package should be installable with symfony package:install filename You'll need to copy the file somewhere and to change the filename in the above to point to the correct folder/file. On Fri, 2009-10-30 at 10:26 -0300, Nelson Luis wrote: Does Anybody know a plugin to create and manage polls with Doctrine? Thanks! Nelson Luis Rodrigues Pereira Bacharel em Ciência da Computação Desenvolvedor Grupo Agência www.grupoagencia.com.br --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~--- sfDoctrinePollPlugin-1.0.1.tgz Description: application/compressed-tar
[symfony-users] Re: sfLightboxPlugin close on form submit
Try: Modalbox.hide(); On Fri, 2009-10-30 at 14:51 -0400, Martin Settle wrote: I've got a form appearing in a lightbox, which calls a remote function and updates the parent page. However, I'd like to have the lightbox close on the submission of the form. I'm trying to use an input=submit onClick=--javascript here-- to close the lightbox, but I can't for the life of me figure out what the javascript function call needs to be. I've tried Modalbox.end() and modalbox.end() Modalbox.close() and modalbox.close() and the same using Lightbox. I get a javascript error each time saying there is no such function. Help, please! Marti --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: How do I hush up noisy Symfony tasks?
How about just turning off logging during your task and enabling it again when it's done with sfConfig::get set? On Fri, 2009-10-30 at 17:07 -0400, Tom Boutell wrote: I've written a task that needs privileges that are normally checked for based on the identity of the current user. So I set up an identity just for the tasks, and that's working fine: $context = sfContext::createInstance($this-createConfiguration($options['application'], $options['env'])); $context-getUser()-signin(Doctrine::getTable('sfGuardUser')-findOneByUsername('pktaskuser'), false); However, when I create an application configuration like this, Symfony logs a whole slew of information about the routing table. And all of that information winds up at the console: sfPatternRouting Connect sfDoctrineRoute pk_user_admin (/admin/user.:sf_format) sfPatternRouting Connect sfDoctrineRoute pk_user_admin_new (/admin/user/new.:sf_format) sfPatternRouting Connect sfDoctrineRoute pk_user_admin_create (/admin/user.:sf_format) sfPatternRouting Connect sfDoctrineRoute pk_user_admin_edit (/admin/user/:id/edit.:sf_format) ... etc etc etc. I've done enough digging to know that this is coming from the command line task logging handler. Command line tasks should be quiet when everything is working as it should. Is there a way to shut off this noisy logging without disabling actual logging during web access to the app? (Perhaps it would run quieter if the environment was not dev? In that case I can live with it in dev, knowing it will shut up on production.) Thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: How do I hush up noisy Symfony tasks?
$loggingStateBefore = sfConfig::set('sf_logging_enabled',false); sfConfig::set('sf_logging_enabled' ,false); // // Your process ideally in a try/catch to ensure you can re-enable it // again // sfConfig::set('sf_logging_enabled',$loggingStateBefore); I think there are only 2 settings you might need to record/set: sf_logging_enabled sf_debug On Fri, 2009-10-30 at 17:07 -0400, Tom Boutell wrote: I've written a task that needs privileges that are normally checked for based on the identity of the current user. So I set up an identity just for the tasks, and that's working fine: $context = sfContext::createInstance($this-createConfiguration($options['application'], $options['env'])); $context-getUser()-signin(Doctrine::getTable('sfGuardUser')-findOneByUsername('pktaskuser'), false); However, when I create an application configuration like this, Symfony logs a whole slew of information about the routing table. And all of that information winds up at the console: sfPatternRouting Connect sfDoctrineRoute pk_user_admin (/admin/user.:sf_format) sfPatternRouting Connect sfDoctrineRoute pk_user_admin_new (/admin/user/new.:sf_format) sfPatternRouting Connect sfDoctrineRoute pk_user_admin_create (/admin/user.:sf_format) sfPatternRouting Connect sfDoctrineRoute pk_user_admin_edit (/admin/user/:id/edit.:sf_format) ... etc etc etc. I've done enough digging to know that this is coming from the command line task logging handler. Command line tasks should be quiet when everything is working as it should. Is there a way to shut off this noisy logging without disabling actual logging during web access to the app? (Perhaps it would run quieter if the environment was not dev? In that case I can live with it in dev, knowing it will shut up on production.) Thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: core.php/ not working
Do you have the zend debugger installed on the server? Check your web server (apache) error logs for Zend Debugger entries when you use the page with Opera. Sometimes the Zend debugger gets stuck trying to communicate with the server side module - clearing your Opera cookies for your site will fix it. On Thu, 29 Oct 2009 05:38:50 +0100, Avani avani.v.puj...@gmail.com wrote: Hey, this is the problem only with opera, in other browsers, its working ok. On Oct 29, 12:12 pm, Avani avani.v.puj...@gmail.com wrote: Hi friends, In my application, I am facing some strange problem I have a link profile a href=?php echo url_for('profile/index'); ? Profile/a When I run the site, when I click on profile link, it goes to myprojecturl/core.php/ and shows blank page. when I press refresh button, it shows profile page properly. why is it so? Any idea? -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ --~--~-~--~~~---~--~~ 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] Duplicate entry exception when save a form with embedI18n
Hello, I have a problem today when I try to save a form with two i18n embed forms. # Context : symfony : 1.3.0-DEV php: 5.2.6-3ubuntu4.2 SERVER_SOFTWARE: 'Apache/2.2.11 (Ubuntu) PHP/5.2.6-3ubuntu4.2 with Suhosin-Patch' os: 'Linux tux 2.6.28-16-generic #55-Ubuntu SMP Tue Oct 20 19:48:24 UTC 2009 i686' # The error message : SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '4-fr' for key 1 # Submited data to that form (parameter of bindAndSave) : Array ( [en] = Array ( [name] = Nom_en ) [fr] = Array ( [name] = Nom_fr ) [id] = 4 ) # When I'm looking in the save process, I noticed that the object take theses values just after the doUpdateObject method (sfFormDoctrine, line 129): Array ( [id] = 4 [created_at] = 2009-10-26 15:34:11 [updated_at] = 2009-10-28 10:06:26 [Translation] = Array ( [en] = Array ( [id] = 4 [name] = [lang] = en ) [fr] = Array ( [id] = 4 [name] = [lang] = fr ) [fr_FR] = Array ( [id] = 4 [name] = [lang] = fr_FR ) ) ) Two problems : 1. Why fr_FR array appears ? 2. Why traduction (name) are empty ? # The form declaration : classTotoForm extends BaseTotoForm { public function configure() { $this-embedI18n(array('en', 'fr')); } } # The object declaration in the schema.yml Toto: actAs: Timestampable: I18n: fields: [name] columns: name: string(255) --- thanks for your support. Cordialy, David BOUCHÉ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: sfDoctrineApplyPlugin version 1.1.0: a significant security improvement, and a change of mailer
Cool - great to see it ready for sf 1.3 On Wed, 28 Oct 2009 18:49:21 +0100, Tom Boutell t...@punkave.com wrote: Version 1.1.0 of sfDoctrineApplyPlugin has been released. Two important changes you need to understand before upgrading: 1. A security improvement. Previously usernames and full names were not validated apart from their length. Now usernames are required to contain only word characters (letters, digits and underscores), and full names may still contain a wide range of characters but never these: | The first three should be self-explanatory: full names are now safe to echo unescaped. Many devs probably weren't doing that, but I suspect that most devs were echoing usernames unescaped (they are validated to be safe in most systems). So they will definitely want this upgrade. We have provided a task to clean up existing usernames and full names. This task produces a report to help you inform any users who need to be notified that their username has changed: ./symfony sfDoctrineApply:clean-names 2. sfDoctrineApplyPlugin now uses Zend Mail. We are using it because at the time we made the decision to switch, SwiftMail had not yet been taken under Fabien's wing, our other plugins already required Zend, SwiftMail 3.0 had been terminated and we didn't want to require two external libraries where one would do. This change requires a few modifications to your app.yml if you are specifying an alternate mailer. If you are using the default mailer you will not need to make changes, apart from installing Zend if you do not already have it (for instance, for search). Today, of course, we know that SwiftMail is blessed by Fabien and will be included in Symfony 1.3. So I understand if you find this change a little odd. However, you can easily override our use of Zend Mail by subclassing the sfApply controller class in your application. * * * Why did you forbid | in full names? We forbade | because it is part of our favorite microformat for lists of unambiguous full names in sfGuard apps: John Doe (jdoe) | Jane Smith (jsmith) | John Doe (jdoe2) This is handy when passing lists of users as form fields etc. and allows for nifty progressive enhancement stuff on the client side. -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Symfony output escaping in the templates of plugins
Use the sfOutputEscaper - it's smart enough to know if it's been escaped or not already and won't double escape. On Wed, 28 Oct 2009 19:52:46 +0100, Tom Boutell t...@punkave.com wrote: I write plugins which other people use in their Symfony apps. They might be using any of the possible escaping_strategy settings. I need a consistent way to access the escaped and non-escaped forms of the variables and request fields, REGARDLESS of that setting, because I don't want to force a particular setting on third-party devs but I don't want to fail to escape things properly either. The documentation says that $sf_data is only defined for certain escaping strategies. Writing this everyplace I need raw access: isset($sf_data) ? $sf_data-getRaw('foo') : $foo Is not practical. Neither is: isset($sf_data) ? $sf_data-get('foo') : htmlspecialchars($foo) In all the places where I DO want escaping. Is there a clean way to do this? Should I require users of my plugins to use the 'bc', 'on', 'or 'both' strategies and specifically refuse to support 'off'? This might not be too awful, since 'bc' is the default, but I'd hate to tell people they can't choose an escaping strategy of their choice in their own code for performance reasons, as the documentation says. Maybe I can specify an alternate escaping strategy on a per-module basis somehow? Any help appreciated, thanks! -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Custom fixtures for migrations
Yep - you can: http://www.doctrine-project.org/documentation/manual/1_0/en/migrations Migrations are just classes with interface methods - there's a pre/post hook that allows you to extract save or import load data. On Tue, 27 Oct 2009 15:57:42 +0100, Simone Fumagalli simone.fumaga...@gmail.com wrote: Is there a way to specify fixtures to use when my database migrate from version N to M ? Let's say migrating to version M from version N add a table to my database, I would like to specify a fixtures to add data in that table. Regards. -- Simone -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ --~--~-~--~~~---~--~~ 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] sf 1.3 - loading fixtures
Just an fyi - there appears to be a small issue with Doctrine 1.2 when loading fixtures when child labels are reused. You'll get an unrelated error message that might lead you down the wrong path (in my case a null field error). In earlier versions of Doctrine the fixtures loaded without problems. Making the nested labels unique in the fixtures file bypasses the issue (ie invItem01, etc). An example of a fixture fragment that will cause the problem: Invoice: testInvoice01: billingDate: 2009-11-11 dueDate: 2009-11-16 owningAccount: TestAcc01 invoiceItems: invItem01: name: TestLine01 quantity: 2 cost: 12.99 invItem02: name: TestLine02 quantity: 1 cost: -2.50 testInvoice02: billingDate: 2009-11-11 dueDate: 2009-11-21 owningAccount: TestAcc01 invoiceItems: invItem01: name: TestLine03 quantity: 2 cost: 12.99 invItem02: name: TestLine04 quantity: 1 cost: -2.50 Doctrine Bug Tracking Reference: http://www.doctrine-project.org/jira/browse/DC-147 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: using fixtures with images and audio files
Nope. Generally it's not a good idea to load files into a database. The usual approach is to load the pathname into the database - loading binary data into a database is possible - but not optimal. On Tue, 27 Oct 2009 20:23:37 +0100, el-sid sydneyari...@gmail.com wrote: hi all, i have a system im working on that allows loading images and mp3 files into a mysql database. what i want to know is, is it possible to load sample files into the db using fixtures? -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: DOCTRINE - load data to tables which has got a relation !!
If you add a foreign alias to your relation then it's even easier... relations: sfGuardUser: class: sfGuardUser local: user_id foreign: id type: one onDelete: CASCADE onUpdate: CASCADE foreignAlias: Profile sfGuardUser: dziobacz: id: 1 username: dziobacz password: haslo12 Profile: name: Barney Flintstone On Mon, 26 Oct 2009 11:51:02 +0100, dziobacz aaabbbcccda...@gmail.com wrote: I have got table sfGuardUser and sfGuardUserProfile. Table sfGuardUserProfile in schema.yml: sfGuardUserProfile: columns: id: type: integer(4) primary: true autoincrement: true user_id: type: integer(4) default: '' notnull: true unique: true name: type: string(50) default: '' notnull: true email: type: string(50) default: '' notnull: true unique: true relations: sfGuardUser: class: sfGuardUser local: user_id foreign: id type: one onDelete: CASCADE onUpdate: CASCADE I have got file 10_user.yml: sfGuardUser: dziobacz: id: 1 username: dziobacz password: haslo123 And file 20_profile.yml: sfGuardUserProfile: dziobacz: user_id: 1 name: xyz email: x...@gmail.com And when I try to load data: php symfony doctrine:data-load I get error: General error: 1452 Cannot add or update a child row: a foreign key constraint fails ('dziobaczmodule/sf_guard_user_profile', CONSTRAINT 'sf_guard_user_profile_ibfk_1' FOREIGN KEY ('user_id') REFERENCE 'sf_guard_user' ('id') ON DELETE CASCADE ON UPDATE CASCADE) I can't add row to table sfGuardUserProfile - is it normal ?? -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Multiple cultures
The trick with cultures is knowing what happens when, the reasons why - and understanding where your code fits into the cycle. There's a negotiation that happens between the browser and the server - where they quiz each other about what cultures the browser has been configured with - and what the server can provide. Note: Often users don't know how to change or set the culture - so if they have installed their browser from a default, non-locale aware source, it'll report the wrong culture. ie: Many browsers have en_US as a default (because it was installed from a fast US server an a en_US package) - even though the user is actually on a es_AR culture OS somewhere in Argentina. The site will also have a list of cultures that it supports (you don't often have every language available). sf can auto-magically workout which culture to use using negotiation between what the site supports and what the user understands - checkout http://www.symfony-project.org/book/1_2/13-I18n-and-L10n#chapter_13_sub_determining_the_culture_automatically for more info. You will however still need to provide a way for users to change culture due to the inaccuracy of browser cultures. On Mon, 26 Oct 2009 11:21:42 +0100, HAUSa jeroen_heeft_behoefte_aan_r...@hotmail.com wrote: Is it possible to set multiple cultures for users? For example first the culture FR, then the culture EN. When a Propel object is not available in FR, it automatically takes the EN value. -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Multiple cultures
Which means that the list of preferred cultures comes from the advert - rather than from the site On Mon, 26 Oct 2009 21:12:56 +0100, HAUSa jeroen_heeft_behoefte_aan_r...@hotmail.com wrote: That is not what I mean. When a user submits an advertisement, he/she must enter it in his own local language (for example FR) and for EN. When a dutch user (language NL) views the advertisement, there will ofcourse be no NL i18n content be submitted. So then Symfony has to display the EN info. But when another French (FR) user visits the same advertisement, the FR info is available so it has to show the FR content. On 26 okt, 12:51, david da...@inspiredthinking.co.uk wrote: The trick with cultures is knowing what happens when, the reasons why - and understanding where your code fits into the cycle. There's a negotiation that happens between the browser and the server - where they quiz each other about what cultures the browser has been configured with - and what the server can provide. Note: Often users don't know how to change or set the culture - so if they have installed their browser from a default, non-locale aware source, it'll report the wrong culture. ie: Many browsers have en_US as a default (because it was installed from a fast US server an a en_US package) - even though the user is actually on a es_AR culture OS somewhere in Argentina. The site will also have a list of cultures that it supports (you don't often have every language available). sf can auto-magically workout which culture to use using negotiation between what the site supports and what the user understands - checkout http://www.symfony-project.org/book/1_2/13-I18n-and-L10n#chapter_13_s... for more info. You will however still need to provide a way for users to change culture due to the inaccuracy of browser cultures. On Mon, 26 Oct 2009 11:21:42 +0100, HAUSa jeroen_heeft_behoefte_aan_r...@hotmail.com wrote: Is it possible to set multiple cultures for users? For example first the culture FR, then the culture EN. When a Propel object is not available in FR, it automatically takes the EN value. -- Using Opera's revolutionary e-mail client:http://www.opera.com/mail/ -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---