[symfony-users] Re: how to install a symfony website
Of course not. I'm talking about someone technical, who knows how to install the like of Wordpress, and other popular PHP, but not familiar with Symfony, nor want/need to learn development in Symfony. On Mon, Oct 5, 2009 at 7:54 PM, Eno wrote: > > On Mon, 5 Oct 2009, Sid Bachtiar wrote: > >> I was trying to look something more for non-developer. >> >> Let's say I developed a website then when I give the source code to my >> client (who isn't computer illiterate, but is not familiar with >> Symfony); at the moment I'll have to teach them a lot of things on how >> to install/deploy, symfony commands (clear cache), how to change >> database settings, and so on. > > Frankly, what you're asking makes no sense. Deploying a web site is not > something you can just give to someone who is not technical. > > > > -- > > > > > > -- Blue Horn Ltd - System Development http://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-users@googlegroups.com To unsubscribe from this group, 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 install a symfony website
First, in your batches directory for your symfony write a batch script (in PHP even if you want) that will run all the necessary symfony commands needed, like "symfony cc" etc. Then make sure its all committed to SVN. I have found deploying to a server easier to do with SVN rather than rsync which is what the official symfony docs recommend. So you can have your sys admin svn checkout the application, run the batch script and away you go. You can even have your deployment script add the correct Virtual Host settings into apache for you. This is of course assuming your running a *nix box. On Mon, Oct 5, 2009 at 9:02 AM, Sid Bachtiar wrote: > > Of course not. I'm talking about someone technical, who knows how to > install the like of Wordpress, and other popular PHP, but not familiar > with Symfony, nor want/need to learn development in Symfony. > > On Mon, Oct 5, 2009 at 7:54 PM, Eno wrote: > > > > On Mon, 5 Oct 2009, Sid Bachtiar wrote: > > > >> I was trying to look something more for non-developer. > >> > >> Let's say I developed a website then when I give the source code to my > >> client (who isn't computer illiterate, but is not familiar with > >> Symfony); at the moment I'll have to teach them a lot of things on how > >> to install/deploy, symfony commands (clear cache), how to change > >> database settings, and so on. > > > > Frankly, what you're asking makes no sense. Deploying a web site is not > > something you can just give to someone who is not technical. > > > > > > > > -- > > > > > > > > > > > > > > > -- > Blue Horn Ltd - System Development > http://bluehorn.co.nz > > > > -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, 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] Raising events in a form
Hi all, Hope you can help with this - it's got me stumped! Using Symfony 1.2.9, I have a situation where I'm raising an event via the dispatcher, during the saving of a form - I have multiple embedded forms which need to raise the event upon each individual form's saving. I'm seeing this currently in a unit test for the form. I have added my event method in the project configuration as normal, using: $this->dispatcher->connect("transaction.add", array ("TransactionManager", "sendAllocationEmail")); and I'm then raising the event in my form class using: sfContext::getInstance()->getEventDispatcher()->notify(new sfEvent (null, "transaction.add", array())); (I've tried sfProjectConfiguration::getActive()->getEventDispatcher() as well) The problem is that the event is getting raised 4 times, no matter where in the form class I use this. I've tried moving it to the configure() method, I've tried removing all the embedded forms, and still my method is being called 4 times. The strange thing is, if I do: sfContext::getInstance()->getEventDispatcher()->notify(new sfEvent (null, "application.log", array("About to raise my event"))); sfContext::getInstance()->getEventDispatcher()->notify(new sfEvent (null, "transaction.add", array())); sfContext::getInstance()->getEventDispatcher()->notify(new sfEvent (null, "application.log", array("Raised my event"))); in my log, I get the following: Oct 05 09:29:35 symfony [info] {main} About to raise my event Oct 05 09:29:35 symfony [info] {main} In my event's method Oct 05 09:29:35 symfony [info] {main} In my event's method Oct 05 09:29:35 symfony [info] {main} In my event's method Oct 05 09:29:35 symfony [info] {main} In my event's method Oct 05 09:29:35 symfony [info] {main} Raised my event The only code I have in my event handler at the moment is the application.log call. Has anybody else come across this at all? Is there a better way to retrieve the event dispatcher in the form, apart from upgrading to Symfony 1.3? :-) Thanks in advance, Rich. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, 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: About embed forms
Hi Dennis, there is my schema: Feature: tableName: feature columns: id: type: integer(8) primary: true autoincrement: true name: type: string(255) notnull: true created_at: timestamp(25) updated_at: timestamp(25) relations: OpinionFeature: local: id foreign: feature_id type: many Opinion: tableName: opinion columns: id: type: integer(8) primary: true autoincrement: true title: type: string(255) notnull: true opiniontxt: type: string(2147483647) notnull: true is_active: type: integer(1) default: '0' notnull: true token: type: string(255) notnull: true created_at: timestamp(25) updated_at: timestamp(25) relations: OpinionFeature: local: id foreign: opinion_id type: many OpinionFeature: tableName: opinion_feature columns: opinion_id: type: integer(8) primary: true feature_id: type: integer(8) primary: true score: type: float(2147483647) notnull: true created_at: timestamp(25) updated_at: timestamp(25) relations: Opinion: local: opinion_id foreign: id type: one Feature: local: feature_id foreign: id type: one Its very similar to your schema. Mine havent got foreign_type but i think it works same yours... no? I did that with mysql workbench and then build schema... :) I think the problem was save embed forms i have to overwrite the saveEmbedForms function to set the opinionid of the OpinionFeature just at the moment of insert the opinion. Doing that it works, but i dont know if its the right way. Thank you very much. On 5 oct, 05:10, Dennis wrote: > So what you have is a: > > --1-to-many many-to-1-- > > (above is a good way to show a schema) > > So you have to set up your schema to reflect that: > > Keep in mind that you have to create the Parents, before creating the > children. > Parents HAVE an ID, Children are GIVEN or USE and ID. > > Parents are 'Opinion' and 'Feature'. > > Opinion: > tableName: opinion > columns: > opinion_id: > type: integer(8) > primary: true > sequence: opinion_opinion_id > opinion_name: > type: string(65) > notnull: true > relations: > OpinionFeature: > local: opinion_id > foreign: opinion_id > type: many > foreignType: one > > Feature: > tableName: feature > columns: > feature_id: > type: integer(8) > primary: true > sequence: feature_feature_id > feature_name: > type: string(32) > notnull: true > feature_desc: > type: string(128) > notnull: true > relations: > OpinionFeature: > local: feature_id > foreign: feature_id > type: many > foreignType: one > > OpinionFeature: > tableName: opinionfeature > columns: > opinion_id: > type: integer(8) > primary: true > feature_id: > type: integer(8) > primary: true > score: > type: integer(2) > notnull: true > relations: > Opinion: > local: opinion_id > foreign: opinion_id > type: one > foreignType: many > Feature: > local: feature_id > foreign: feature_id > type: one > foreignType: many > > See if this works :-) > > Personally, I like graphical database design tools. I make the design, > have it spit out the code for the database that I'm using, then make > the database, use Doctrine to build the schema (instead of composing > it like above), make my model-forms-filters, and go. > > I've had good luck using DezignForDatabases. The guy who makes it is > very helpful and friendly. It's not perfect, but it's great for the > price. > On Oct 2, 3:39 am, Francisco José Núñez Rivera > wrote: > > > But all the opinions have the same features. > > > Feature -> id , desc > > 1,Feature 1 ; 2, Feature2... > > > Opinion shows all the features.. > > Feature 1 -Score: > > Feature 2 - Score: > > > OpinionFeature -> opinion_id , feature_id , score > > I only insert a row here when im scoring a feature. > > > I think my schema is right... no? > > > Thank you very much. > > > 2009/10/1 Abraham Montilla > > > > elkrema, if you have I have an Opinion with many Features then the right > > > schema is > > > > Feature is: id, opinion_id, desc > > > OpinionFeature is: opinion_id, score > > > > that's why you have an integrity constraint violation I don't know how > > > i missed that first time i read your post hehe, that's all the problem > > > > 2009/10/1 elkrema > > > >> With unsetting only option id doesn't work. > > > >> The problem is that i am inserting the object of main form and the > > >> embedded objects too. > > > >> But i found a solution... I rewrite the function saveEmbeddedForms in > > >> OpinionForm > > > >> public function saveEmbeddedForms($con = null, $form
[symfony-users] symfony Usergroup Cologne
Hey everyone, for all those who haven't read it on the community list yet. I have created a mixxt community at http://symfony-usergroup-cologne.mixxt.de for organizing a symfony usergroup in the Cologne, Germany area. Everybody who wants to join us is very welcome (this includes people from Düsseldorf, Aachen, Leverkuse, etc. as well ;-) ). Hope to see some of you soon, Dennis --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, 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 install a symfony website
This is true, but if you deploy with svn don't forget: RewriteRule (\.svn)/(.*?) - [F,L] In your .htaccess. You don't want people snooping in the .svn folders. On Oct 5, 3:06 am, Gareth McCumskey wrote: > First, in your batches directory for your symfony write a batch script (in > PHP even if you want) that will run all the necessary symfony commands > needed, like "symfony cc" etc. Then make sure its all committed to SVN. I > have found deploying to a server easier to do with SVN rather than rsync > which is what the official symfony docs recommend. So you can have your sys > admin svn checkout the application, run the batch script and away you go. > > You can even have your deployment script add the correct Virtual Host > settings into apache for you. > > This is of course assuming your running a *nix box. > > > > > > On Mon, Oct 5, 2009 at 9:02 AM, Sid Bachtiar wrote: > > > Of course not. I'm talking about someone technical, who knows how to > > install the like of Wordpress, and other popular PHP, but not familiar > > with Symfony, nor want/need to learn development in Symfony. > > > On Mon, Oct 5, 2009 at 7:54 PM, Eno wrote: > > > > On Mon, 5 Oct 2009, Sid Bachtiar wrote: > > > >> I was trying to look something more for non-developer. > > > >> Let's say I developed a website then when I give the source code to my > > >> client (who isn't computer illiterate, but is not familiar with > > >> Symfony); at the moment I'll have to teach them a lot of things on how > > >> to install/deploy, symfony commands (clear cache), how to change > > >> database settings, and so on. > > > > Frankly, what you're asking makes no sense. Deploying a web site is not > > > something you can just give to someone who is not technical. > > > > -- > > > -- > > Blue Horn Ltd - System Development > >http://bluehorn.co.nz > > -- > Gareth McCumskeyhttp://garethmccumskey.blogspot.com > twitter: @garethmcc --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, 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 install a symfony website
By default when we checkout from SVN the permissions don't allow access to anything. Running symfony project:permissions sets permissions correctly for everything thats needed, including leaving .svn folders inaccessible except for the user that checked out (root in our case), so that .htaccess option isn't really necessary On Mon, Oct 5, 2009 at 1:26 PM, Tom Boutell wrote: > > This is true, but if you deploy with svn don't forget: > > RewriteRule (\.svn)/(.*?) - [F,L] > > In your .htaccess. You don't want people snooping in the .svn folders. > > On Oct 5, 3:06 am, Gareth McCumskey wrote: > > First, in your batches directory for your symfony write a batch script > (in > > PHP even if you want) that will run all the necessary symfony commands > > needed, like "symfony cc" etc. Then make sure its all committed to SVN. I > > have found deploying to a server easier to do with SVN rather than rsync > > which is what the official symfony docs recommend. So you can have your > sys > > admin svn checkout the application, run the batch script and away you go. > > > > You can even have your deployment script add the correct Virtual Host > > settings into apache for you. > > > > This is of course assuming your running a *nix box. > > > > > > > > > > > > On Mon, Oct 5, 2009 at 9:02 AM, Sid Bachtiar > wrote: > > > > > Of course not. I'm talking about someone technical, who knows how to > > > install the like of Wordpress, and other popular PHP, but not familiar > > > with Symfony, nor want/need to learn development in Symfony. > > > > > On Mon, Oct 5, 2009 at 7:54 PM, Eno wrote: > > > > > > On Mon, 5 Oct 2009, Sid Bachtiar wrote: > > > > > >> I was trying to look something more for non-developer. > > > > > >> Let's say I developed a website then when I give the source code to > my > > > >> client (who isn't computer illiterate, but is not familiar with > > > >> Symfony); at the moment I'll have to teach them a lot of things on > how > > > >> to install/deploy, symfony commands (clear cache), how to change > > > >> database settings, and so on. > > > > > > Frankly, what you're asking makes no sense. Deploying a web site is > not > > > > something you can just give to someone who is not technical. > > > > > > -- > > > > > -- > > > Blue Horn Ltd - System Development > > >http://bluehorn.co.nz > > > > -- > > Gareth McCumskeyhttp://garethmccumskey.blogspot.com > > twitter: @garethmcc > > > -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, 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 install a symfony website
svn export "repPath" should generate the structure without the .svn control folders/files. With 1.3 we have the installer option with generate:project - while it will require a rethink on how we deploy - could be more flexible/useful. It should be a more reliable approach - you'll be working with a functioning sf from the go-get. On Mon, 05 Oct 2009 13:41:52 +0200, Gareth McCumskey wrote: > By default when we checkout from SVN the permissions don't allow access > to > anything. Running symfony project:permissions sets permissions correctly > for > everything thats needed, including leaving .svn folders inaccessible > except > for the user that checked out (root in our case), so that .htaccess > option > isn't really necessary > > On Mon, Oct 5, 2009 at 1:26 PM, Tom Boutell wrote: > >> >> This is true, but if you deploy with svn don't forget: >> >> RewriteRule (\.svn)/(.*?) - [F,L] >> >> In your .htaccess. You don't want people snooping in the .svn folders. >> >> On Oct 5, 3:06 am, Gareth McCumskey wrote: >> > First, in your batches directory for your symfony write a batch script >> (in >> > PHP even if you want) that will run all the necessary symfony commands >> > needed, like "symfony cc" etc. Then make sure its all committed to >> SVN. I >> > have found deploying to a server easier to do with SVN rather than >> rsync >> > which is what the official symfony docs recommend. So you can have >> your >> sys >> > admin svn checkout the application, run the batch script and away you >> go. >> > >> > You can even have your deployment script add the correct Virtual Host >> > settings into apache for you. >> > >> > This is of course assuming your running a *nix box. >> > >> > >> > >> > >> > >> > On Mon, Oct 5, 2009 at 9:02 AM, Sid Bachtiar >> wrote: >> > >> > > Of course not. I'm talking about someone technical, who knows how to >> > > install the like of Wordpress, and other popular PHP, but not >> familiar >> > > with Symfony, nor want/need to learn development in Symfony. >> > >> > > On Mon, Oct 5, 2009 at 7:54 PM, Eno wrote: >> > >> > > > On Mon, 5 Oct 2009, Sid Bachtiar wrote: >> > >> > > >> I was trying to look something more for non-developer. >> > >> > > >> Let's say I developed a website then when I give the source code >> to >> my >> > > >> client (who isn't computer illiterate, but is not familiar with >> > > >> Symfony); at the moment I'll have to teach them a lot of things >> on >> how >> > > >> to install/deploy, symfony commands (clear cache), how to change >> > > >> database settings, and so on. >> > >> > > > Frankly, what you're asking makes no sense. Deploying a web site >> is >> not >> > > > something you can just give to someone who is not technical. >> > >> > > > -- >> > >> > > -- >> > > Blue Horn Ltd - System Development >> > >http://bluehorn.co.nz >> > >> > -- >> > Gareth McCumskeyhttp://garethmccumskey.blogspot.com >> > twitter: @garethmcc >> > >> > > -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] How can I initiate cookie based session with session id passed in URL in first request ?
Hi all Baiscally Im trying to force session handler to use session id passed in URL and create session cookie so that in next requests I won't have to pass session id again. I can get access to concrete session data by using known session id and if I pass it in URL like that: http://my.symfony.app/default/index?symfony=MY_KNOWN_SESSION_ID But then cookie is not created and next requests without session id in URL gest fresh cookie based session. I managed to get it working with my custom session handler class but I had to overwrite whole initialize method only to change one statement - this is rather ugly hack than elegant solution that is more preferable to me. Maybe someone could help me out to make this working using more elegant solution ? Thanks in advance -- Best regards Lukasz Wojciechowski New Generation Software +48 602 214 629 http://www.ngsoft.pl --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Doctrine identifying relationship (MySQL WB) problem
Hi, I'm developing my first symfony application and I used MySql workbench and the doctrine export plugin to do my data model. Now I'm finished modeling and if I let MySQL WB generate the DB there is no problem. If I export to a yaml file I get this (only the problematic small part of the model): [CODE] sfGuardUserProfile: tableName: sf_guard_user_profile columns: id: type: integer(4) primary: true notnull: true autoincrement: true user_id: type: integer(4) primary: true notnull: true email: type: string(80) unique: true notnull: true relations: sfGuardUser: local: user_id foreign: id foreignAlias: sfGuardUserProfiles onDelete: cascade onUpdate: restrict options: type: InnoDB PhoneNumber: tableName: phone_number columns: id: type: integer(8) primary: true unsigned: true notnull: true autoincrement: true profile_id: type: integer(4) primary: true notnull: true user_id: type: integer(4) primary: true notnull: true number: type: string(20) notnull: true relations: sfGuardUserProfile: local: profile_id foreign: id foreignAlias: PhoneNumbers onDelete: cascade onUpdate: restrict options: type: InnoDB [/CODE] As you can see I created an identifying relationship between sfGuardUser and sfGuardUserProfile. till here no problem. then I created an identifying relation between sfGuardUserProfile and PhoneNumber and here I get this error when running ./symfony doctrine:build-all-reload --no-confirmation (I run version 1.2.9 with doctrine) [CODE]SQLSTATE[HY000]: General error: 1005 Can't create table './ myDBDEV/#sql-9ca_51.frm' (errno: 150). Failing Query: ALTER TABLE sf_guard_user_profile ADD FOREIGN KEY (id) REFERENCES phone_number (profile_id)[/CODE] and mysql SHOW INNODB STATUS gives me: [CODE] LATEST FOREIGN KEY ERROR 091005 21:13:29 Error in foreign key constraint of table fotolion_nsnbDEV/#sql-9ca_60: FOREIGN KEY (id) REFERENCES phone_number(user_id): Cannot find an index in the referenced table where the referenced columns appear as the first columns, or column types in the table and the referenced table do not match for constraint. Note that the internal storage type of ENUM and SET changed in tables created with >= InnoDB-4.1.12, and such columns in old tables cannot be referenced by such columns in new tables. See http://dev.mysql.com/doc/refman/5.0/en/innodb-foreign-key-constraints.html for correct foreign key definition. [/CODE] I get this error for each table that has an identifying relationship to a table that has itself an identifying relationship (so a table that has a 3 fields primary key). if I make the relationship between sfGuardProfile and PhoneNumber non identifying (remove the user_id and profile_id from the primary key) like this: [CODE] PhoneNumber: tableName: phone_number columns: id: type: integer(8) primary: true unsigned: true notnull: true autoincrement: true profile_id: type: integer(4) notnull: true user_id: type: integer(4) notnull: true number: type: string(20) notnull: true relations: sfGuardUserProfile: local: profile_id foreign: id foreignAlias: PhoneNumbers onDelete: cascade onUpdate: restrict options: type: InnoDB [/CODE] then the build-all-reload command doesn't give any errors. the relevant sql generated by doctrine is: identifying rel: [CODE] CREATE TABLE phone_number (id BIGINT UNSIGNED AUTO_INCREMENT, profile_id INT, user_id INT, number VARCHAR(20) NOT NULL, type VARCHAR (255) NOT NULL, PRIMARY KEY(id, profile_id, user_id)) ENGINE = InnoDB; CREATE TABLE sf_guard_user_profile (id INT AUTO_INCREMENT, user_id INT, avatar BIGINT UNSIGNED NOT NULL, resumee BIGINT UNSIGNED NOT NULL, email VARCHAR(80) NOT NULL UNIQUE, last_name VARCHAR(45) NOT NULL, first_name VARCHAR(45) NOT NULL, birth_day DATE, gender VARCHAR (255), activities VARCHAR(255), interests VARCHAR(255), music_taste VARCHAR(255), creativity_field MEDIUMTEXT, short_summary VARCHAR(255), books VARCHAR(255), films VARCHAR(255), validate VARCHAR(17), INDEX resumee_idx (resumee), PRIMARY KEY(id, user_id)) ENGINE = InnoDB; ALTER TABLE phone_number ADD FOREIGN KEY (user_id) REFERENCES sf_guard_user_profile(id) ON UPDATE RESTRICT ON DELETE CASCADE; ALTER TABLE sf_guard_user_profile ADD FOREIGN KEY (user_id) REFERENCES sf_guard_user(id) ON UPDATE RESTRICT ON DELETE CASCADE; ALTER TABLE sf_guard_user_profile ADD FOREIGN KEY (id) REFERENCES phone_number(user_id); [/CODE] NON identifying rel: [CODE] CREATE TABLE phone_number (id BIGINT UNSIGNED AUTO_INCREMENT, profile_id INT NOT NULL, user_id INT NOT NULL, number VARCHAR(20) NOT NULL, type VARCHAR(255) NOT NULL, INDEX profile_id_idx
[symfony-users] Template in AJAX request
If I make an AJAX call, Symfony doesn't take the whole templates/ layout.php with it, only the indexSuccess.php. Is there a way to tell that also the layout has to be shown? I want a total AJAX refresh of the complete HTML. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, 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: PHP Fatal error: Uncaught exception 'sfStopException'
Hi Jake, Thanks for your input. I use $action->forward404Unless($condition) quite a few times in my application. I imagine the forward() is in that method. The strange this is that this error isn't logged in my local environment, so I'm wondering whether it is something to do with the php installation? I'm pretty sure the exception should be caught in the sfController class, so I don't know why I'm getting this error so many times in the logs. Thanks for any help, -ollie On Sep 25, 6:20 pm, Jake Barnes wrote: > Why are you using forward? Why not redirect or why not simply call a > given method? Why not just set the template to whatever you want? Why > forward? > > On Sep 24, 4:34 am, ollietb wrote: > > > > > Hi there > > I've noticed that my PHP logs are full of thousands of PHP Fatal > > error: Uncaught exception 'sfStopException' errors whenever an action > > is forwarded or redirected. It's making it hard for me to debug > > errors. The offending code is in the sfAction class. Here is one > > example. > > > public function forward($module, $action) > > { > > > $this->getController()->forward($module, $action); > > > throw new sfStopException(); > > } > > > The sfStopException is thrown but not caught. I'm thinking of using > > set_exception_handler() in the projectConfiguration class to override > > the default exception handler if an exception is not caught within a > > try/catch block. The exception handler would simply be a a function > > which die()s the current execution. Do any of you sfExperts have an > > opinion on this? Would it be better to override the forward method in > > my own Actions class? > > I'm running Symfony 1.1 on OS: Red Hat Enterprise Linux Server release > > 5.3 (Tikanga) 54 and PHP Version: 5.2.10 (eAccelerator is not > > installed) > > Thanks, > > -ollie --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, 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] Plugin site down?
tried to run 'plugin:install sfGuardPlugin', got this error: >> plugininstalling plugin "sfGuardPlugin" >> sfPearFrontendPlugin Could not download from >> sfPearFrontendPlugin >> "http://plugins.symfony-project.org/get/sfGuardPlugin/sfGuardPlugin-3.1.3.tar >> " >> sfPearFrontendPlugin (File >> sfPearFrontendPlugin >> http://plugins.symfony-project.org:80/get/sfGuardPlugin/sfGuardPlugin-3.1.3.tar >> sfPearFrontendPlugin not valid (received: HTTP/1.1 404 Not Found >> sfPearFrontendPlugin )) >> sfPearFrontendPlugin Invalid or missing remote package file is there a new plugin version? do i need to update something? -d ..oO David Wang Oo.. ..oO blog - http://www.udfi.biz ..oO JennieBot - www.jenniebot.com - helping you be a better you! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, 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] Future of Symfony & Selenium
Hi, Is the plan for everyone to continue using Selenium for javascript- related testing, or will symfony eventually be able to support those tests natively? I would *really* like to use sfBrower, but cannot because most everything we have is based on javascript. -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-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Doctrine Blamable Extension
I believe that it's /lib/doctrine_extensions/Blameable See slide 101: http://www.slideshare.net/jwage/symfony-13-doctrine-12 On Oct 2, 1:40 am, david wrote: > I've used the other extensions there without problems. > Create an lib\extensions\Blamable folder and then extra or co the doctrine > extension to it. > > Then just use it as you would any other behavior with: > > actAs: > Blamable > > On Thu, 01 Oct 2009 01:57:36 +0200, Michael Sullivan > > wrote: > > Has anyone had any luck integrating Doctrine's Blamable Extension > > located at > >http://www.doctrine-project.org/extension/Blameable/1_2-1_0into > > Symfony? I > > need this exact functionality within a Symfony project and I've tried to > > create similar functionality with no luck. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, 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: I18n + doctrine + admin generator = Doctrine_Validator_Exception
Hi Christopher, I've an issue with the i18n + admin generator + doctrine + forms I can't solve. This is my post: http://forum.symfony-project.org/index.php/t/23139/ I've been looking everywhere but I can't find the solution. Please, if you have any clue, let me know. Thanks in advance, Daniel On Sep 1, 11:12 am, "christopher o'connor" wrote: > Hi, > I have had the same error when we upgraded to doctrine 1.1.3 using > symfony 1.2.7 > > When I added the following code it seemed to solve the problem. > $this->getUser()->setCulture('en'); > The only thing I could track it down to was the Culture in User (in my > case en_GB), but if I set it to 'en' > The issue went away. > I am not convinced this is the correct solution as Culture to me > defines your language and country (and how things should be displayed) > and so should be xx_XX where xx is the language and XX is the country. > > If there is a better solution I would like to know > Thanks > Chris > > On Aug 25, 2:34 pm, devsmt wrote: > > > > * 1 validator failed onlang(length) > > > same error here, have you found a solution? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Doctrine: is it possible to use RLIKE in a SELECT ?
Hi, I'm doing a SELECT where I do a MAX() on a field, but the values starting with 2 letters must have priority on other values. To achieve this, I do in pure SQL : SELECT *, MAX(CONCAT(field RLIKE '^[A-Za-z]{2}', field)) FROM table; Which works very well. Now, when I try this in doctrine : $this->createQuery('n')->select('n.*, max(concat(n.fieldLIKE \'^[A-Za- z]{2}\', n.field))')->execute(); I got an exception: Doctrine_Query_Exception Unknown aggregate alias: RLIKE So, my question is, is it possible at all to use RLIKE in a Doctrine query ? How can I achieve my goal ? I tried with a Doctrine_RawSql object as well, but got the same result. I'm using symfony 1.2.9. Thanks in advance. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] symfony 1.0.21 + sybase with ODBC
Hello, We're trying to connect symfony 1.0.X with sybase using ODBC but has been impossible to get that works. We have this configuration on database.yml: all: propel: class: sfPropelDatabase param: dsn: odbc://user:passw...@server:port/dsnName Is that configuration OK?, Could you send me an example about how to connect symfony with any ODBC? Thanks in advance. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Formatting Doctrine forms particularly embedForm
I'm looking for information on how to create custom form formatters (such as the default list or table). It's mentioned here that it would be included in "Chapter 5" of this book but there is no Chapter 5: http://www.symfony-project.org/forms/1_2/en/03-Forms-for-web-Designers What I am trying to accomplish is a better handling of embedForm(). It seems that there is no way to isolate an embedded form as it is just "thrown" in as a field. I'd like to embed the form but almost keep it it's own thing. For instance you'd have maybe the following (imagine wiki formatting heh): = Page Form= * Some widget * Some widget = Category Form = * Some widget * Some widget The key here is that Category Form is not embedded as a field. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, 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] hello all
I have problem to save multi select data form combo into database with admin generator which is in the form of string means all values must be joint with comaa seperator. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, 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] Multiselect dropdown problem
I used following code to display multi-selected drop down box for country .. $this->widgetSchema['countries'] = new sfWidgetFormDoctrineChoice(array ( 'model' => 'Countries', 'multiple' => true, )); and now I want to save these multi-selected values in database by comma separated or in another table but it is saving "Array" string into database ... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, 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: Global validation: Propel unique validator issue
Sounds like you just need to set that organization id manually in your save method with the one you are logged in as. I'd write you some code but I'm responding on my phone heh. On Oct 2, 11:22 am, "yengama...@gmail.com" wrote: > BTW, a hidden input does the job, buy i have the risk of a user trying > to change organisation id with a custom request. So, how can i prevent > it? > > On Oct 2, 6:10 pm, "yengama...@gmail.com" > wrote: > > > > > Hi, > > > I have an application that has Volunteers, each one belonging to an > > Organisation with an assigned code. I need to check that there cannot > > be duplicated volunteers' codes within an organisation, so I used a > > sfValidatorPropelUnique passing code and organisation id as > > arguments. > > > When i log in as an organisation, I remove the organisation id field > > in the volunteer form, as an organisation cannot change it (it's a > > super-admin privilege). The problem is that PropelUnique validator > > doesn't work if organisation id field isn't in the form. How can i > > solve this? Do I need to change it to hidden? > > > Thanks in advance. > > > ps. I'm using admin generator, so a generator-ready solution would be > > very appreciated (avoiding partials if possible) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, 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] Passing "scoped" arguments to constructor via get_service()
Hi, I've been very impressed with the Dependency Injection framework of symfony and the awesome documentation that accompanies it, so thanks for that. I do have a question regarding the sfServiceContainer::getService interface. Let's say I have a class that has the following constructor: Foo::__construct($a, $b); And let's further say that $a and $b are generated during the course of running the program and cannot be determined when the application's dependency graph is wired up. It feels like I have two options: 1) I can remove $a and $b from the constructor and instead have them set via a secondary "init" method that I call after I get the service instance. 2) I can use sfServiceContainer::set_parameters() before calling getService(). This would allow me to set the values of $a and $b, which would then make them available in Foo's service definition. The problem with #1 is that I prefer that objects are as complete as possible after construction and find requiring a secondary method init () method error prone. The problem with #2 is that I'm putting data that is only valid for a single invocation of getService() into the "global" sfServiceContainer context. This could cause a problem if another portion of the application started relying on those parameters. I could work around this by subsequently removing the parameters after the object is constructed (or cloning the container), but this is clearly a messy work around. What'd I'd rather do is this: sfServiceContainer::getService('foo', array('paramA' => 1, 'paramB' => 2)). This would make paramA and paramB available during this single construction of Foo, but not pollute the sfServiceContainer context for subsequent calls into getService. Does adding this extension to getService make sense? I can help with a patch if the consensus is yes. Thanks, EJ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, 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] sf1.0: Foreign Key oddities when dealing with a through-class and the Symfony Admin Generator
Hi, I'm having a few weird problems with a Symfony Admin Generator created module. In short, I have two main Models (Article and Page), and a many-to-many relationship managed with a through-class (ArticlePage). ArticlePage also has a boolean property to indicate whether or not the Article should be featured on the associated Page. Here's an (abridged) schema.yml: page: id: title: { type: varchar(255), required: true } article: id: title: varchar(255) article_page: article_id: { type: integer, foreignTable: article, foreignReference: id } page_id: { type: integer, foreignTable: page, foreignReference: id } featured: { type: boolean, default: false } In the backend Article module (created by sfPropelAdminGenerator) I have an admin_check_list field to handle the many-to-many relationshop, and a second partial which lists the Pages, next to a checkbox to indicate whether the Article should be featured on that Page or not. I overloaded the updateArticleFromRequest action to include: protected function updateArticleFromRequest() { $featured = $this->getRequestParameter('feature_on_page'); foreach($this->article->getArticlePages() as $ap) { $ap->setFeatured(is_array($featured) && in_array($ap->getPageId(), $featured)); } return parent::updateArticleFromRequest(); } When the Article is saved, the ArticlePage choices from the admin_check_list get saved, but the featured flag doesn't. What's REALLY weird is that my DB Query Log shows that the items are being saved with the correct 'featured' flag, but they're then being deleted, and re-inserted without the featured flag! Here's the log straight from MySQL: UPDATE article_page SET FEATURED = 0 WHERE article_page.ID=108 UPDATE article_page SET FEATURED = 0 WHERE article_page.ID=107 UPDATE article_page SET FEATURED = 0 WHERE article_page.ID=106 UPDATE article_page SET FEATURED = 1 WHERE article_page.ID=105 UPDATE article_page SET FEATURED = 1 WHERE article_page.ID=104 UPDATE article_page SET FEATURED = 1 WHERE article_page.ID=103 DELETE FROM article_page WHERE article_page.ARTICLE_ID=221 INSERT INTO article_page (ARTICLE_ID,PAGE_ID) VALUES (221,2) INSERT INTO article_page (ARTICLE_ID,PAGE_ID) VALUES (221,34) INSERT INTO article_page (ARTICLE_ID,PAGE_ID) VALUES (221,65) INSERT INTO article_page (ARTICLE_ID,PAGE_ID) VALUES (221,75) INSERT INTO article_page (ARTICLE_ID,PAGE_ID) VALUES (221,80) INSERT INTO article_page (ARTICLE_ID,PAGE_ID) VALUES (221,91) I don't geddit. Any idea where I should start looking? I haven't overloaded any of the Article or ArticlePage's (do)Save methods - bit weird, huh? Ben --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, 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: Future of Symfony & Selenium
I am one of those that thinks that re-inventing the wheel is not good unless there is a really good reason for it (doing it better is one of those). Selenium is a major piece of software that does an awesome job. It would be really hard to do what it does in symfony. Pablo On Thu, Oct 1, 2009 at 1:47 PM, gamename wrote: > > Hi, > > Is the plan for everyone to continue using Selenium for javascript- > related testing, or will symfony eventually be able to support those > tests natively? I would *really* like to use sfBrower, but cannot > because most everything we have is based on javascript. > > -T > > > > -- Pablo Godel ServerGrove Networks http://servergrove.com/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, 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] environment specific service configuration for dependency injection
I´m looking at the symfony DI containers. I see I can import some definitions from another xml or yml. Is there a way import definitions based on actual environment? I need to have some specific configurations for my services that "extends" some general configuration. I want do define general configuration for the test/dev/prod envs but my specific configuration must stay the same. Anyone has a good solution for this? The only thing I could figure out yet is to extend the sfServiceContainerLoaderFileXml class and overide the parseImport or parseImports method. Any other ideas? Bruno --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, 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: environment specific service configuration for dependency injection
Hi, There is a pretty good example about this in the documentation (at the end of the capter) : http://components.symfony-project.org/dependency-injection/trunk/book/05-Service-Description On Mon, Oct 5, 2009 at 6:04 PM, Bruno Reis wrote: > > I´m looking at the symfony DI containers. I see I can import some > definitions from another xml or yml. > > Is there a way import definitions based on actual environment? > > I need to have some specific configurations for my services that > "extends" some general configuration. I want do define general > configuration for the test/dev/prod envs but my specific configuration > must stay the same. > > Anyone has a good solution for this? > > The only thing I could figure out yet is to extend the > sfServiceContainerLoaderFileXml class and overide the parseImport or > parseImports method. Any other ideas? > > Bruno > > > > -- Noël GUILBERT http://www.noelguilbert.com/ http://www.sensiolabs.com http://www.symfony-project.com Sensio Labs Tél: +33 1 40 99 80 80 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, 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: Template in AJAX request
Hey Hausa, if you replace the entire html, why not do a regular reload? The point of Ajax reloads is to load less than the whole page, otherwise there's no benefit. To answer your question though, have you tried $this -> setLayout ("layout"); in the ajax action? Daniel On Oct 5, 7:12 am, HAUSa wrote: > If I make an AJAX call, Symfony doesn't take the whole templates/ > layout.php with it, only the indexSuccess.php. > Is there a way to tell that also the layout has to be shown? > > I want a total AJAX refresh of the complete HTML. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, 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: environment specific service configuration for dependency injection
But that is the "oposite" of what I want. There you have specific env settings extending a common session setting. What I want is common setting extending specific environment ones. Thats is because I´ll have my "core" components in the env conf and these will have mocks. The specific confs wont have mocks and dont need to be extended 2009/10/5 noel guilbert : > Hi, > > There is a pretty good example about this in the documentation (at the end > of the capter) : > http://components.symfony-project.org/dependency-injection/trunk/book/05-Service-Description > > > On Mon, Oct 5, 2009 at 6:04 PM, Bruno Reis wrote: >> >> I´m looking at the symfony DI containers. I see I can import some >> definitions from another xml or yml. >> >> Is there a way import definitions based on actual environment? >> >> I need to have some specific configurations for my services that >> "extends" some general configuration. I want do define general >> configuration for the test/dev/prod envs but my specific configuration >> must stay the same. >> >> Anyone has a good solution for this? >> >> The only thing I could figure out yet is to extend the >> sfServiceContainerLoaderFileXml class and overide the parseImport or >> parseImports method. Any other ideas? >> >> Bruno >> >> > > > > -- > Noël GUILBERT > http://www.noelguilbert.com/ > http://www.sensiolabs.com > http://www.symfony-project.com > Sensio Labs > Tél: +33 1 40 99 80 80 > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, 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] sfWidgetFormSchemaFormatter granularity
Is there any way to do more granular things than mentioned here: http://www.thatsquality.com/articles/7-days-of-symfony-1-1-forms-widgets-and-validators-day7 For instance, I would like to add an "id" to the embedded form. Something like: $decoratorFormat = "%content%"; --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, 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: sfWidgetFormSchemaFormatter granularity
Also... thinking more into the situation. It would be interesting to see a way to also implement wrapping tags with the thus removing the need for the for= attribute. ie: On Oct 5, 3:12 pm, wiredcs wrote: > Is there any way to do more granular things than mentioned > here:http://www.thatsquality.com/articles/7-days-of-symfony-1-1-forms-widg... > > For instance, I would like to add an "id" to the embedded form. > Something like: > > $decoratorFormat = "%content%"; --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, 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: About embed forms
I got this off of a Fabien post, somewhere. If you look at it, it makes everything connect to the same parent record. It SHOULD save correctly. I am goin to try it in my project tonight. Let me know if it works for you. $user = new User(); $profile = new $user->Profile; $userForm = new UserForm($user); $profileForm = new ProfileForm($profile); $userForm->embedForm('Profile', $profileForm); On Oct 5, 2:13 am, elkrema wrote: > Hi Dennis, > > there is my schema: > > Feature: > tableName: feature > columns: > id: > type: integer(8) > primary: true > autoincrement: true > name: > type: string(255) > notnull: true > created_at: timestamp(25) > updated_at: timestamp(25) > relations: > OpinionFeature: > local: id > foreign: feature_id > type: many > > Opinion: > tableName: opinion > columns: > id: > type: integer(8) > primary: true > autoincrement: true > title: > type: string(255) > notnull: true > opiniontxt: > type: string(2147483647) > notnull: true > is_active: > type: integer(1) > default: '0' > notnull: true > token: > type: string(255) > notnull: true > created_at: timestamp(25) > updated_at: timestamp(25) > relations: > OpinionFeature: > local: id > foreign: opinion_id > type: many > > OpinionFeature: > tableName: opinion_feature > columns: > opinion_id: > type: integer(8) > primary: true > feature_id: > type: integer(8) > primary: true > score: > type: float(2147483647) > notnull: true > created_at: timestamp(25) > updated_at: timestamp(25) > relations: > Opinion: > local: opinion_id > foreign: id > type: one > Feature: > local: feature_id > foreign: id > type: one > > Its very similar to your schema. Mine havent got foreign_type but i > think it works same yours... no? > > I did that with mysql workbench and then build schema... :) > > I think the problem was save embed forms i have to overwrite the > saveEmbedForms function to set the opinionid of the OpinionFeature > just at the moment of insert the opinion. Doing that it works, but i > dont know if its the right way. > > Thank you very much. > > On 5 oct, 05:10, Dennis wrote: > > > So what you have is a: > > > --1-to-many many-to-1-- > > > (above is a good way to show a schema) > > > So you have to set up your schema to reflect that: > > > Keep in mind that you have to create the Parents, before creating the > > children. > > Parents HAVE an ID, Children are GIVEN or USE and ID. > > > Parents are 'Opinion' and 'Feature'. > > > Opinion: > > tableName: opinion > > columns: > > opinion_id: > > type: integer(8) > > primary: true > > sequence: opinion_opinion_id > > opinion_name: > > type: string(65) > > notnull: true > > relations: > > OpinionFeature: > > local: opinion_id > > foreign: opinion_id > > type: many > > foreignType: one > > > Feature: > > tableName: feature > > columns: > > feature_id: > > type: integer(8) > > primary: true > > sequence: feature_feature_id > > feature_name: > > type: string(32) > > notnull: true > > feature_desc: > > type: string(128) > > notnull: true > > relations: > > OpinionFeature: > > local: feature_id > > foreign: feature_id > > type: many > > foreignType: one > > > OpinionFeature: > > tableName: opinionfeature > > columns: > > opinion_id: > > type: integer(8) > > primary: true > > feature_id: > > type: integer(8) > > primary: true > > score: > > type: integer(2) > > notnull: true > > relations: > > Opinion: > > local: opinion_id > > foreign: opinion_id > > type: one > > foreignType: many > > Feature: > > local: feature_id > > foreign: feature_id > > type: one > > foreignType: many > > > See if this works :-) > > > Personally, I like graphical database design tools. I make the design, > > have it spit out the code for the database that I'm using, then make > > the database, use Doctrine to build the schema (instead of composing > > it like above), make my model-forms-filters, and go. > > > I've had good luck using DezignForDatabases. The guy who makes it is > > very helpful and friendly. It's not perfect, but it's great for the > > price. > > On Oct 2, 3:39 am, Francisco José Núñez Rivera > > wrote: > > > > But all the opinions have the same features. > > > > Feature -> id , desc > > > 1,Feature 1 ; 2, Feature2... > > > > Opinion shows all the features.. > > > Feature 1 -Score: > > > Feature 2 - Score: > > > > OpinionFeature -> opinion_id , feature_id , score > > > I only insert a row here when im scoring a feature. > > > > I think my sche
[symfony-users] Re: Template in AJAX request
I guess use form_remote_tag with the full page as the form On Mon, Oct 5, 2009 at 11:02 PM, Richtermeister wrote: > > Hey Hausa, > > if you replace the entire html, why not do a regular reload? > The point of Ajax reloads is to load less than the whole page, > otherwise there's no benefit. > > To answer your question though, have you tried $this -> setLayout > ("layout"); in the ajax action? > > Daniel > > > > On Oct 5, 7:12 am, HAUSa > wrote: > > If I make an AJAX call, Symfony doesn't take the whole templates/ > > layout.php with it, only the indexSuccess.php. > > Is there a way to tell that also the layout has to be shown? > > > > I want a total AJAX refresh of the complete HTML. > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, 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: About embed forms
I tried it with $opinion = new Opinion(); $opfeat = new $opinion->OpinionFeature; but cant find the class OpinionFeature... Otherwise i do the same you write (more or less). I think that when i'm showing opinion form it creates a new Opinion(); variable. Then i use that variable to set the new OpinionFeature var... $opfeat->setOpinionId($this->getObject()->id); $opfeat->setFeatureId($feature->getId()); $OFform = new OpinionFeatureForm($opfeat); $this->embedForm('feature_'.$feature->getId(), $OFform); But it doesnt work... i have to overwrite saveEmbedForms public function saveEmbeddedForms($con = null, $forms = null) { foreach($this->getEmbeddedForms() as $opinionForm) { $opinionForm->getObject()->setOpinionId($this->getObject()->getId()); } parent::saveEmbeddedForms($con, $forms); } I think there's a easier way to do this but.. i dont know. :( 2009/10/6 Dennis > > I got this off of a Fabien post, somewhere. If you look at it, it > makes everything connect to the same parent record. It SHOULD save > correctly. I am goin to try it in my project tonight. Let me know if > it works for you. > > > $user = new User(); > $profile = new $user->Profile; > $userForm = new UserForm($user); > $profileForm = new ProfileForm($profile); > $userForm->embedForm('Profile', $profileForm); > > > On Oct 5, 2:13 am, elkrema wrote: > > Hi Dennis, > > > > there is my schema: > > > > Feature: > > tableName: feature > > columns: > > id: > > type: integer(8) > > primary: true > > autoincrement: true > > name: > > type: string(255) > > notnull: true > > created_at: timestamp(25) > > updated_at: timestamp(25) > > relations: > > OpinionFeature: > > local: id > > foreign: feature_id > > type: many > > > > Opinion: > > tableName: opinion > > columns: > > id: > > type: integer(8) > > primary: true > > autoincrement: true > > title: > > type: string(255) > > notnull: true > > opiniontxt: > > type: string(2147483647) > > notnull: true > > is_active: > > type: integer(1) > > default: '0' > > notnull: true > > token: > > type: string(255) > > notnull: true > > created_at: timestamp(25) > > updated_at: timestamp(25) > > relations: > > OpinionFeature: > > local: id > > foreign: opinion_id > > type: many > > > > OpinionFeature: > > tableName: opinion_feature > > columns: > > opinion_id: > > type: integer(8) > > primary: true > > feature_id: > > type: integer(8) > > primary: true > > score: > > type: float(2147483647) > > notnull: true > > created_at: timestamp(25) > > updated_at: timestamp(25) > > relations: > > Opinion: > > local: opinion_id > > foreign: id > > type: one > > Feature: > > local: feature_id > > foreign: id > > type: one > > > > Its very similar to your schema. Mine havent got foreign_type but i > > think it works same yours... no? > > > > I did that with mysql workbench and then build schema... :) > > > > I think the problem was save embed forms i have to overwrite the > > saveEmbedForms function to set the opinionid of the OpinionFeature > > just at the moment of insert the opinion. Doing that it works, but i > > dont know if its the right way. > > > > Thank you very much. > > > > On 5 oct, 05:10, Dennis wrote: > > > > > So what you have is a: > > > > > --1-to-many many-to-1-- > > > > > (above is a good way to show a schema) > > > > > So you have to set up your schema to reflect that: > > > > > Keep in mind that you have to create the Parents, before creating the > > > children. > > > Parents HAVE an ID, Children are GIVEN or USE and ID. > > > > > Parents are 'Opinion' and 'Feature'. > > > > > Opinion: > > > tableName: opinion > > > columns: > > > opinion_id: > > > type: integer(8) > > > primary: true > > > sequence: opinion_opinion_id > > > opinion_name: > > > type: string(65) > > > notnull: true > > > relations: > > > OpinionFeature: > > > local: opinion_id > > > foreign: opinion_id > > > type: many > > > foreignType: one > > > > > Feature: > > > tableName: feature > > > columns: > > > feature_id: > > > type: integer(8) > > > primary: true > > > sequence: feature_feature_id > > > feature_name: > > > type: string(32) > > > notnull: true > > > feature_desc: > > > type: string(128) > > > notnull: true > > > relations: > > > OpinionFeature: > > > local: feature_id > > > foreign: feature_id > > > type: many > > > foreignType: one > > > > > OpinionFeature: > > > tableName: opinionfeature > > > columns: > > > opinion_id: > > > type: integer(8) > > > primary: true > > > feature_id: > > > ty