[symfony-users] Re: Installation on shared hosting
Hi , thanks alot for your help , this time i m not getting any 500 error but , it show me a blank screen :( On Jan 13, 12:29 am, Frank He wrote: > You can add multiple symfony projects in just one account, like what I did > with hostmonster > structure can be like this: > > public_html > --web(all your web assets including index.php) > --symfony-clb(all symfony files, apps, configue...) > > And then in your webroot, modify your controller like this: > > require_once(dirname(__FILE__).DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'symfony-clb'.DIRECTORY_SEPARATOR.'config'.DIRECTORY_SEPARATOR.'ProjectConfiguration.class.php'); > > for symfony-clb/config/projectconfiguration.class.php, update like this: > > require_once > dirname(__FILE__).DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'lib'. > DIRECTORY_SEPARATOR.'vendor'.DIRECTORY_SEPARATOR.'symfony'. > DIRECTORY_SEPARATOR.'lib'.DIRECTORY_SEPARATOR.'autoload'. > DIRECTORY_SEPARATOR.'sfCoreAutoload.class.php'; > > sfCoreAutoload::register(); > > class ProjectConfiguration extends sfProjectConfiguration > { > public function setup() > { > // for compatibility / remove and enable only the plugins you want > $this->enableAllPluginsExcept(array('sfDoctrinePlugin', > 'sfCompat10Plugin')); > > $this->setWebDir($this->getRootDir().DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'web'); > > } > > public function configure() > { > > $this->setWebDir($this->getRootDir().DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'web'); > > } > > } > > This is what I did, hope it is helpful > > On Tue, Jan 12, 2010 at 2:16 PM, Darren884 wrote: > > You should have at least one directory above the public_html. What you > > will have to do is install it there and then set the web directory to > > the public_html. You might come into some problems with opeb_base_dir. > > If that is the case you will need to modify your PHP security > > settings. > > > On Jan 12, 10:59 am, Ali wrote: > > > Hi Symfony users and Developers, > > > i am new in php and > > > symfony development so far symfony has done wel for me , but its > > > really hard for me to get the thing done right on deployment side , > > > its my 10th hour and i am unable to deploy the project on shared > > > hosting. > > > > here are some of the facts about my problem > > > 1 : i am using blue host shared hosting > > > 2 : i want to deploy the project in sub directory the root is > > > public_html , but i want my project to be deployed in public_html/ > > > myproject > > > 3 : i have done most of the development on my ubuntu machine and want > > > this project to be deployed > > > > if any one can share how to get the things done > > > > Best Regards > > > -- > > 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] can't create a doctrine field like date_demande_OPT_IN
hi everyone, when listing, into the error is Unknown record property / related component "date_demande_optin" on "Particulier" but when i change the field from date_demande_OPT_IN to date_demande_opt_in into the schema.yml file, all is ok is it a bug ? -- 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: Symfony forms
Hello! Is there a question in your post? I can't find one. Bye On 13 Jan., 04:47, Gabo wrote: > Help!! > > I have 1 form (document_note); in the form exist: > > 1. id_documento : new sfWidgetFormDoctrineChoice(array('model' => > 'document', 'add_empty' => true)), > 2.note: FCKeditor > 3.created_at: date > > In the action NEW have: > > echo $sf_request->getParameter('document_id') ; //print "4" > > I net have *selected one option* of the filter sfWidgetFormDoctrine > with $sf_request->getParameter('document_id') ;! > > URL:frontend_dev.php/document_note/new?document_id=4 > > Gabo -- 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] Post comments
How can I add post_id invisible field to comment form? -- 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: Installation on shared hosting
using frontend_dev.php to see the errors. At least, you have already installed your project to blue host On Wed, Jan 13, 2010 at 3:30 AM, Ali wrote: > Hi , thanks alot for your help , this time i m not getting any 500 > error but , it show me a blank screen > :( > > > On Jan 13, 12:29 am, Frank He wrote: > > You can add multiple symfony projects in just one account, like what I > did > > with hostmonster > > structure can be like this: > > > > public_html > > --web(all your web assets including index.php) > > --symfony-clb(all symfony files, apps, configue...) > > > > And then in your webroot, modify your controller like this: > > > > > require_once(dirname(__FILE__).DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'symfony-clb'.DIRECTORY_SEPARATOR.'config'.DIRECTORY_SEPARATOR.'ProjectConfiguration.class.php'); > > > > for symfony-clb/config/projectconfiguration.class.php, update like this: > > > > require_once > > dirname(__FILE__).DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'lib'. > > DIRECTORY_SEPARATOR.'vendor'.DIRECTORY_SEPARATOR.'symfony'. > > DIRECTORY_SEPARATOR.'lib'.DIRECTORY_SEPARATOR.'autoload'. > > DIRECTORY_SEPARATOR.'sfCoreAutoload.class.php'; > > > > sfCoreAutoload::register(); > > > > class ProjectConfiguration extends sfProjectConfiguration > > { > > public function setup() > > { > > // for compatibility / remove and enable only the plugins you want > > $this->enableAllPluginsExcept(array('sfDoctrinePlugin', > > 'sfCompat10Plugin')); > > > > > $this->setWebDir($this->getRootDir().DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'web'); > > > > } > > > > public function configure() > > { > > > > > $this->setWebDir($this->getRootDir().DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'web'); > > > > } > > > > } > > > > This is what I did, hope it is helpful > > > > On Tue, Jan 12, 2010 at 2:16 PM, Darren884 wrote: > > > You should have at least one directory above the public_html. What you > > > will have to do is install it there and then set the web directory to > > > the public_html. You might come into some problems with opeb_base_dir. > > > If that is the case you will need to modify your PHP security > > > settings. > > > > > On Jan 12, 10:59 am, Ali wrote: > > > > Hi Symfony users and Developers, > > > >i am new in php > and > > > > symfony development so far symfony has done wel for me , but its > > > > really hard for me to get the thing done right on deployment side , > > > > its my 10th hour and i am unable to deploy the project on shared > > > > hosting. > > > > > > here are some of the facts about my problem > > > > 1 : i am using blue host shared hosting > > > > 2 : i want to deploy the project in sub directory the root is > > > > public_html , but i want my project to be deployed in public_html/ > > > > myproject > > > > 3 : i have done most of the development on my ubuntu machine and want > > > > this project to be deployed > > > > > > if any one can share how to get the things done > > > > > > Best Regards > > > > > -- > > > 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] sfDoctrineGuard Plugin Status
Hi every: I didn't know if this is the right place to ask if not please my apologies. I'm using sfDoctrineGuard plugin for a while in some projects. For now I have latest release 4.0.1 but I have a question: the SVN version is updated and ready to use in production enviroments or not? -- Cheers and thx in advance Ing. Reynier Pérez Mira -- 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] sfDoctrineGuard Plugin Status
For my own I use the SVN version in prod because it's the last uptodate Olivier > -Message d'origine- > De : symfony-users@googlegroups.com [mailto:symfony- > us...@googlegroups.com] De la part de ReynierPM > Envoyé : mercredi 13 janvier 2010 14:49 > À : symfony-users@googlegroups.com > Objet : [symfony-users] sfDoctrineGuard Plugin Status > > Hi every: > I didn't know if this is the right place to ask if not please my > apologies. I'm using sfDoctrineGuard plugin for a while in some > projects. For now I have latest release 4.0.1 but I have a question: the > SVN version is updated and ready to use in production enviroments or not? > -- > Cheers and thx in advance > Ing. Reynier Pérez Mira -- 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] Symfony pgsql
Alex Potter : not at all. This is not the symfony function : http://trac.symfony-project.org/browser/branches/1.1/lib/helper/DateHelper.php#L36 In my sample, arguments are not in the good order : is better ;) Alex' 2010/1/12 Alex Potter > On Tuesday 12 January 2010 17:20:09 Alexandre Salomé wrote: > > Hello, > > > > > > > > > > If not "d", then try others : D, f, F, p, P ... don't remember every one. > > > http://www.tutorialspoint.com/php/php_function_date_format.htm > > HTH > > Alex > > > -- > 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. > > > > -- Alexandre Salomé http://alexandre-salome.fr -- 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] symfony i18n & propel : fallback language, howto implement ?
For a new project we have a lot of propel i18n objects. The implementation of the project is to show the preferred language of an object and if that is not available show a secondary or third language (fallback). Each object is always available in at least one language, but not in all languages. We implemented this using the default i18n behavior. After that we added a magic __call method that calls a getXXXwithFallback() method to make sure the getter always returns a result (in case the retrieved object doesn't have the demanded language). Of course this fires another database call, querying the i18n table for the secondary (or third) translation of that object. Now that the application grows bigger we need to reduce the query count, and thats where the problem occurs. A snippet of code that would create a lot of queries would be : $structure = $structurPeer::doSelectWithI18n(new criteria()); foreach ($structure as $unit) { echo $unit->getTitlewithFallBack(); } For all objects that have the requested language, there is no problem. For the objects that do not have this requested language, a query is fired I would like to get some thoughts & comments how to solve/improve this implementation. Our own conclusions/possible workarounds : - not use i18n but create a column for each language (title_nl, title_fr), then convert the getTitleWithFallback method to check the different columns and return the correct one. We can do this since we have a limited nr of languages. - when creating the object, make sure that for each language a i18n record is created, cloning the original content of the objects primary language - somehow hack (perhaps propel1.5) propel core to provide doSelectWithI18NWithFallback method, making sure the one-to-many relationship (i18n) populates the array of related languages with only one database query, and thus avoiding Pro's & Cons : - option#1 : - pro : pretty easy to implement - con : takes an amount of work adding future languages - con : forms (embedi18n) need to be redone/adapted - con : table layout will become messy - option#2 : - pro : easy to implement (using a task for all current objects) - pro : stay within the symfony i18n system - con : harder to determine the availability of different object languages (as content is cloned) - con : - option#3 : - pro : hydration of related objects with only one query - con : dive into propel core - con : pull hair out diving into propel core - con : risk going crazy playing with propel relations (one-to-many) I think option #2 is the better & easiest one. But i want to make sure we are making the right decision here. Any thoughts ? -- 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: How to automatically fill out a field that relates to a user?
I am trying do similar behavior. I have some attribute of user, which i want store as value in many and many forms. But cant solve this. I am trying modify forms data in action-processform, but its not work. LogicError exception. Somebody in irc recomend for me use hidden values in form::configure, but its doesnt work for me 1. i dont want show data to client browser (and trust from browser) 2. i totaly cant get myUser object from form class. No idea how get auth user in form::configure The same problem when i trying unset this fields in form::configure and set in form::doSave , i dont know how get this data from User class. So hope somebody may help us. -- 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: How to automatically fill out a field that relates to a user?
For now i solve this, with this way 1. never create form as new form() 2. create object= new object(), fill data in controller $ob- >setmythoseid($this->getUser()->GetBlah()), and then create form with this object 3. mark this field as hidden in form class But i dislike this way. Using browser for store this id , bad idea for 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.
[symfony-users] Many-many relationship, propel, forms
I have problem with many-many mapping into forms. Schema: == Ducks: id:~ name: Hunters: id:~ name: D_H: id:~ duck_id: { type: integer, foreignTable: Hunters, foreignReference: id, required: true } hunter_id: { type: integer, foreignTable: Hunters, foreignReference: id, required: true } == I want in HunterForm, multiselect, where i can select Ducks (by name). I solve it for inserts as : ==HunterForm::configure $c=new Criteria(); //for future $this->widgetSchema['ducks'] = new sfWidgetFormPropelChoice (array('model' => 'Ducks', 'multiple' => true,'criteria'=>$c)); == and Save ==HunterForm::doSave foreach($this->getValue('ducks') as $id_duck) { $dh= new DH(); $dh->setDuckId($id_duck); $this->getObject()->addDH($dh); } parent::doSave($con); == But how do this for edit/update ? I mean both : 1. save method 2. some load-selected-to-form-select-input method. Where and how i must load $hunter->GetDHjoinsDucks() , that in form select element some ducks was "preselected" ? Or may be, i totaly on wrong way, is another pattern? Help me plz. -- 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: How to automatically fill out a field that relates to a user?
2. i totaly cant get myUser object from form class. No idea how get auth user in form::configure Answer to myself get user from form class, possible with sfContext->GetUser, so i can move fill the hidden input from controller to form methods. -- 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] Advanced Forms Example
hi list, I'm using embedForm() and embedRelation() (described in: http://www.symfony-project.org/advent_calendar/8/en http://www.symfony-project.org/advent_calendar/9/en ) to handle upload of serveral files to objects of a certain class. everything works fine as described in the example. I use the form within an admin-generated view. my question: is there a easy way to add for example: download, deletelinks for each embeded relation? -- 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: How to automatically fill out a field that relates to a user?
Ok guys I got it to work. This is how you would pass Symfony objects to the form. In my Actions I had to overwrite the automatically generated ones with: public function executeNew(sfWebRequest $request) { $this->form = $this->configuration->getForm(false, array ('employee' => $this->getUser())); $this->Article = $this->form->getObject(); } Then I accessed that option in my form class with $this->getOption('employee') and based my logic on that. On Jan 13, 8:28 am, apm wrote: > > 2. i totaly cant get myUser object from form class. No idea how get > > auth user in form::configure > > Answer to myself get user from form class, possible with > sfContext->GetUser, so i can move fill the hidden input from controller > to form methods. -- 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] load routingCms.yml
hello, I generate from my backend a file routingCms.yml in my frontend application I did it because url of pages can be modified... so a routing like : user_authentication: url: /authentification/user-authentication.html param: { module: user, action: authentication } could be user_authentication: url: /user/authentication.html param: { module: user, action: authentication } So I find a bad solution to include my routingCms.yml... in my routing.yml, I put at the begining the following line : Did you know how to load the routingCms.yml in my ProjectConfiguration.class.php ? 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] Issue with doctrine table search adding id
I'm not sure what's going on this time, but I've created a table that stores users with locations. When i try to pull them though, the query is adding an id field that isn't part of the table (and of course failing). TblApprovalList: connection: internal_web tableName: tblApprovalList columns: username: type: string(120) fixed: true unsigned: false primary: false default: '' notnull: true autoincrement: false location: type: string(80) fixed: true unsigned: false primary: false default: '' notnull: true autoincrement: false abstract class BaseTblApprovalList extends sfDoctrineRecord { public function setTableDefinition() { $this->setTableName('tblApprovalList'); $this->hasColumn('username', 'string', 120, array( 'type' => 'string', 'fixed' => 1, 'unsigned' => false, 'primary' => false, 'default' => '', 'notnull' => true, 'autoincrement' => false, 'length' => '120', )); $this->hasColumn('location', 'string', 80, array( 'type' => 'string', 'fixed' => 1, 'unsigned' => false, 'primary' => false, 'default' => '', 'notnull' => true, 'autoincrement' => false, 'length' => '80', )); } public function setUp() { parent::setUp(); } } So when I try: $list = Doctrine::getTable('TblApprovalList')->createQuery('a')- >execute(); I get: SQLSTATE[42S22]: Column not found: 1054 Unknown column 't.id' in 'field list'. Failing Query: "SELECT t.id AS t__id, t.username AS t__username, t.location AS t__datacenter FROM tblApprovalList t" -- 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] sfWidgetFormPropelJQueryAutocompleter stops working after submitting form with errors
Hi everyone! I'm currently using: sfWidgetFormPropelJQueryAutocompleter for the autocompletition feature. Symfony 1.2 Mozilla Firefox 3.5.5 Firebug 1.4.5 When the new or edit actions are executed, the autocomplete enabled field works like it should, but if a validator catches an error on any field when the form is submitted, the autocomplete feature stops working if you type any value on the autocomplete field and not even generates a request nor a response when browsing with Firebug looking for a ajax call. So, what could be the cause of this? Is something to do with the widget? I followed the blog post: http://www.symfony-project.org/blog/2008/10/14/new-in-symfon y-1-2- make-your-choice to implement this feature. I would sincerely appreciate any kind of help with this! Thanks in advance symfony community! -- 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] How to customize query for admin generated module?
How would I customize the query used on the list view for the admin area? I need to tweak it by having it only show records from a certain category, say Books. I would like to do this in the PHP form file or model file... Anyone know how I could do it without messing up the sorting and paging? Thanks, Darren -- 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] How to customize query for admin generated module?
Look at the buildQuery() of your auto_xxx.class.php (in cache dir) to overload it in your very own actions class. Cheers, Before Printing, Think about Your Environmental Responsibility! Avant d'Imprimer, Pensez à Votre Responsabilitée Environnementale! On Wed, Jan 13, 2010 at 9:22 PM, Darren884 wrote: > How would I customize the query used on the list view for the admin > area? I need to tweak it by having it only show records from a certain > category, say Books. I would like to do this in the PHP form file or > model file... > > Anyone know how I could do it without messing up the sorting and > paging? > > Thanks, > Darren > > -- > 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] load routingCms.yml
I have done recently a thing like that .. and i have succeded via config handlers ... Here are my sources : http://pastebin.com/f16301021 Alecs On Wed, Jan 13, 2010 at 9:01 PM, smellycat37 wrote: > hello, > > I generate from my backend a file routingCms.yml in my frontend > application > I did it because url of pages can be modified... so a routing like : > > user_authentication: > url: /authentification/user-authentication.html > param: { module: user, action: authentication } > > could be > > user_authentication: > url: /user/authentication.html > param: { module: user, action: authentication } > > So I find a bad solution to include my routingCms.yml... in my > routing.yml, I put at the begining the following line : > ('routingCms.yml'); ?> > > Did you know how to load the routingCms.yml in my > ProjectConfiguration.class.php ? > > 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. > > > > -- 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)0748.543.798 -- 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: How to customize query for admin generated module?
Hello that worked perfectly thank you very much for your help. On Jan 13, 12:52 pm, Stéphane wrote: > Look at the buildQuery() of your auto_xxx.class.php (in cache dir) to > overload it in your very own actions class. > > Cheers, > > Before Printing, Think about Your Environmental Responsibility! > Avant d'Imprimer, Pensez à Votre Responsabilitée Environnementale! > > On Wed, Jan 13, 2010 at 9:22 PM, Darren884 wrote: > > How would I customize the query used on the list view for the admin > > area? I need to tweak it by having it only show records from a certain > > category, say Books. I would like to do this in the PHP form file or > > model file... > > > Anyone know how I could do it without messing up the sorting and > > paging? > > > Thanks, > > Darren > > > -- > > 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] Having trouble modifying filters.
In my form I use the setOptions to pass my user object so I can check the credentials in the form class if I want to display or hide fields, however in the FilterForm class there is no setOptions and class variables do not seem to be shared among functions. How am I to get the user object into my FormFilter class from the action in order to check credentials against it and hide or display fields? Is there a different method in Symfony other than the __construct to get variables? Thanks, Darren -- 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] Have it so if a user doesnt fill in a field it stays as it was?
I have a password field and I want it so if the user doesn't fill it in it stays the same value. How do I accomplish this? I also have a password confirmation field. 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] How to enable plugin standalone
Hello (i'm french, excuse me for my english), I work with sfForm standalone. I would like to enable sfDoctrinePlugin ? Is it possible ? How to do ? Thank you, Dorian -- 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: Error message format
Here is the solution I made for Symfony 1.3/1.4. Just add this to your BaseForm class: public function getFormattedErrors($errorSchema = null) { if (null === $errorSchema) { $errorSchema = $this->getErrorSchema(); } $errorArray = array(); foreach ($errorSchema as $field => $error) { if ($error instanceof sfValidatorErrorSchema && $nestedErrorSchema = $error->getErrors()) { return $this->getFormattedErrors($nestedErrorSchema); } else { array_push($errorArray, sprintf('%s: %s', $this->getLabelForField($field), $error->getMessage())); } } return $errorArray; } function getLabelForField($field, $form = null) { if (null === $form) { $form = clone $this; } if ($form->offsetExists($field)) { return $form[$field]->renderLabel(); } foreach ($form->getEmbeddedForms() as $embeddedForm) { return $this->getLabelForField($field, $embeddedForm); } } Then just call this from your template: getFormattedErrors() as $error): ?> On Dec 29 2009, 4:36 pm, Sid Bachtiar wrote: > Hi all, > > I embedded a form inside another form, and I try to print errors (of > all the forms combined) like this in the template: > > getErrorSchema()->getErrors() > as $error): ?> > *getMessage(); ?> > > > It is able to print all the errors as expected so that's good. But for > the embedded form fields, the required error message always show: > > *0 [Reply to Sid is missing.] > > Instead of just: > > * Reply to Sid is missing > > The 0 is the field name. I want to get rid of it (and the brackets) > and tried many ways without success. > > Does anyone know how to just print the error message without the field > name and the brackets?? > > Cheers, > > Sid > -- > Blue Horn Ltd - System Developmenthttp://bluehorn.co.nz -- 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] Modify sfGuardUserForm fields
you should do your changes in plugins\sfDoctrineGuardPlugin\lib\form\doctrine\sfGuardUserAdminForm.class or change the form class in plugins\sfDoctrineGuardPlugin\modules\sfGuardUser\config\generator.yml On Wed, Jan 13, 2010 at 12:46 AM, Jose San Gil wrote: > Hi folks! > > I'm trying to modify the validation of the 'permissions_list' field > generated in the basesfGuardUserForm.class.php. I want to set the > 'required' option to 'True'. I tried with this: > > class sfGuardUserForm extends PluginsfGuardUserForm > { > public function configure() > { > $this->validatorSchema['permissions_list']->setOption > ('required', True); > } > } > > But it doesn't take effect. > > Also if a try to set a different widget to permissions_list, it > doesn't works. > > I think this is not the right way to do that. Could you help me? > > Thanks > PD: Excuse me for my english > > -- > 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] sfWidgetFormPropelJQueryAutocompleter stops working after submitting form with errors
did you change your executeCreate and executeUpdate actions? On Wed, Jan 13, 2010 at 10:04 PM, J_Wesker wrote: > Hi everyone! > I'm currently using: > sfWidgetFormPropelJQueryAutocompleter for the autocompletition > feature. > Symfony 1.2 > Mozilla Firefox 3.5.5 > Firebug 1.4.5 > > When the new or edit actions are executed, the autocomplete enabled > field works like it should, but if a validator catches an error on any > field when the form is submitted, the autocomplete feature stops > working if you type any value on the autocomplete field and not even > generates a request nor a response when browsing with Firebug looking > for a ajax call. > > So, what could be the cause of this? Is something to do with the > widget? > > I followed the blog post: > http://www.symfony-project.org/blog/2008/10/14/new-in-symfon y-1-2- > make-your-choice to implement this feature. > > I would sincerely appreciate any kind of help with this! > > Thanks in advance symfony community! > > -- > 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: sfDoctrineGuard is killing me
** This issue is now resolved *** DISCLAIMER I don't want this to seem like a giant bitch-fest over sfDoctrineGuard, it works great thank you for writing it, REALLY. But boy there were some frustrationg moments for me. I would hate to have built a custom authentication class(es?) myself, so I tip my hat to those that do this for free. Thank you so much, and as well to all of you who chimed in to help me, on and off-forum! sfDoctrineGuard And I: A Love Story. Kind Of. However, I'm not sure of the best place to post this, but it may help a weary traveler, I know it cost me more hours than I'm prepared to divulge. The problem was that when working locally on my OSX.5 macbook pro, I found everything was working great. My project started out in October using symfony 1.2 and whatever sfDoctrineGuard was at the time (I used SVN). I had a Ubuntu server set up with mysql 5.0, and all was well. Part I It started going awry when I upped to Symfony 1.4, and fixed a few things via the compatibility. I updated sfDoctrineGuard too. When I deployed (it had been some time as I was working hard locally, keeping the clients in the dark re: a staging server), I found my first problem. When doing a build --all I got errors creating the FKs with no comprehensible error message from mysql. It turned out that the version of mysql I was using locally was different than the server version by enough that the FK label was limited to 64 characters on the server, but not locally. So sfDoctrineGuardPlugin in it's current state would not build on the server. Still won't actually. Here's the error. SQLSTATE[HY000]: General error: 1005 Can't create table './quicksand- staging/#sql-8fc_ce.frm' (errno: 121). Failing Query: "ALTER TABLE sf_guard_group_permission ADD CONSTRAINT sf_guard_group_permission_permission_id_sf_guard_permission_id FOREIGN KEY (permission_id) REFERENCES sf_guard_permission(id) ON DELETE CASCADE". Failing Query: ALTER TABLE sf_guard_group_permission ADD CONSTRAINT sf_guard_group_permission_permission_id_sf_guard_permission_id FOREIGN KEY (permission_id) REFERENCES sf_guard_permission(id) ON DELETE CASCADE Notice the huge key name? sf_guard_group_permission_permission_id_sf_guard_permission_id So I figured I just dump the local schema, upload, export the server data, insert the correct schema and import the data (via a script, of course - I'm not crazy). This got me past that problem. THANKS GEORG for the key tip! I have posted a ticket so hopefully it will get resolved. ** Also not worth making a big fuss over is that sfDoctrineGuard added a REQUIRED and UNIQUE field so now email and username must be unique and not null. This messed up my fixtures (though it was easily fixed) ** Part II After I bypassed the symfony way of doing things, I tried the site. As soon as I started to login, the site went 'Error 500'. Looking in the apache logs, I saw the error [Tue Jan 12 11:25:31 2010] [error] [client xx.xx.xx.xx] Unknown relation alias sfGuardUser So something about sfDoctrineGuard again. The site worked until any reference in sfGuardUserProfile (my own class that referred to sfGuardUser via a FK named User [foreign key: Profile], and I was getting weird errors about sfGuardPermissions, sfGuardUser, and profile (all valid things in my schema). Finally fter digging through lib/model/doctrine for the 15th time, I noticed an "sfDoctrineGuardPlugin" folder with the previous solo folder, "base". Then I realized that the old sfDoctrineGuard stored it's base classes in "base" but the new version stored them in it's own folder, "sfDoctrineGuardPlugin". THere was a class or namespace collision, whatever. Locally it was working by fluke (base was being read first, I guess), but on the server it must have been "sfDoctrineGuardPlugin" that won out. So after deleting the sfGuard* classes in the "base" folder, everything worked! This took me a LNG time to resolve. * blush * Conclusion Wow, I shouldn't have upgraded. I didn't mention anywhere above, but one of the key reasons for my upgrading to 1.4 was doctrine:generate-migrations-diff. I though, "Wow, that's awesome, what a great way to update". However, everytime I generated a new migration there was detritus from sfDoctrineGuard in every itration (it was modifying a bunch of Fks - the same ones each time). Even from a migration-from-schema. * sigh * Probably something I was doing, or a version mis-match. I didn't have time to pursue it, I'm getting deadline-bound and had to move on. In hindsight, I think half of this was my fault, but it wasn't anywhere obvious that: a) There was a difference between the local and server mysql versions significant enough to interrogate. b) the sfDoctrineGuard authors changed the folder structure of the plug-in in lib c) sfDoctrineGuard added a REQUIRED and UNIQUE field so now email and username must be unique and not null. This messed up my fixtures (though it was easily fixed) --
[symfony-users] Re: sfWidgetFormJQueryDate option format is no longer supported in version 1.1.1?
On 12 Gen, 14:40, dziobacz wrote: > Massimiliano maybe you could create a plugin from your solution and > place it here:http://www.symfony-project.org/plugins/? :) I don't think a symfony plugin makes sense. Consider that my solution is a *pure-javascript* one. There's no php inside :-) Also, it's suitable for any date select (even if it's ready to work with symfony ones) Instead, maybe I'll do a single package to download and extract into a symfony project, to "just work". Massimiliano -- 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.