[symfony-users] Re: practical symfony guide 1.4 routing (or apache?) question
I do have it enabled. If I browse to just http://jobeet.artemisu.local/ it works, but when I include the other items in the url (such as when looking up a job, as mentioned in the first email) it does not work. Any other ideas? On Jun 11, 12:55 am, pghoratiu wrote: > Check if you have mod_rewrite enabled in your apache setup. > > gabriel > > On Jun 10, 2:48 am, Marvin Frederickson > > wrote: > > I'm up to day 5 (page 69) in the guide. When I browse to > > http://jobeet.artemisu.local/ the job list comes up fine. But when I > > click on the first job in the list, I get an apache page not found > > error. The url is this: > > >http://jobeet.artemisu.local/job/sensio-labs/paris-france/1/web-devel... > > > It works fine if I include the index.php or frontend_dev.php filename > > in the url, but not if I omit it. Why is that? And how can I fix it? > > > Thanks. -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] Re: mediatemnple Dv server symfony deployment
I succesfully deploy the result of the jobeet tutorial on a shared host, so after change the connections, and there's no errors about require some file, and you have just a blank page in the browser you may try to delete the content of the cache folder or if you have ssh just clear cache and then it should work. Silviu On Jun 11, 7:12 am, fRAnKEnSTEin wrote: > Hi there, > > Does any body knows any tutorial/guide/page or something that explains > how to deploy a Symfony(v1.4) project in a dedicated virtual (dv 3.5) > mediatemple server? > > At the moment i have just uploaded the project to my dv server, chaged > the Db configuration like this pgae explains: > > http://www.symfony-project.org/jobeet/1_2/Doctrine/en/23 > > But all i see is a blank page, i already turned off phph safe_mode, > but still nothing. > > Any idea will be very apreciatted. > > Cheers -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] Re: sfWidgetFormInputHidden is not visible
Even better coding would be to not include the user_id as a hidden input at all, since it can be manipulated by the user(of course, unless you intend it to be changeable) - you can simply fetch the user id in the action accepting the form. On Jun 11, 4:10 pm, "Christopher Schnell" wrote: > Hi, > > apart from a solution to your question: This is bad coding. Try passing the > user_id as an option to the form from the action like: > > $myForm=new xyzForm(null,array('user_id'=>$this->getUser()->getId())); > > And in the form: > $this->setDefault('user_id',$this->getOption('user_id')); > > Please > read:http://eatmymonkeydust.com/2009/08/symfony-forms-flexible-widgets-bas... > ser-credentials/ -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, 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] Forcing a canonical hostname for absolute links without clobbering the entire context: possible?
Hi, Is any solution has been found to get absolute links has Tom request ? Thanks, Olivier > -Message d'origine- > De : symfony-users@googlegroups.com [mailto:symfony- > us...@googlegroups.com] De la part de Tom Boutell > Envoyé : vendredi 13 novembre 2009 23:35 > À : symfony-users@googlegroups.com > Objet : [symfony-users] Forcing a canonical hostname for absolute links > without clobbering the entire context: possible? > > > I need to send emails from tasks, with valid links in them. Out of the > gate, link_to produces bad absolute URLs because of course it has no > idea what the site is called. > > I have read that this can be solved in the following fashion in > factories.yml: > > prod: > routing: > class: sfPatternRouting > param: >context: > host: www.pogil.org > > Unfortunately this seems to be a hard override of the entire context > hash. Once it's done, Symfony won't populate it with runtime > information like 'method'. > > The end result (perhaps among others) is that Doctrine routes break > for users who are browsing the prod frontend controller. > > I guess I could work around this by creating duplicate environments > just for command line work on each server: prod_cli, dev_cli, > staging_cli, etc. But that requires a large amount of very error-prone > duplication, in many configuration files. > > Is there an alternative way to fix the URLs generated by link_to which > will work without overriding everything else in context and therefore > making it an unusable technique in an environment that does get used > in web controllers? > > I'd think being able to force a canonical site name in links would be > a good feature anyway. > > Thanks! > > -- > Tom Boutell > P'unk Avenue > 215 755 1330 > punkave.com > window.punkave.com > > --~--~-~--~~~---~--~~ > You received this message because you are subscribed to the Google Groups > "symfony users" group. > To post to this group, send email to symfony-users@googlegroups.com > To unsubscribe from this group, send email to symfony- > users+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/symfony-users?hl=en > -~--~~~~--~~--~--~--- -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] Re: css/js/images on different server
I don't know whether there is a better solution, I am using the same method for a similar scenario for development / production. As long as the sfConfig is cached properly it is a viable solution I think, otherwise you might notice performance going down. It will probably affect performance in comparison to direct links to your images / css files, I guess you have to test it to see whether it becomes an issue for 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
[symfony-users] Re: Symfony2 ->" The service "database_connection" does not exist."
I found the solution: with PHP 5.3;the server can not be called 'localhost'; I looked for all occurrences in "localhost"and I replaced by "127.0.0.1" and the problem is solved, I go to my database. Thanks. -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] Re: GuardUser in doctrine class
On 6 Giu, 16:14, Alvaro Garcia wrote: > In my doctrine class (lib/model/doctrine/XXX.class.php) I have overwritten > the constructor. > The reason is I need to validate that an user can load this object > (photograph in my case). > Then, when I load a collection of photographs ($photoAlbum->getPhotos()) the > constructor > check the permissions. > > To do it I need that the doctrine class can access to the sfGuardUser. > Is there any possibility for this class to access the user without being > passed as a parameter? That's a bad idea. You should perform a such control in your controller, not in the model. The object should know anything about the current user. I suggest you to write a method like this one in you model class: public function checkUser(sfGuardUser$user) { return $this->getUser()->getid() == $user->getId(); } and then in you action public function executeFoo(sfWebRequest $request) { $this->object = $this->getRoute()->getObject(); $this->forwardUnless($this->obejct->checkUser($this->getUser()- >getGuardUser()), sfConfig::get('sf_secure_module'), sfConfig::get('sf_secure_action')); } cheers Massimiliano -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
AW: [symfony-users] sfWidgetFormInputHidden is not visible
Hi, apart from a solution to your question: This is bad coding. Try passing the user_id as an option to the form from the action like: $myForm=new xyzForm(null,array('user_id'=>$this->getUser()->getId())); And in the form: $this->setDefault('user_id',$this->getOption('user_id')); Please read: http://eatmymonkeydust.com/2009/08/symfony-forms-flexible-widgets-based-on-u ser-credentials/ Regards, Christopher. P.S: It might help, if you said something like hello and goodbye :-) -Ursprüngliche Nachricht- Von: symfony-users@googlegroups.com [mailto:symfony-us...@googlegroups.com] Im Auftrag von DC Gesendet: Freitag, 11. Juni 2010 14:47 An: symfony users Betreff: [symfony-users] sfWidgetFormInputHidden is not visible I`m using: $this->widgetSechema['user_id'] = new sfWidgetFormInputHidden(); $this->setDefault('user_id', sfContext::getInstance()->getUser()- >getGuardUser()->getId()); in order for the "user_id" field to be invisible, and automatically populated, but instead it shows as a text input, with the value correctly set. -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, 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: mediatemnple Dv server symfony deployment
I'd say you should probably check frontend_dev.php for information. On Jun 11, 7:13 am, fRAnKEnSTEin wrote: > using the "frontend_dev.php" i get: > > You are not allowed to access this file. Check frontend_dev.php for > more information. > > any idea? -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, 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] sfWidgetFormInputHidden is not visible
I`m using: $this->widgetSechema['user_id'] = new sfWidgetFormInputHidden(); $this->setDefault('user_id', sfContext::getInstance()->getUser()- >getGuardUser()->getId()); in order for the "user_id" field to be invisible, and automatically populated, but instead it shows as a text input, with the value correctly set. -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, 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] SOAP: Calling a web service
I created a sample webservice by using the ckwebservices plugin.The functional test given in the plugin documentation was run succesfully. I tried to call this webservice using $client = new SoapClient('http://localhost:9095/MathApi.wsdl'); $response = $client- >__soapCall('simpleMultiply',array('a'=>1,'b'=>2)); But null is returned always. Please let me know if I am doing something wrong while calling the web service . The content of my wsdl file is given below. http://schemas.xmlsoap.org/wsdl/"; xmlns="http://schemas.xmlsoap.org/wsdl/"; xmlns:xsd="http://www.w3.org/ 2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"; name="MathApi" targetNamespace="http://localhost:9095/MathApi.php/"; xmlns:tns="http://localhost:9095/MathApi.php/"; xmlns:soapenc="http:// schemas.xmlsoap.org/soap/encoding/"> http://www.w3.org/2001/XMLSchema";> http://www.w3.org/2001/XMLSchema"; xmlns="http://www.w3.org/2001/XMLSchema"; targetNamespace="http:// localhost:9095/MathApi.php/"> http://www.w3.org/2001/XMLSchema"; name="ComplexNumberElement" type="tns:ComplexNumber"/> http://www.w3.org/2001/XMLSchema"; name="ComplexNumberArrayElement" type="tns:ComplexNumberArray"/> http://schemas.xmlsoap.org/wsdl/soap/"; name="MathApiBinding" type="tns:MathApiPortType"> http://schemas.xmlsoap.org/wsdl/soap/"; style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/> http://schemas.xmlsoap.org/wsdl/soap/"; name="simpleMultiply"> http://schemas.xmlsoap.org/wsdl/ soap/" soapAction="http://localhost:9095/MathApi.php/simpleMultiply"; style="rpc"/> http://schemas.xmlsoap.org/wsdl/soap/";> http://schemas.xmlsoap.org/wsdl/soap/"; parts="a b" use="literal" namespace="http://localhost:9095/ MathApi.php/" encodingStyle="http://schemas.xmlsoap.org/soap/ encoding/"/> http://schemas.xmlsoap.org/wsdl/soap/";> http://schemas.xmlsoap.org/wsdl/soap/"; parts="result" use="literal" namespace="http://localhost:9095/ MathApi.php/" encodingStyle="http://schemas.xmlsoap.org/soap/ encoding/"/> http://schemas.xmlsoap.org/wsdl/soap/"; name="ComplexMultiply"> http://schemas.xmlsoap.org/wsdl/ soap/" soapAction="http://localhost:9095/MathApi.php/ComplexMultiply"; style="rpc"/> http://schemas.xmlsoap.org/wsdl/soap/";> http://schemas.xmlsoap.org/wsdl/soap/"; parts="input" use="literal" namespace="http://localhost:9095/ MathApi.php/" encodingStyle="http://schemas.xmlsoap.org/soap/ encoding/"/> http://schemas.xmlsoap.org/wsdl/soap/";> http://schemas.xmlsoap.org/wsdl/soap/"; parts="result" use="literal" namespace="http://localhost:9095/ MathApi.php/" encodingStyle="http://schemas.xmlsoap.org/soap/ encoding/"/> http://schemas.xmlsoap.org/wsdl/soap/"; name="MathApiService"> http://schemas.xmlsoap.org/wsdl/soap/"; name="MathApiPort" binding="tns:MathApiBinding"> http://schemas.xmlsoap.org/wsdl/soap/"; location="http://localhost:9095/MathApi.php/MathApi.php"/> Thanks in advance, Dijil -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, 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: mediatemnple Dv server symfony deployment
On 06/11/2010 09:56 AM, fRAnKEnSTEin wrote: Hi, Ok i have deleted that limitation, now i can load the "frontend_dev.php" file but all i can see is a blank page :( Any idea? cheers Clean the cache. -- Javi Ubuntu 8.04 - Symfony 1.3 -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, 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: css/js/images on different server
does nobody have experience with such a server setup? I'd really be glad for some help, even if it's just telling me that my idea is not as bad as I think ;-). cheers, lea On Jun 10, 2010, at 14:30 , Lea Haensenberger wrote: > Hi all, > on our live server we'd like to have all the css, js and image files > on a different server than the application server itself. On our local > installations we, however, still wanna use the files in the web folder > in the application itself. > Is there a way to define the root path/url for those files based on > the environment? > My idea was to have a variable defining this root in some settings.yml > or app.yml and just prefix every entry in the view.yml with that > variable. e.g. > > app.yml: > all: > css_root: '' > prod: > css_root: 'http://files.server.com/css' > > view.yml > default: > stylesheets: >"" > > Is there a better solution? > > Cheers, > Lea > > -- > If you want to report a vulnerability issue on symfony, please send it to > security at symfony-project.com > > You received this message because you are subscribed to the Google > Groups "symfony users" group. > To post to this group, send email to symfony-users@googlegroups.com > To unsubscribe from this group, 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: sfPropel15Plugin won't install
It was too simple, I am not used. Thanks. On 11 juin, 10:49, Gábor Fási wrote: > It means you have to download the plugin either from svn, or as a .tgz > file from the website. The latter one is easier, here's the > link:http://plugins.symfony-project.org/get/sfPropel15Plugin/sfPropel15Plu... > > Unpack it to your project's plugins directory, then open your > config/ProjectConfiguration.class.php in your editor, and look for a > line like this: > > $this->enablePlugins(array('sfPropelPlugin')); > > change it to: > > $this->enablePlugins('sfPropel15Plugin'); > > according to the plugin's readme, you'll also need to change the path > of the symfony behaviors in the config/propel.ini file of your > project: > > propel.behavior.symfony.class = > plugins.sfPropel15Plugin.lib.behavior.SfPropelBehaviorSymfony > propel.behavior.symfony_i18n.class = > plugins.sfPropel15Plugin.lib.behavior.SfPropelBehaviorI18n > propel.behavior.symfony_i18n_translation.class = > plugins.sfPropel15Plugin.lib.behavior.SfPropelBehaviorI18nTranslation > propel.behavior.symfony_behaviors.class = > plugins.sfPropel15Plugin.lib.behavior.SfPropelBehaviorSymfonyBehaviors > propel.behavior.symfony_timestampable.class = > plugins.sfPropel15Plugin.lib.behavior.SfPropelBehaviorTimestampable > > clear your cache, do a `plugin:publish-assets`, rebuild your models > and you are done. > > On Thu, Jun 10, 2010 at 15:42, lecochien wrote: > > Hi, > > (it's my first question, be indulgent ;-) > > Ive got the same problem > > What does it means "enable it manualy" I've change my > > PrjectConfiguration.class.php to enble the plugin, but now...? what > > can i do ?. i'm little bit confused... thanks. > > > symfony plugin:installsfPropel15Plugin > >>> plugin installing plugin "sfPropel15Plugin" > > > No release available for plugin "sfPropel15Plugin" > > > On 21 mai, 20:04, Három D. Márk wrote: > >> Unpack the archive in your plugins folder and enable it manually in > >> the ProjectConfiguration. > > >> On Fri, May 21, 2010 at 17:00, ferdjuan wrote: > >> > I tried: > > >> > symfony plugin:installsfPropel15Plugin > > >> > and got: > > >> >>> plugin installing plugin "sfPropel15Plugin" > >> > No release available for plugin "sfPropel15Plugin" in state > >> > "stable" > > >> > So I downloaded the package .tgz and tried to install that and I got: > > >> >>> sfPearFrontendPlugin ...done: 1,525,189 bytes > >> >>> sfPearFrontendPlugin Validation Error: No files in section > >> >>> of > >> >>> sfPearFrontendPlugin package.xml > >> >>> sfPearFrontendPlugin Validation Error: No maintainers found, at least > >> >>> one must be > >> >>> sfPearFrontendPlugin defined > >> >>> sfPearFrontendPlugin Validation Error: No release notes found > >> >>> sfPearFrontendPlugin Validation Error: No release date found > >> >>> sfPearFrontendPlugin Validation Error: No release state found > >> >>> sfPearFrontendPlugin Validation Error: No release version found > >> >>> sfPearFrontendPlugin Validation Error: Missing license > >> >>> sfPearFrontendPlugin Validation Error: Missing description > >> >>> sfPearFrontendPlugin Validation Error: No summary found > >> >>> sfPearFrontendPlugin Validation Error: Missing Package Name > >> >>> sfPearFrontendPlugin Parsing of package.xml from file > >> >>> sfPearFrontendPlugin > >> >>> "/storage2/home/admin/domains/dev.immense.net/apollo/cache/.pear/sfPropel15Plugin-0.9.3/lib/vendor/propel-generator/pear/build-pear-package.xml" > >> >>> sfPearFrontendPlugin failed > >> >>> sfPearFrontendPlugin Download of "symfony-plugins/sfPropel15Plugin" > >> >>> succeeded, but > >> >>> sfPearFrontendPlugin it is not a valid package archive > >> >>> sfPearFrontendPlugin Error: cannot download > >> >>> "symfony-plugins/sfPropel15Plugin" > > >> > Plugin "sfPropel15Plugin-0.9.3.tgz" installation failed: Download > >> > failed > > >> > I'm running symfony 1.3.1, any ideas? > > >> > -- > >> > If you want to report a vulnerability issue on symfony, please send it > >> > to security at symfony-project.com > > >> > You received this message because you are subscribed to the Google > >> > Groups "symfony users" group. > >> > To post to this group, send email to symfony-users@googlegroups.com > >> > To unsubscribe from this group, send email to > >> > symfony-users+unsubscr...@googlegroups.com > >> > For more options, visit this group at > >> >http://groups.google.com/group/symfony-users?hl=en > > >> -- > >> If you want to report a vulnerability issue on symfony, please send it to > >> security at symfony-project.com > > >> You received this message because you are subscribed to the Google > >> Groups "symfony users" group. > >> To post to this group, send email to symfony-users@googlegroups.com > >> To unsubscribe from this group, send email to > >> symfony-users+unsubscr...@googlegroups.com > >> For more options, visit this group > >> athttp://groups.google.com/group/symfon
AW: [symfony-users] Re: Managing i18n content for frontend in the backend
Forgot to mention one thing. The objects __toString methods need to be able to do some sort of language fallback like public function __toString() { // get the title in the current language $title=$this->getTitle(); // maybe some other preferences here //... // Last possibility: get the title in the first available language if(empty($title)) { $cultures=sfConfig::get('sf_application_cultures'); for($i=0;$igetTitle($cultures['code'][$i])!=null) { $title=$this->getTitle($cultures['code'][$i]); break; } } } return $title; } -Ursprüngliche Nachricht- Von: symfony-users@googlegroups.com [mailto:symfony-us...@googlegroups.com] Im Auftrag von Christopher Schnell Gesendet: Freitag, 11. Juni 2010 11:29 An: symfony-users@googlegroups.com Betreff: AW: [symfony-users] Re: Managing i18n content for frontend in the backend Ok, here we go: Maybe I should explain the project a little: It is a system for managing online E-Learning courses. It has several customers that can be assigned to courses. The customers can manage their courses in coursecategories. Courses and coursecategories have titles and descriptions which are translated. Originally, we had German and English, so I did it the "Jobeet way". Then a customer said, they wanted to also store the data also in Simplified Chinese. Thats when I started to rebuild the translation system. Now, I have a system, where i can simply add a language in my configuration file and be done with it. Here is how it works: 1. in the apps settings.yml, I add the available cultures, like ... application_cultures: code: [en, de, zh] name: [English, Deutsch, Simp.Chinese] 2. In the schema.yml I have to set the "required" option for the translated values to false, so that I won't get an error on saving the form. 3. Then, I had to write an custom validator, that validates that a title (or any other mandatory field) is set in at least one language. In configure() of the main Form (not the I18n): ... $cultures=sfConfig::get('sf_application_cultures'); $this->embedI18n($cultures['code']); for($i=0;$iwidgetSchema->setLabel($cultures['code'][$i], $cultures['name'][$i]); } $this->validatorSchema->setPostValidator( new sfValidatorCallback(array('callback' => array($this, 'validateOneTitle'))) ); ... And then write a method validateOneTitle() public function validateOneTitle($validator, $values) { $cultures=sfConfig::get('sf_application_cultures'); for($i=0;$iwidgetSchema['languages']=new sfWidgetFormSelect(array('choices'=>$mycultures)); } } The more tricky parts are the template and the action class. Lets start with the template: In the editSuccess.php the div for the form that is reloaded by the ajax-call is located. I do all my ajax-stuff with jquery. In my example, I use the form for a above explained "Coursecategory". $form,'editingLanguageCode'=>$editingLanguageCode,'editingLanguageName'=>$editingLanguageName,'coursecategory'=>$coursecategory))?> $sf_context->getModuleName(),'action'=>'edit','object'=>$coursecategory,'languageForm'=>$languageForm))?> We pass all the required data to the form partial (the form object, the coursecategory object (which of course isn't nessessary, but "grown" code), and the languagecode and name). The partial in the slot is a dropdownbox, that I include in all forms for translated Objects, therefor it resides in the layout folder and gets the module and action passed, as well as the LanguageFilterForm. The code of the partial is like: $(document).ready(function() { $("#languages").change(function() { $('#loader').show(); var myLang=$(this).children('option:selected').val(); $("#canvas").load( $(this).parents('form').attr('action'), { lang: myLang }, function() { $('#loader').hide(); } ); }); }); renderError() ?> Now the form partial is still missing. I leave this code out, since it is a little long. The important thing is that the form is not rendered by but as single form fields. I split the form into two partials, one is the form with non translated values and the other is the form with translations. So in the main form, I include: $form,'editingLanguageCode'=>$editingLanguageCode));?> The I18nForm partial now needs to change the language code in the form fields to store the translated values like: * renderError() ?> render(array('class' => 'input')) ?> Thats all in the templates, only the action is missing. Since i have to process two forms (languageform and Objectform), I placed the form creation code in a separate method. Most of the code is pretty standard. public function executeNew(sfWebRequest $request) { $this->getForms($request->getParameter('lang')); } public function executeCrea
AW: [symfony-users] Re: Managing i18n content for frontend in the backend
Ok, here we go: Maybe I should explain the project a little: It is a system for managing online E-Learning courses. It has several customers that can be assigned to courses. The customers can manage their courses in coursecategories. Courses and coursecategories have titles and descriptions which are translated. Originally, we had German and English, so I did it the "Jobeet way". Then a customer said, they wanted to also store the data also in Simplified Chinese. Thats when I started to rebuild the translation system. Now, I have a system, where i can simply add a language in my configuration file and be done with it. Here is how it works: 1. in the apps settings.yml, I add the available cultures, like ... application_cultures: code: [en, de, zh] name: [English, Deutsch, Simp.Chinese] 2. In the schema.yml I have to set the "required" option for the translated values to false, so that I won't get an error on saving the form. 3. Then, I had to write an custom validator, that validates that a title (or any other mandatory field) is set in at least one language. In configure() of the main Form (not the I18n): ... $cultures=sfConfig::get('sf_application_cultures'); $this->embedI18n($cultures['code']); for($i=0;$iwidgetSchema->setLabel($cultures['code'][$i], $cultures['name'][$i]); } $this->validatorSchema->setPostValidator( new sfValidatorCallback(array('callback' => array($this, 'validateOneTitle'))) ); ... And then write a method validateOneTitle() public function validateOneTitle($validator, $values) { $cultures=sfConfig::get('sf_application_cultures'); for($i=0;$iwidgetSchema['languages']=new sfWidgetFormSelect(array('choices'=>$mycultures)); } } The more tricky parts are the template and the action class. Lets start with the template: In the editSuccess.php the div for the form that is reloaded by the ajax-call is located. I do all my ajax-stuff with jquery. In my example, I use the form for a above explained "Coursecategory". $form,'editingLanguageCode'=>$editingLanguageCode,'editingLanguageName'=>$editingLanguageName,'coursecategory'=>$coursecategory))?> $sf_context->getModuleName(),'action'=>'edit','object'=>$coursecategory,'languageForm'=>$languageForm))?> We pass all the required data to the form partial (the form object, the coursecategory object (which of course isn't nessessary, but "grown" code), and the languagecode and name). The partial in the slot is a dropdownbox, that I include in all forms for translated Objects, therefor it resides in the layout folder and gets the module and action passed, as well as the LanguageFilterForm. The code of the partial is like: $(document).ready(function() { $("#languages").change(function() { $('#loader').show(); var myLang=$(this).children('option:selected').val(); $("#canvas").load( $(this).parents('form').attr('action'), { lang: myLang }, function() { $('#loader').hide(); } ); }); }); renderError() ?> Now the form partial is still missing. I leave this code out, since it is a little long. The important thing is that the form is not rendered by but as single form fields. I split the form into two partials, one is the form with non translated values and the other is the form with translations. So in the main form, I include: $form,'editingLanguageCode'=>$editingLanguageCode));?> The I18nForm partial now needs to change the language code in the form fields to store the translated values like: * renderError() ?> render(array('class' => 'input')) ?> Thats all in the templates, only the action is missing. Since i have to process two forms (languageform and Objectform), I placed the form creation code in a separate method. Most of the code is pretty standard. public function executeNew(sfWebRequest $request) { $this->getForms($request->getParameter('lang')); } public function executeCreate(sfWebRequest $request) { $this->forward404Unless($request->isMethod(sfRequest::POST)); $this->getForms($request->getParameter('lang')); $this->processForm($request, $this->form); $this->setTemplate('new'); } /** * Edit a Coursecategory * * @param sfWebRequest $request A request object */ public function executeEdit(sfWebRequest $request) { $this->coursecategory=CoursecategoryPeer::retrieveByPk($request->getParameter('id')); $this->getForms($request->getParameter('lang'),$this->coursecategory); if($request->isXmlHttpRequest()) { return $this->renderPartial('coursecategory/form', array('form' => $this->form,'coursecategory'=>$this->coursecategory,'editingLanguageCode'=>$this->editingLanguageCode,'editingLanguageName'=>$this->editingLanguageName)); } } public function executeUpdate(sfWebRequest $request) { $this->forward404Unless($reque
[symfony-users] Re: practical symfony guide 1.4 routing (or apache?) question
Check if you have mod_rewrite enabled in your apache setup. gabriel On Jun 10, 2:48 am, Marvin Frederickson wrote: > I'm up to day 5 (page 69) in the guide. When I browse > tohttp://jobeet.artemisu.local/the job list comes up fine. But when I > click on the first job in the list, I get an apache page not found > error. The url is this: > > http://jobeet.artemisu.local/job/sensio-labs/paris-france/1/web-devel... > > It works fine if I include the index.php or frontend_dev.php filename > in the url, but not if I omit it. Why is that? And how can I fix it? > > Thanks. -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] Re: mediatemnple Dv server symfony deployment
There is something wrong with your setup check: 1. phpinfo() 2. Run the /data/bin/check_configuration.php script 3. Check Apache log (the error log in particular) 4. Install xdebug if possible White screen means usually a fatal error with the PHP interpreter. gabriel On Jun 11, 10:56 am, fRAnKEnSTEin wrote: > Hi, > > Ok i have deleted that limitation, now i can load the > "frontend_dev.php" file but all i can see is a blank page :( > > Any idea? > > cheers -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] Re: sfPropel15Plugin won't install
It means you have to download the plugin either from svn, or as a .tgz file from the website. The latter one is easier, here's the link: http://plugins.symfony-project.org/get/sfPropel15Plugin/sfPropel15Plugin-1.0.0.tgz Unpack it to your project's plugins directory, then open your config/ProjectConfiguration.class.php in your editor, and look for a line like this: $this->enablePlugins(array('sfPropelPlugin')); change it to: $this->enablePlugins('sfPropel15Plugin'); according to the plugin's readme, you'll also need to change the path of the symfony behaviors in the config/propel.ini file of your project: propel.behavior.symfony.class = plugins.sfPropel15Plugin.lib.behavior.SfPropelBehaviorSymfony propel.behavior.symfony_i18n.class = plugins.sfPropel15Plugin.lib.behavior.SfPropelBehaviorI18n propel.behavior.symfony_i18n_translation.class = plugins.sfPropel15Plugin.lib.behavior.SfPropelBehaviorI18nTranslation propel.behavior.symfony_behaviors.class= plugins.sfPropel15Plugin.lib.behavior.SfPropelBehaviorSymfonyBehaviors propel.behavior.symfony_timestampable.class= plugins.sfPropel15Plugin.lib.behavior.SfPropelBehaviorTimestampable clear your cache, do a `plugin:publish-assets`, rebuild your models and you are done. On Thu, Jun 10, 2010 at 15:42, lecochien wrote: > Hi, > (it's my first question, be indulgent ;-) > Ive got the same problem > What does it means "enable it manualy" I've change my > PrjectConfiguration.class.php to enble the plugin, but now...? what > can i do ?. i'm little bit confused... thanks. > > symfony plugin:install sfPropel15Plugin >>> plugin installing plugin "sfPropel15Plugin" > > > No release available for plugin "sfPropel15Plugin" > > On 21 mai, 20:04, Három D. Márk wrote: >> Unpack the archive in your plugins folder and enable it manually in >> the ProjectConfiguration. >> >> >> >> On Fri, May 21, 2010 at 17:00, ferdjuan wrote: >> > I tried: >> >> > symfony plugin:installsfPropel15Plugin >> >> > and got: >> >> >>> plugin installing plugin "sfPropel15Plugin" >> > No release available for plugin "sfPropel15Plugin" in state >> > "stable" >> >> > So I downloaded the package .tgz and tried to install that and I got: >> >> >>> sfPearFrontendPlugin ...done: 1,525,189 bytes >> >>> sfPearFrontendPlugin Validation Error: No files in section of >> >>> sfPearFrontendPlugin package.xml >> >>> sfPearFrontendPlugin Validation Error: No maintainers found, at least >> >>> one must be >> >>> sfPearFrontendPlugin defined >> >>> sfPearFrontendPlugin Validation Error: No release notes found >> >>> sfPearFrontendPlugin Validation Error: No release date found >> >>> sfPearFrontendPlugin Validation Error: No release state found >> >>> sfPearFrontendPlugin Validation Error: No release version found >> >>> sfPearFrontendPlugin Validation Error: Missing license >> >>> sfPearFrontendPlugin Validation Error: Missing description >> >>> sfPearFrontendPlugin Validation Error: No summary found >> >>> sfPearFrontendPlugin Validation Error: Missing Package Name >> >>> sfPearFrontendPlugin Parsing of package.xml from file >> >>> sfPearFrontendPlugin >> >>> "/storage2/home/admin/domains/dev.immense.net/apollo/cache/.pear/sfPropel15Plugin-0.9.3/lib/vendor/propel-generator/pear/build-pear-package.xml" >> >>> sfPearFrontendPlugin failed >> >>> sfPearFrontendPlugin Download of "symfony-plugins/sfPropel15Plugin" >> >>> succeeded, but >> >>> sfPearFrontendPlugin it is not a valid package archive >> >>> sfPearFrontendPlugin Error: cannot download >> >>> "symfony-plugins/sfPropel15Plugin" >> >> > Plugin "sfPropel15Plugin-0.9.3.tgz" installation failed: Download >> > failed >> >> > I'm running symfony 1.3.1, any ideas? >> >> > -- >> > If you want to report a vulnerability issue on symfony, please send it to >> > security at symfony-project.com >> >> > You received this message because you are subscribed to the Google >> > Groups "symfony users" group. >> > To post to this group, send email to symfony-users@googlegroups.com >> > To unsubscribe from this group, send email to >> > symfony-users+unsubscr...@googlegroups.com >> > For more options, visit this group at >> >http://groups.google.com/group/symfony-users?hl=en >> >> -- >> If you want to report a vulnerability issue on symfony, please send it to >> security at symfony-project.com >> >> You received this message because you are subscribed to the Google >> Groups "symfony users" group. >> To post to this group, send email to symfony-users@googlegroups.com >> To unsubscribe from this group, send email to >> symfony-users+unsubscr...@googlegroups.com >> For more options, visit this group >> athttp://groups.google.com/group/symfony-users?hl=en > > -- > If you want to report a vulnerability issue on symfony, please send it to > security at symfony-project.com > > You received this message because you are subscribed to the Google > Groups "symfony users" group. > To post to this
Re: [symfony-users] practical symfony guide 1.4 routing (or apache?) question
HI! Most probably, you don't have the "mod_rewrite" enabled in your apache. Use a phpinfo(); and check if you have it enabled. If it is not, then edit your apache.conf / httpd.conf file, restart your server and retry . Alecs On Thu, Jun 10, 2010 at 2:48 AM, Marvin Frederickson < marvin.frederick...@gmail.com> wrote: > I'm up to day 5 (page 69) in the guide. When I browse to > http://jobeet.artemisu.local/ the job list comes up fine. But when I > click on the first job in the list, I get an apache page not found > error. The url is this: > > http://jobeet.artemisu.local/job/sensio-labs/paris-france/1/web-developer > > It works fine if I include the index.php or frontend_dev.php filename > in the url, but not if I omit it. Why is that? And how can I fix it? > > 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 > -- Have a nice day! Alecs Certified ScrumMaster P.S. If you are on a list, please don't contact me privatelly, unless i have allowed to. Further messages will be ignored. There are no cannibals alive! I have ate the last one yesterday ... 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 -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, 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 sfJqueryTreeDoctrineManagerPlugin at admin backend
I just see your post, I'm the creator of the plugin do you still have problem using it or is it OK On 30 avr, 22:13, el-sid wrote: > hi, i found this plugin to manage nested set tree but i am having > problems getting it to work, i followed the instructions but nothing > seems to happen > > my yaml file looks like this > > Category: > actAs: > NestedSet: > hasManyRoots: true > rootColumnName: root_id > columns: > cat_name: { type: string(255), notnull: true, unique: true } > cat_description: { type: string(255), notnull: true, unique: > true } > cat_image: { type: string(255), notnull: true, unique: true } > > i installed the plugin and published assets then cleared the cache > > i then autogenerated the module category for the backend and cleared > the cache. i enabled my plugin > > all: > .settings: > enabled_modules: [default, sfJqueryTreeDoctrineManager] > > and then i checked the results in the browser. the result is still as > if i never used the plugin at all. i think i may need to use the > helper but have no idea on how to enable it from the admin. > any ideas on how to get this done please. 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 > athttp://groups.google.com/group/symfony-users?hl=en -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] practical symfony guide 1.4 routing (or apache?) question
I'm up to day 5 (page 69) in the guide. When I browse to http://jobeet.artemisu.local/ the job list comes up fine. But when I click on the first job in the list, I get an apache page not found error. The url is this: http://jobeet.artemisu.local/job/sensio-labs/paris-france/1/web-developer It works fine if I include the index.php or frontend_dev.php filename in the url, but not if I omit it. Why is that? And how can I fix it? Thanks. -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] Symfony2 ->" The service "database_connection" does not exist."
Hello, I designed a website with symfony 2 and then I have this error = "" Normally the connection to the database is done in the controller, what I do, but on some module when I call $ this-> getDatabaseConnection (); AC i have this error! Do you have an idea what's wrong! 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
[symfony-users] Re: sfJqueryTreeDoctrineManagerPlugin events
I'm the creator of the plugin What do you need exactly ? On 10 juin, 17:03, DC wrote: > Does anyone know how I can trigger the Category::save() event every > time I create a new category? > > That is, assumming I`m using "Category" as the nested model. -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, 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] Automated web installer
Hello everybody, i'm working on my free software project called phpYABS (www.phpyabs.com) that is mainly based on symfony. I'd like to distribute it with a wizard allowing an easy installation on shared hostings (e.g. like wordpress). What would I do? Sorry for my poor english -- Davide Bellettini dav...@davidebellettini.it www.davidebellettini.it -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, 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: sfPropel15Plugin won't install
Hi, (it's my first question, be indulgent ;-) Ive got the same problem What does it means "enable it manualy" I've change my PrjectConfiguration.class.php to enble the plugin, but now...? what can i do ?. i'm little bit confused... thanks. symfony plugin:install sfPropel15Plugin >> plugininstalling plugin "sfPropel15Plugin" No release available for plugin "sfPropel15Plugin" On 21 mai, 20:04, Három D. Márk wrote: > Unpack the archive in your plugins folder and enable it manually in > the ProjectConfiguration. > > > > On Fri, May 21, 2010 at 17:00, ferdjuan wrote: > > I tried: > > > symfony plugin:installsfPropel15Plugin > > > and got: > > >>> plugin installing plugin "sfPropel15Plugin" > > No release available for plugin "sfPropel15Plugin" in state > > "stable" > > > So I downloaded the package .tgz and tried to install that and I got: > > >>> sfPearFrontendPlugin ...done: 1,525,189 bytes > >>> sfPearFrontendPlugin Validation Error: No files in section of > >>> sfPearFrontendPlugin package.xml > >>> sfPearFrontendPlugin Validation Error: No maintainers found, at least one > >>> must be > >>> sfPearFrontendPlugin defined > >>> sfPearFrontendPlugin Validation Error: No release notes found > >>> sfPearFrontendPlugin Validation Error: No release date found > >>> sfPearFrontendPlugin Validation Error: No release state found > >>> sfPearFrontendPlugin Validation Error: No release version found > >>> sfPearFrontendPlugin Validation Error: Missing license > >>> sfPearFrontendPlugin Validation Error: Missing description > >>> sfPearFrontendPlugin Validation Error: No summary found > >>> sfPearFrontendPlugin Validation Error: Missing Package Name > >>> sfPearFrontendPlugin Parsing of package.xml from file > >>> sfPearFrontendPlugin > >>> "/storage2/home/admin/domains/dev.immense.net/apollo/cache/.pear/sfPropel15Plugin-0.9.3/lib/vendor/propel-generator/pear/build-pear-package.xml" > >>> sfPearFrontendPlugin failed > >>> sfPearFrontendPlugin Download of "symfony-plugins/sfPropel15Plugin" > >>> succeeded, but > >>> sfPearFrontendPlugin it is not a valid package archive > >>> sfPearFrontendPlugin Error: cannot download > >>> "symfony-plugins/sfPropel15Plugin" > > > Plugin "sfPropel15Plugin-0.9.3.tgz" installation failed: Download > > failed > > > I'm running symfony 1.3.1, any ideas? > > > -- > > If you want to report a vulnerability issue on symfony, please send it to > > security at symfony-project.com > > > You received this message because you are subscribed to the Google > > Groups "symfony users" group. > > To post to this group, send email to symfony-users@googlegroups.com > > To unsubscribe from this group, send email to > > symfony-users+unsubscr...@googlegroups.com > > For more options, visit this group at > >http://groups.google.com/group/symfony-users?hl=en > > -- > If you want to report a vulnerability issue on symfony, please send it to > security at symfony-project.com > > You received this message because you are subscribed to the Google > Groups "symfony users" group. > To post to this group, send email to symfony-users@googlegroups.com > To unsubscribe from this group, send email to > symfony-users+unsubscr...@googlegroups.com > For more options, visit this group > athttp://groups.google.com/group/symfony-users?hl=en -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] Re: mediatemnple Dv server symfony deployment
Hi, Ok i have deleted that limitation, now i can load the "frontend_dev.php" file but all i can see is a blank page :( Any idea? cheers -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] Re: mediatemnple Dv server symfony deployment
ok gonna see chck that, but meanwhile is there any tutorial about deploying symfony projects over dv mediatemple servers? do i have to created vhosts? modify the httpd.conf or something chers -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en