Re: [symfony-users] Non existent model 'Blogpost'
Why exactly are you using Symfony 1.1 considering it's no longer maintained? 2010/8/24 tek123 : > Hi, > > I have just started symfony 1.1 but I have ran into this complete > blockade. I seem to be stuck on the create an application part on > here: > > http://www.symfony-project.org/tutorial/1_1/en/my-first-project > > $ php symfony propel:generate-crud –non-verbose-templates –with-show > frontend post BlogPost > $ php symfony propel:generate-crud –non-verbose-templates frontend > comment BlogComment > $ php symfony cache:clear > > I get nonexistent model ‘BlogPost’. I am using windows XP, symfony > 1.1, wamp with XSL and the required extensions avaliable. All the > forums I’ve posted in have given no response and the users with this > problem in the forums said that they changed the schema but I copied > my schema from the tutorial. Can you please give some help to this > common problem? > > -- > If you want to report a vulnerability issue on symfony, please send it to > security at symfony-project.com > > You received this message because you are subscribed to the Google > Groups "symfony users" group. > To post to this group, send email to symfony-users@googlegroups.com > To unsubscribe from this group, send email to > symfony-users+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/symfony-users?hl=en > -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] Update password form
Hi all, I'm working on a simple form so my user can update his firstname, lastname, email and password informations, here is was I've done so far : useFields(array( 'first_name', 'last_name', 'email_address', )); $ws = $this->widgetSchema; $vs = $this->validatorSchema; // email IS required $vs['email_address'] = new sfValidatorEmail(array('required' => true)); // password field $ws['new_password'] = new sfWidgetFormInputPassword(); $vs ['new_password'] = new sfValidatorString(array('required' => false)); $ws->setLabel('new_password', 'Mot de passe'); // Password confirmation $ws['new_password_confirm'] = new sfWidgetFormInputPassword(); $vs['new_password_confirm'] = new sfValidatorString(array('required' => false)); $ws->setLabel('new_password_confirm', 'Confirmation'); $vs->setPostValidator(new sfValidatorSchemaCompare( 'new_password', sfValidatorSchemaCompare::EQUAL, 'new_password_confirm', array( 'required' => true ))); $vs->setPostValidator(new sfValidatorDoctrineUnique(array( 'model' => 'sfGuardUser', 'column' => array('email_address') ))); } } ?> Problem is,I want : - my user to HAVE to write his old password so I can check if it's valid before updating - my new_password and confirmation fields not to be required, so the user does not have to change his password every single time (this work w/ required = false) - my sfValidatorSchemaCompare to be called when the user fills the both fields I'm stuck here, thanks in advance for your help :) Romain -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en To unsubscribe, reply using "remove me" as the subject.
[symfony-users] Month-year date form widget
Hi All, I'd like to render a custom date widget, I don't need the day, I just want a month and a year, so here is what I do : $this->widgetSchema['date'] = new sfWidgetFormI18nDate(array( 'culture' => 'fr', 'format' => '%month%/%year%' )); I works fine, but to validate it, here what I do : $this->validatorSchema['date'] = new sfValidatorDate(array('date_format' => '\d{1,2}/\d{4}')); But my form's validation keeps returning my a "invalid" message... Any thoughts? Thanks ! -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] Re: Override some sfConfig params
That seems acceptable has most of these parameters will be used in my view... Thanks ! Le 17 mars 2010 à 17:58, Richtermeister a écrit : > I've also been playing with overriding sfConfig settings from an admin > panel. Depending on how early you need these settings to apply, this > is not really a difficult issue. In my case I listen for the even that > tells me that factories are loaded, and "inject" my custom settings > there. You have to wait for the database to be available, that's the > only limitation. > > Daniel > > > On Mar 17, 3:05 am, Daniel Lohse wrote: >> Take a look at the >> csSettingsPlugin:http://www.symfony-project.org/plugins/csSettingsPlugin >> >> Regards, Daniel >> >> On 17.03.2010, at 09:58, Romain Pouclet wrote: >> >>> Hi all, >> >>> I'd like the "webmaster" of my application to be able to set the value of >>> some config parameters, typically "comments_moderation : true / false". >>> It would be awesome if I could use it throught sfConfig class, anyway of >>> doing that? I was about to create a "parameters" database, but I'd like to >>> be sure it's the right way to do this :) >> >>> Thanks ! >> >>> Romain >> >>> -- >>> If you want to report a vulnerability issue on symfony, please send it to >>> security at symfony-project.com >> >>> You received this message because you are subscribed to the Google >>> Groups "symfony users" group. >>> To post to this group, send email to symfony-users@googlegroups.com >>> To unsubscribe from this group, send email to >>> symfony-users+unsubscr...@googlegroups.com >>> For more options, visit this group at >>> http://groups.google.com/group/symfony-users?hl=en > > -- > If you want to report a vulnerability issue on symfony, please send it to > security at symfony-project.com > > You received this message because you are subscribed to the Google > Groups "symfony users" group. > To post to this group, send email to symfony-users@googlegroups.com > To unsubscribe from this group, send email to > symfony-users+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/symfony-users?hl=en -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] Override some sfConfig params
Hi all, I'd like the "webmaster" of my application to be able to set the value of some config parameters, typically "comments_moderation : true / false". It would be awesome if I could use it throught sfConfig class, anyway of doing that? I was about to create a "parameters" database, but I'd like to be sure it's the right way to do this :) Thanks ! Romain -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, 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] Unescaping HTML content
I finally figured it out, this is what I found when I looked at my colleague layout.php : http://up.r12t.fr/94fc46c2.png He was passing $sf_content to a partial, so escaping then unescaping in my template, and finally re-escaping in the partial T_T Thanks for your time anyway :) Le 11 mars 2010 à 16:59, Marc Weistroff a écrit : > It's because objects and variable are escaped before being passed to the view. > > Are you echoing your content inside a slot (or partial?) that might be > automatically or manually escaped after that? > > > > On Thu, Mar 11, 2010 at 4:52 PM, Romain Pouclet wrote: >> It does not change anything, I really don't get why and more importantly why >> my $page variable classname is "sfOutputEscaperIteratorDecorator"? That >> doesn't make any sense :/ >> I tried to deactivate the escaping, and I got my HTML properly displayed, >> the problem is somewhere else... >> Le 11 mars 2010 à 15:04, Giorgio Mandolini a écrit : >> >> Hi, >> >> try $page->getContent('ESC_RAW'); >> >> or setup the default escaping behaviour in settings.yml >> >> check this: >> http://www.symfony-project.org/book/1_2/07-Inside-the-View-Layer#chapter_07_output_escaping >> >> Giorgio Mandolini >> >> 2010/3/11 Romain Pouclet >>> >>> Hi all, >>> I have a "Page" model with a "content" property. This content contains >>> HTML coming from the tinymce WYSIWYG editor, but when I do : >>> >> // ... >>> echo $page->getContent(); >>> // >>> ?> >>> The HTML tags are escaped, which is good but I don't want Symfony to >>> escape this one. Here is what I tried : >>> >> slot('title', $page->getTitle()); >>> echo sfOutputEscaper::unescape($page->getContent()) ; >>> ?> >>> But it doesn't work either... >>> I even tried: var_dump($page->getContent()); just to check what I >>> received, and even what is returned by var_dump( xdebug is installed and >>> activated), is escaped ! >>> string >> color='#cc'>'<p><strong>Lorem ipsum dolor sit >>> amet</strong>, consectetur adipiscing elit. Maecenas dapibus lobortis >>> posuere. Vestibulum tempus commodo diam. Quisque suscipit fermentum lacus ac >>> venenatis. Mauris ac nibh id purus eleifend accumsan sed vitae nulla. >>> Vestibulum fermentum leo vitae odio rhoncus ac commodo orci sagittis. Ut >>> pharetra neque id mauris tincidunt eu sodales felis sollicitudin. Mauris eu >>> gravida nibh. Pellentesque eros risus, facilisis et interdum nec, fringilla >>> a nisi. Fusce matti'... (length=1089) >>> Is there anybody to explain it to me ? >>> Thanks a lot ! >>> Romain >>> >>> -- >>> If you want to report a vulnerability issue on symfony, please send it to >>> security at symfony-project.com >>> >>> You received this message because you are subscribed to the Google >>> Groups "symfony users" group. >>> To post to this group, send email to symfony-users@googlegroups.com >>> To unsubscribe from this group, send email to >>> symfony-users+unsubscr...@googlegroups.com >>> For more options, visit this group at >>> http://groups.google.com/group/symfony-users?hl=en >> >> >> -- >> If you want to report a vulnerability issue on symfony, please send it to >> security at symfony-project.com >> >> You received this message because you are subscribed to the Google >> Groups "symfony users" group. >> To post to this group, send email to symfony-users@googlegroups.com >> To unsubscribe from this group, send email to >> symfony-users+unsubscr...@googlegroups.com >> For more options, visit this group at >> http://groups.google.com/group/symfony-users?hl=en >> >> -- >> If you want to report a vulnerability issue on symfony, please send it to >> security at symfony-project.com >> >> You received this message because you are subscribed to the Google >> Groups "symfony users" group. >> To post to this group, send email to symfony-users@googlegroups.com >> To unsubscribe from this group, send email to >> symfony-users+unsubscr...@googlegroups.com >> For more options, visit this group at >> http://groups.google.com/group/symfony-users?hl=en >> > > -- > If you want to report a vulnerability issue on symfony, please send it to > security at symfony-project.com > > You received this message because you are subscribed to the Google > Groups "symfony users" group. > To post to this group, send email to symfony-users@googlegroups.com > To unsubscribe from this group, send email to > symfony-users+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/symfony-users?hl=en -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, 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] Unescaping HTML content
It does not change anything, I really don't get why and more importantly why my $page variable classname is "sfOutputEscaperIteratorDecorator"? That doesn't make any sense :/ I tried to deactivate the escaping, and I got my HTML properly displayed, the problem is somewhere else... Le 11 mars 2010 à 15:04, Giorgio Mandolini a écrit : > Hi, > > try $page->getContent('ESC_RAW'); > > or setup the default escaping behaviour in settings.yml > > check this: > http://www.symfony-project.org/book/1_2/07-Inside-the-View-Layer#chapter_07_output_escaping > > Giorgio Mandolini > > 2010/3/11 Romain Pouclet > > > > Hi all, > > I have a "Page" model with a "content" property. This content contains HTML > > coming from the tinymce WYSIWYG editor, but when I do : > > > // ... > > echo $page->getContent(); > > // > > ?> > > The HTML tags are escaped, which is good but I don't want Symfony to escape > > this one. Here is what I tried : > > > slot('title', $page->getTitle()); > > echo sfOutputEscaper::unescape($page->getContent()) ; > > ?> > > But it doesn't work either... > > I even tried: var_dump($page->getContent()); just to check what I received, > > and even what is returned by var_dump( xdebug is installed and activated), > > is escaped ! > > string > color='#cc'>'<p><strong>Lorem ipsum dolor sit > > amet</strong>, consectetur adipiscing elit. Maecenas dapibus lobortis > > posuere. Vestibulum tempus commodo diam. Quisque suscipit fermentum lacus > > ac venenatis. Mauris ac nibh id purus eleifend accumsan sed vitae nulla. > > Vestibulum fermentum leo vitae odio rhoncus ac commodo orci sagittis. Ut > > pharetra neque id mauris tincidunt eu sodales felis sollicitudin. Mauris eu > > gravida nibh. Pellentesque eros risus, facilisis et interdum nec, fringilla > > a nisi. Fusce matti'... (length=1089) > > Is there anybody to explain it to me ? > > Thanks a lot ! > > Romain > > > > -- > > If you want to report a vulnerability issue on symfony, please send it to > > security at symfony-project.com > > > > You received this message because you are subscribed to the Google > > Groups "symfony users" group. > > To post to this group, send email to symfony-users@googlegroups.com > > To unsubscribe from this group, send email to > > symfony-users+unsubscr...@googlegroups.com > > For more options, visit this group at > > http://groups.google.com/group/symfony-users?hl=en > > > -- > If you want to report a vulnerability issue on symfony, please send it to > security at symfony-project.com > > You received this message because you are subscribed to the Google > Groups "symfony users" group. > To post to this group, send email to symfony-users@googlegroups.com > To unsubscribe from this group, send email to > symfony-users+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/symfony-users?hl=en -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] Re: Unescaping HTML content
Le 11 mars 2010 à 15:30, Raphael Schumacher a écrit : > Have you verified (e.g. using your debugger) that the object's > classnames are in reality what you should expect in theory? http://up.r12t.fr/8c2b8c76.png Yep, It's "NOEPage" as it's supposed to be > - the escaping strategy for your application? # Output escaping settings escaping_strategy: true escaping_method:ESC_SPECIALCHARS > - the classname of $page object? (should be > sfOutputEscaperObjectDecorator) http://up.r12t.fr/a4dbee66.png wow, it's an instance of "sfOutputEscaperIteratorDecorator", can I say WTF ? I'm fetching it using sfDoctrineRoute, I don't get it oO $this->page = $this->getRoute()->getObject(); $this->forward404unless($this->page); > - the classname of $page->$value property? (should be Page) what do you mean ? > - is this code contained in a layout, template, component (slot) or a > partial? > It's a template Thanks ! :) > -- > If you want to report a vulnerability issue on symfony, please send it to > security at symfony-project.com > > You received this message because you are subscribed to the Google > Groups "symfony users" group. > To post to this group, send email to symfony-users@googlegroups.com > To unsubscribe from this group, send email to > symfony-users+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/symfony-users?hl=en -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] Re: Unescaping HTML content
None of this worked, and I really don't get why even my var_dump() is escaped, it never happened before :/ With : getTitle()); echo $page->getContent(ESC_RAW); die(); ?> I can see my HTML is properly unescaped, somehow my view is re-escaped, is it possible to deactivate that? oO Le 11 mars 2010 à 15:05, Raphael Schumacher a écrit : > Hi Romain, how about >$page->getContent(ESC_RAW); > or also: >$page->getRawValue()->getContent(); > ? > > With $page you are actually talking to a > sfOutputEscaperObjectDecorator object, which holds your Page object in > its $value property. > > See the __call method in class sfOutputEscaperObjectDecorator (symfony > lib v.1.4.3). > RAPHAEL+ > > -- > If you want to report a vulnerability issue on symfony, please send it to > security at symfony-project.com > > You received this message because you are subscribed to the Google > Groups "symfony users" group. > To post to this group, send email to symfony-users@googlegroups.com > To unsubscribe from this group, send email to > symfony-users+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/symfony-users?hl=en -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] Unescaping HTML content
Hi all, I have a "Page" model with a "content" property. This content contains HTML coming from the tinymce WYSIWYG editor, but when I do : getContent(); // ?> The HTML tags are escaped, which is good but I don't want Symfony to escape this one. Here is what I tried : getTitle()); echo sfOutputEscaper::unescape($page->getContent()) ; ?> But it doesn't work either... I even tried: var_dump($page->getContent()); just to check what I received, and even what is returned by var_dump( xdebug is installed and activated), is escaped ! string 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas dapibus lobortis posuere. Vestibulum tempus commodo diam. Quisque suscipit fermentum lacus ac venenatis. Mauris ac nibh id purus eleifend accumsan sed vitae nulla. Vestibulum fermentum leo vitae odio rhoncus ac commodo orci sagittis. Ut pharetra neque id mauris tincidunt eu sodales felis sollicitudin. Mauris eu gravida nibh. Pellentesque eros risus, facilisis et interdum nec, fringilla a nisi. Fusce matti'... (length=1089) Is there anybody to explain it to me ? Thanks a lot ! Romain -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, 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 override the default "login" action w/ sfDoctrineGuard plugin?
Hi all, I have an "admin" application which is secured (is_secure: true). I'd like to override its login action so I can set a specific layout and manually render the login form. Can you tell my how to do that? I started with something like this : http://groups.google.com/group/symfony-users?hl=en.
Re: [symfony-users] Fabien's Symfony 2 presentation now available as a video
The video is private, is it normal? :x Le 22 févr. 2010 à 08:54, Ben Haines a écrit : > Sorry for the delay in getting this up. HD (720p) uploads to Vimeo.com > kept failing. So here is a lower resolution version. > > Enjoy and of course thanks to all Symfony devs and sflive2010 > organisers! > > http://www.vimeo.com/9636197 > > -- > 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] Simple question...
You could add a getStatus() method (or something like that) in your model class : public function getStatus() { return $this->isActive() ? 'Active' : 'Inactive'; } Le 19 févr. 2010 à 18:27, Samuel Morhaim a écrit : > If I have a field isActive and of course it returns 1 or 0 .. how can > I change the class to return Active / Inacrive as a string, and not > doing it on the view for each time i use it? > > Thank 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-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] Nested set rendering
Thanks for your help, it works :) For those who are interested, here it is : http://gist.github.com/292543 Cheers ! Le 1 févr. 2010 à 16:57, Bernhard Schussek a écrit : > You could, for instance, write a recursive render helper: > > function render_nested_set(Doctrine_Collection $collection) > { > $output = "\n"; > > foreach ($collection as $record) > { >$output .= "".$record; // __toString(), or whatever you like > >if ($record->getNode()->hasChildren()) >{ > $output .= "\n".render_nested_set($record->getNode()->getChildren()); >} > >$output .= "\n"; >} > } > > return $output."\n"; > > } > > > Bernhard > > -- > 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] NestedSet doctrine behavior : hasChildren() and getChildren() disconnectedness
Hi all, I'm using nested set doctrine behavior, and as I my previous issue I'm using a helper to render my tree, so here is how I use it : getLabel() ?> getNode()->hasChildren()) : ?> getNode()->getChildren()), sfOutputEscaper::unescape($path) ) ?> But today, I had a very strange bug, an error like "render_nested_set() must be an instance of Doctrine_Collection, boolean given"... How is that even possible considering that I'm checking my root node actually HAS children ? For now I fixed it like this : getNode()->hasChildren() && false !== $root->getNode()->getChildren()) : ?> But it looks dirty to me... Any ideas? 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.
Re: [symfony-users] Nested set rendering
Problème is, I want my rendering to follow a path, as you can see in my "example". Anyway, a recursive render helper is a good start I guess! Maybe I should add a 'path' parameter helper to make something like : function render_nested_set(Doctrine_Collection $collection, array $path) { // ... } So I can use it this way : echo render_nested_set($tree, array(1, 3, 7, 8)); ? This way I can check every node, if its id is in my $path array, I render it... Something like that... What do you think ? Le 1 févr. 2010 à 16:57, Bernhard Schussek a écrit : > You could, for instance, write a recursive render helper: > > function render_nested_set(Doctrine_Collection $collection) > { > $output = "\n"; > > foreach ($collection as $record) > { >$output .= "".$record; // __toString(), or whatever you like > >if ($record->getNode()->hasChildren()) >{ > $output .= "\n".render_nested_set($record->getNode()->getChildren()); >} > >$output .= "\n"; >} > } > > return $output."\n"; > > } > > > Bernhard > > -- > 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] Nested set rendering
Hi there, I'm heavily working w/ Doctrine NestedSet behavior. I have a tree I'd like to render in a complex way. Let say I have a path for my selected node : node1 > node2 > node3 I'd like to render it so I can display : node 1 sibling 1 node 1 sibling 2 node 1 sibling 3 node 1 node 2 sibling 1 node 2 sibling 2 node2 node 3 node 3 child 1 node 3 child 2 node 3 child 3 node 1 sibling node 1 sibling node 1 sibling Do you have any idea how I can simply do that? I tried to do something but it ended w/ multiple imbricated foreach and while... Thanks ! Romain -- 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 migrations
Hi all, I am currently working on a Symfony application which is now in production. I still have to work on it so I have to set up some migrations but I must admit I'm completely lost here. I found a publication about setting up Doctrine Migrations (http://www.denderello.com/publications/guide-to-doctrine-migrations) but I have a few questions : - I don't know which case I'm in, should I use the "generate-migrations-db" or the "generate-migrations-model" task? What's the main difference? - I suppose I have to run this task in my prod env., send it to my production server and then do the migration ? - As I already have saved datas, the procedure should be : mysqldump > somefile.sql symfony doctrine:drop-db symfony doctrine:build-db symfony doctrine:build --all-classes --and-migrate mysql < somefile.sql Am I right? What if my migration implies to drop an entire table? And finally, I heard about the "doctrine:generate-migrations-diff" task, this task will generate all the classes w/ the up/down methods? Thanks in advance for your answers, I'm kinda lost here oO Romain -- 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] Can't build anything after project:deploy
build-sql works fine insert-sql throws me an error : -bash-3.2$ php ./symfony doctrine:insert-sql >> doctrine created tables successfully SQLSTATE[HY000]: General error: 1005 Can't create table './communau/#sql-66c9_784339.frm' (errno: 150). Failing Query: "ALTER TABLE noe_poll_question ADD CONSTRAINT noe_poll_question_question_id_noe_poll_id FOREIGN KEY (question_id) REFERENCES noe_poll(id) ON DELETE CASCADE". Failing Query: ALTER TABLE noe_poll_question ADD CONSTRAINT noe_poll_question_question_id_noe_poll_id FOREIGN KEY (question_id) REFERENCES noe_poll(id) ON DELETE CASCADE On the other hand, I configured my databases.yml file so I can connect to prod database from dev environment (juste for testing ;)), and I do have a permission issue : -bash-3.2$ php symfony doctrine:build --all --env=dev --no-confirmation >> doctrine Dropping "doctrine" database >> doctrine Creating "dev" environment "doctrine" database >> doctrine generating model classes >> file+ /doctrine_schema_14027.yml Warning: file_put_contents(/doctrine_schema_14027.yml): failed to open stream: Permission denied in /communau/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/task/sfDoctrineBaseTask.class.php on line 183 Invalid schema element named "0" at path "Warning" At this line, I do have a reference to my "tmp" dir (as doctrine is using "sys_get_temp_dir()") $file = realpath(sys_get_temp_dir()).'/doctrine_schema_'.rand(1, 9).'.yml'; $this->logSection('file+', $file); file_put_contents($file, sfYaml::dump($models, 4)); Problem is, we can't change the permissions on that folder, we have to ask our client's... That's my problem, right ? Le 28 janv. 2010 à 20:07, Augusto Flavio a écrit : > No. > > I don't have /tmp folder on my prod server too and the project works fine. > Have you sure that all files is sync with the dev environment (dev server)? > Did you fix the permissions? Check whether the sql file correctly. > > To do it run only the sql schema. ./symfony doctrine:build-sql && ./symfony > doctrine:insert-sql > > > And tell me what is going on. > > > Augusto Morais > > -- > 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] Can't build anything after project:deploy
According to some tests, I don't have "/tmp" folder on this server, but this is where php is supposed to create tmp files, do you think this could come from there? The fact that php doesn't find this yml file ? Le 28 janv. 2010 à 18:21, Augusto Flavio a écrit : > I had a similar problem too with the symfomy's deployment. Not building the > classes but in deployment. The symfony's interface of rsync doenst clear the > buffer in sfProjectDeployTask at the moment that the rsync is executed. The > fix is only clear the outbuffer before execute the rsync command. I create a > ticket that can be check here: http://trac.symfony-project.org/ticket/8177 > > > Maybe the problem are the permissions. Have you sure that its ok? > > chmod 755 -R /project/* > ./symfony project:permissions > > > Whether it not resolve your problem try to find the yml not found when you > run the "builder". > > > Bye > > > Augusto Morais > > -- > 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] Can't build anything after project:deploy
Hi, Sorry I'm using Symfony 1.4... My database access are correct because I can connect to my db server when I try a "mysql -u" Le 28 janv. 2010 à 17:57, Augusto Flavio a écrit : > Hi Romain, > > > Which version of symfony you are using. > > Is ok your DB connection? This is a common problem that happen after the > deploy to the prod server. > > > Bye > > > Augusto Morais > > -- > 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 build anything after project:deploy
Hi all, I'm having a really strange issue w/ my project, I can't build anything using doctrine:build task... This works just fine if I'm running it from my local working-copy : ./symfony doctrine:build --all --env=prod if I run it from the production server, I have this error : "No yml schema found in /doctrine_schema_87228.yml" But I don't know what or where this file is... Anybody knows how to fix this? Thanks ! Romain -- 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 render embedded forms properly ?
Hi all, I'm working on a quiz module in my Symfony application, so I have a NoeQuizParticipationForm which is supposed to include all my questions subforms. Thus, I have a NoeQuizParticipationAnswerForm class which handles the user's answer to each question, in this class I only have one sfWidgetChoice widget. So here is what I do : getObject()->getQuiz()->getQuestions(); $subForm = new sfForm(); foreach ($questions as $qId => $question) { if (!$question->hasProposals()) { continue; } $answer = new NoeQuizParticipationAnswer(null); $answer->setParticipation($this->getObject()); $answer->setQuestion($question); $qForm = new NoeQuizParticipationAnswerForm($answer); $subForm->embedForm(sprintf('question%d', $qId), $qForm); } $this->embedForm('questions', $subForm); } } In my view, I want to render something like : [Question Label] [Question form] So here is what I do : getTitle() ?> My big problem is, my $questionForm var is an instance of sfFormFieldSchema instead of NoeQuizParticipationAnswerForm... Is there anyway for me to reach my related NoeQuizParticipationAnswerForm form so I can use getObject()->getQuestion->getLabel() to display my question's label ? Thanks ! Romain -- 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.