[symfony-users] Re: FYI: Symfony Benchmark

2007-06-07 Thread Andreas Stephan

Two more sources that deal with the same topic:

http://paul-m-jones.com/blog/?p=236

http://www.sellersrank.com/php/cakephp-codeigniter-benchmark/

Although it seems they did not turn the helpers off as they did with
cake, the results are pretty compareable to the above.
So I guess symfony could use some performance optimization in the next
major release.


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: Javascript on another server?

2007-06-07 Thread Kiril Angov

What Florian is talking about is making Ajax requests from one server to 
another and that is considered cross domain scripting (if I am not 
mistaken). As far as I know you cannot do that as it is considered 
dangerous by the browsers. Anybody correct me if I am wrong.

So the answer to the original question will be yes, you can put absolute 
addresses to specify the location of your tinymce installation or no, 
you cannot. Unfortunately, I do not know the answer :)

Kupo

Dan Grossman wrote:
> More than 90% of all webpages contain JavaScript that resides on another 
> server. That's how Google AdSense, every web tracker/hit counter, and 
> virtually all 3rd party ad network works.
>
> Florian Klug wrote:
>   
>> hi, 
>>
>> On Thursday 07 June 2007 19:02, Eno wrote:
>>   
>> 
>>> Our javascript files live on another server (along with all of our
>>> images) and Im trying to integrate a rich text editor into our
>>> application.
>>>
>>> 
>>>   
>> I don't think that's a symfony issue, because afaik browsers don't execute 
>> javascript from any other server than the one which serves the page.
>>
>>
>> 
>>   
>> 
>
>
> >
>
>   


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: Javascript on another server?

2007-06-07 Thread Dan Grossman

More than 90% of all webpages contain JavaScript that resides on another 
server. That's how Google AdSense, every web tracker/hit counter, and 
virtually all 3rd party ad network works.

Florian Klug wrote:
> hi, 
>
> On Thursday 07 June 2007 19:02, Eno wrote:
>   
>> Our javascript files live on another server (along with all of our
>> images) and Im trying to integrate a rich text editor into our
>> application.
>>
>> 
>
> I don't think that's a symfony issue, because afaik browsers don't execute 
> javascript from any other server than the one which serves the page.
>
>
> >
>
>   


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: Javascript on another server?

2007-06-07 Thread Florian Klug

hi, 

On Thursday 07 June 2007 19:02, Eno wrote:
> Our javascript files live on another server (along with all of our
> images) and Im trying to integrate a rich text editor into our
> application.
>

I don't think that's a symfony issue, because afaik browsers don't execute 
javascript from any other server than the one which serves the page.


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Propel ID with manual setting

2007-06-07 Thread Piers Warmers

Hi,

I've come up with a problem : )

Here is the outline ... I mirror models, across two tables. I would  
like them to share ID values, however when I set the ID value for  
Propel objects, that value is not reflected in the generated SQL.

Is there an elegant way to handle this?

To digress with some more detail, I do something like this:

$person->setName("Piers");
$person->setId(23);
$person->save();

But the generated SQL is:

INSERT INTO person (NAME) VALUES ('Piers')

What I want it to be is:

INSERT INTO person (ID,NAME) VALUES (23,'Piers')

Any help would be much appreciated.

Thanks,
Piers

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: the group option in validation rules

2007-06-07 Thread JoeZ

for the 1 and 2, you have to put A, B in one group, and C, D in
another.
I guess it's not possible, but for the "3", you should put ABCD and E
in another group...

A:
  group: ab_group
  group: abcde_group
  yadd yadda
B:
  group: ab_group
  group: abcde_group
  yadda yada
C:
  group: cd_group
  group: abcde_group
  yadda yadda
D:
  group: cd_group
  group: abcde_group
  yadda yadda
E:
  group:abcde_group
  yadda yadda

Don't know if it will work, but it's worth the try!
anakreon wrote:
> Hello.
>
> I have a problem defining the rules for the case described below.
> There are 5 fields (let them be A,B,C,D,E).
> The requirements are
> 1: if A has a value, B must have a value and vice versa.
> 2: If C has a value, D must have a value and vice versa.
> 3: If A or B or C or D have a value then E must have a value
>
> A solution could be the group parameter in the validation config file
> but I can't figure out how to accomplish this.
>
> Any suggestions?


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Getting a template's altBody

2007-06-07 Thread Michael Smith

I'm using a batch script for sending emails like the snippet
http://www.symfony-project.com/snippets/snippet/47 . I get the html
main body by calling $mail->setBody($this->getPresentationFor('email',
'newsletter')). I was wondering if there was a way to get the altbody
template parsed like sfMailView does and add it to $mail-
>setAltBody(...)?


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: FYI: Symfony Benchmark

2007-06-07 Thread Jay Klehr

He uses an opcode cache (eAccelerator) in a follow-up test (but only 
tests CakePHP, CodeIngniter and Zend).

http://www.alrond.com/en/2007/feb/04/in-addition-to-the-test-of-mvc-frameworks/

He's also using FastCGI, which (based on data I've found) is a bit 
slower than mod_php. 

There are other benchmarks out there (I think I've seen a 
Rails/Django/Symfony one), and all seem to agree that Django is the 
fastest.  Of course, that's moot to me, since it takes me much longer to 
develop in Django since I'm not fluent in Python (though I do dabble 
with Django occasionally, which is helping my understanding of Python). ;-)

I'd like to see a Doctrine vs. Propel benchmark in Symfony once Doctrine 
reaches a stable release.

Jay


Dan Grossman wrote:
> Wonder what the results would've been if he was using an opcode cache 
> and ran sfOptimizerPlugin over the project beforehand. I'm seeing 
> virtually 100% cache hits with APC and Symfony:
>
> http://www.w3counter.com/apc.php
>
> Piers Warmers wrote:
>   
>> Thanks for the link Grimoire. Nicely presented research.
>>
>> I'd love to some of the code used in these tests. I know from my  
>> experiences with frameworks, stylistic coding changes can have a huge  
>> bearing on speed.
>>
>> For me, I found my original Symfony Apps were much slower than my  
>> latest. I think that is due to:
>>
>>  -   My better usage of the cache
>>
>>  -   More streamlined / lean model usage - I try and minimize access 
>> to  
>> joined table. Especially in listing pages.
>>
>>  -   I watch the number of DB queries like a hawk. I try and keep it 
>> as  
>> low as possible. Anything above 2-3 for a popular script, and I get  
>> worried.  But the again, I also wrap aluminum foil around my head  
>> so  : )
>>
>>  -   I've mostly stopped using the Admin generator. I find it way, 
>> way  
>> too verbose for my liking.
>>
>> So what have others found? how do you optimize you Symfony Apps?
>>
>> - Piers
>>
>>
>>
>>   
>> 
>>> http://www.alrond.com/en/2007/jan/25/performance-test-of-6-leading- 
>>> frameworks/
>>>
>>> Bad marketing for our lovely framework.
>>>
>>> -- 
>>> Grimoire Guru
>>> SourceMage GNU/Linux
>>>
>>> 
>>>   
>>   
>> 
>
>
> >
>
>   


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: FYI: Symfony Benchmark

2007-06-07 Thread Jay Klehr

He links to the source code he used:

http://static.alrond.com/source_sym.txt

Jay

Piers Warmers wrote:
> I'd love to some of the code used in these tests. I know from my  
> experiences with frameworks, stylistic coding changes can have a huge  
> bearing on speed.
>
>   


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: Doctrine bug

2007-06-07 Thread [EMAIL PROTECTED]

http://www.phpdoctrine.net/trac/changeset/1599 has fixed this issue, I
think


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Feed Reader

2007-06-07 Thread Rafael George

Hi guys, im working in a new RSS reader in Symfony and i want to know
how to make the sfFeed2Plugin, work using an HTTP Proxy.

Thanks in advance

-- 
Grimoire Guru
SourceMage GNU/Linux

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Javascript on another server?

2007-06-07 Thread Eno

Our javascript files live on another server (along with all of our
images) and Im trying to integrate a rich text editor into our
application.

It needs to be on another server and referenced by an absolute URL but
it looks like Symfony currently is wired to only look under /web when
loading the js files. What would be a good way to integrate TinyMCE
using absolute URLs to reference the js files? Do I need to skip using
rich=true in my textarea helpers and integrate this "manually" for
reach template?


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: AJAX indicator always visible

2007-06-07 Thread Jon Todd

Thanks for the help! Looks like one of these will work

On Jun 4, 9:14 pm, "Colin Williams" <[EMAIL PROTECTED]> wrote:
> I believe the function you desire can be done simply with the CSS position
> property set to 'fixed'.  Unfortunately, IE6 screws it all up for everyone,
> as usual, so you'll have to resort to some hacks for that.
>
> http://www.cssplay.co.uk/layouts/fixed.htmlhttp://tagsoup.com/cookbook/css/fixed/http://home.tampabay.rr.com/bmerkey/examples/fake-position-fixed.html
>
> All demonstrate pretty much the same hack, and you'll have to use separate
> stylesheet for IE<7.
>
> --Colin
>
> Oh, and alternately you could dissect gmail's code and find out how they do
> it.
>
> On 6/4/07, Jon Todd <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > I'm trying to make my ajax indicator that says 'Loading...' during an
> > AJAX call to act like the indicator on gmail. Regardless of scrolling
> > the indicator remains in the same spot on the page. I believe this
> > would be a rather simple javascript just wondering if anyone already
> > has an elegant solution.
>
> > The .NET folks have AlwaysVisibleControl:
>
> >http://ajax.asp.net/ajaxtoolkit/AlwaysVisibleControl/AlwaysVisibleCon...
>
> > We should have something similar in symfony. I'll write the plugin if
> > someone has the code.
>
> --
> "Doh!"  - Homer Simpson


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: Where can I find documentation about format_date?

2007-06-07 Thread Nathanael D. Noblet

Z wrote:
> dunno why you would want to use dateformat over date.  maybe make the
> code cleaner?

because format_date respects i18n, so you pass it the date, and a format 
type, and it'll return the date formatted for the locale.


> for the date formats, i just ended up playing with it.  it seems to
> follow some of the ISO formats.  you can look at:
> http://framework.zend.com/manual/en/zend.date.constants.html#zend.date.constants.selfdefinedformats

To see this, I had to look in the code I think 
sfDateFormatter.class.php, it has a switch statement someplace with the 
case and what the value is.


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: Integrating sfGuard with existing User table

2007-06-07 Thread Steve

Sorry, typo:

> where the `profile_class` variable is set to the name of your current
> "User" class that sfGuard is "taking over" and `profile_field_name` is
> the name column in your `profile_class` that is the foreign_key into
> the sfGuard's `id`

Should read:

...  and `profile_field_name` is  the name OF THE  column in your
`profile_class` that is the foreign_key into the sfGuard's `id`


-steve


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: Integrating sfGuard with existing User table

2007-06-07 Thread Steve

Hi,
> Hi everyone.  Symfony is a great framework!  I have a project based on
> askeet thats been in development for a short while, and I already have
> a User table, model classes, with a fair amount of cooperation with
> other tables.

I'm in a similar situation as you as well .. we waited to integrate
sfGuard after some time and already have code based on our "normal"
user class. So far, the integration/transition is going well.

That said, I'm not sure what your actual question is.

> from sfGuardSecurityUser.  There are still several places in my app
> where it expects a different object than its getting, which is causing
> problems.

What sort of problems are you dealing with, exactly?

As you mentioned, sfGuard can retrieve a "profile" class/table that
has all "the extra" user info that your current object may have that
the normal sf_guard_user table doesn't.

To configure sfGuard to use your current class, this is what you'll
need to drop into your app.yml file:

all:
  sf_guard_plugin:
profile_class: MyUserProfile
profile_field_name: id

where the `profile_class` variable is set to the name of your current
"User" class that sfGuard is "taking over" and `profile_field_name` is
the name column in your `profile_class` that is the foreign_key into
the sfGuard's `id`

Finally, you can access your current user class by calling the
sfGuardUser->getProfile() method.

You may find it convenient to add methods to the sfGuardUser class
that delegate to your inner profile so the amount of changes you do to
your existing codebase is minimal.

For instance, say your `MyUserProfile` class has a `doSomething`
method. Instead of changing your existing code to do something like:

$user->getProfile()->doSomething()` you can just add a `doSomething`
method to the sfGuardUser class that encapsulates this for you:

class sfGuardUser {

...

public function doSomething() {
  return $this->getProfile()->doSomething();
}

}

That's all the advice I have for you at the moment ... hope it helps,
-steve


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: FYI: Symfony Benchmark

2007-06-07 Thread Rafael George

Maybe it can be a good practice to create a wiki page with
optimizations tips for all users to see.

On 6/6/07, Dan Grossman <[EMAIL PROTECTED]> wrote:
>
> Wonder what the results would've been if he was using an opcode cache
> and ran sfOptimizerPlugin over the project beforehand. I'm seeing
> virtually 100% cache hits with APC and Symfony:
>
> http://www.w3counter.com/apc.php
>
> Piers Warmers wrote:
> > Thanks for the link Grimoire. Nicely presented research.
> >
> > I'd love to some of the code used in these tests. I know from my
> > experiences with frameworks, stylistic coding changes can have a huge
> > bearing on speed.
> >
> > For me, I found my original Symfony Apps were much slower than my
> > latest. I think that is due to:
> >
> >   -   My better usage of the cache
> >
> >   -   More streamlined / lean model usage - I try and minimize 
> > access to
> > joined table. Especially in listing pages.
> >
> >   -   I watch the number of DB queries like a hawk. I try and keep 
> > it as
> > low as possible. Anything above 2-3 for a popular script, and I get
> > worried.  But the again, I also wrap aluminum foil around my head
> > so  : )
> >
> >   -   I've mostly stopped using the Admin generator. I find it way, 
> > way
> > too verbose for my liking.
> >
> > So what have others found? how do you optimize you Symfony Apps?
> >
> > - Piers
> >
> >
> >
> >
> >> http://www.alrond.com/en/2007/jan/25/performance-test-of-6-leading-
> >> frameworks/
> >>
> >> Bad marketing for our lovely framework.
> >>
> >> --
> >> Grimoire Guru
> >> SourceMage GNU/Linux
> >>
> >>
> >
> > >
> >
> >
>
>
> >
>


-- 
Grimoire Guru
SourceMage GNU/Linux

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: propel-build-sql problem for multiple Database

2007-06-07 Thread andyjeffries

>From my experience no - although I don't then know how it would handle
if your different database are of different types (e.g.
mysql://user:[EMAIL PROTECTED]/foo and sqlite://localhost//foo.db).
I'm not in that situation though, so you get a resounding "it works
for me" :-)

Cheers,


Andy


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: sfPropelActAsNestedSetBehaviorPlugin can't read the whole tree

2007-06-07 Thread Tristan Rivoallan

On 6/7/07, Cipher Chien <[EMAIL PROTECTED]> wrote:
>
> Wow, cool.
>
> Your solution make the result correct.

be aware that it generates a supplementary query to the database.

> Thanks your reply and your excellent plug-in.

thansk for the kind words :)

++
tristan

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: propel-build-sql problem for multiple Database

2007-06-07 Thread JJ
Your help resolved that Issue. I have another query Is it required to make
changes in propel.ini for multiple DB. For  example  if I have DB1 and DB2
then its required to make saperate entry for DB1 and DB2 in propel.ini ?
 i.e.  At
propel.database.createUrl  = mysql://user:[EMAIL PROTECTED]/
propel.database.url= mysql://user:[EMAIL PROTECTED]/DB1

-- JJ


On 6/5/07, andyjeffries <[EMAIL PROTECTED]> wrote:
>
>
> I came across this recently (in my first week of starting with symfony
> - aren't I a lucky chap to hit this one so early).
>
> The answer is to specify a different model for the second schema
> (whichever you decide is the second one).  A given model in propel can
> only have one database.
>
> So you need a line like:
>
> database1:
>   _attributes: { package: lib.model.database1 }
>   table:
> ...
>
> It'll put the model files in lib/model/database1.
>
> Cheers,
>
>
> Andy
>
>
> >
>


-- 
Janak Jadeja
ASPL
http://www.aspl.in

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: sfPropelActAsNestedSetBehaviorPlugin can't read the whole tree

2007-06-07 Thread Cipher Chien

Wow, cool.

Your solution make the result correct.

Thanks your reply and your excellent plug-in.



Cipher Chien



On 6月7日, 下午5時20分, "Tristan Rivoallan" <[EMAIL PROTECTED]>
wrote:
> Hi,
>
> On 6/7/07, Cipher Chien <[EMAIL PROTECTED]> wrote:
>
> > It miss category1 and miss some sub nodes...
> > Is it a bug or my mistake?
>
> i'll look into it this aftnernoon.
> it may be a "reloading" issue. eg. try this for insertion :
>
>  $child->insertAsLastChildOf($parent->reload());
>
> ++
> tristan


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: sfPropelActAsNestedSetBehaviorPlugin can't read the whole tree

2007-06-07 Thread Tristan Rivoallan

Hi,

On 6/7/07, Cipher Chien <[EMAIL PROTECTED]> wrote:

> It miss category1 and miss some sub nodes...
> Is it a bug or my mistake?

i'll look into it this aftnernoon.
it may be a "reloading" issue. eg. try this for insertion :

 $child->insertAsLastChildOf($parent->reload());

++
tristan

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] sfPropelActAsNestedSetBehaviorPlugin can't read the whole tree

2007-06-07 Thread Cipher Chien

Hi,

I am trying to use  sfPropelActAsNestedSetBehaviorPlugin, but I got
some incorrect resluts.

I use the action to create test tree data:
  public function executeTester(){
  $root = new AboutClass();
  $root->makeRoot();
  $root->save();

  for($i = 1; $i<=1; $i++){
$p1 = new AboutClass();
$p1->setTitle('category'.$i);
$p1->insertAsLastChildOf($root);
$p1->save();

for($j=1; $j<=1; $j++){
  $p2 = new AboutClass();
  $p2->setTitle('category'.$i.'-'.$j);
  $p2->insertAsLastChildOf($p1);
  $p2->save();

  for($k=1; $k<=2; $k++){
$p3 = new AboutClass();
$p3->setTitle('category'.$i.'-'.$j.'-'.$k);
$p3->insertAsLastChildOf($p2);
$p3->save();
  }
}
  }
  }

and my view module code is:


getDescendants() as $node): ?>
  
getTitle() ?>
  



$i,$j and $k are the parameters in my action module.

when I set $i = 1, $j =1, $k=2 , the result is:
category1
   category1-1
  category1-1-1
  category1-1-2

but when I set $i = 1, $j =2, $k= 2, the result will be :
category1
category1-1
   category1-1-1
category1-2
 category1-2-1
 category1-2-2
category1-1-2

I got the lever values incorrectly.

And when I set $i=2, $j=2, $k=2, the result will be :
category2
category2-1
   category2-1-1
category2-2
 category2-2-1
 category2-2-2
   category2-1-2

It miss category1 and miss some sub nodes...
Is it a bug or my mistake?

PS: attached my testing data
id  tree_left   tree_right  tree_parent topic_idtitle
187 1   18
188 2   25  187 category1
189 3   28  188 category1-1
190 18  25  189 category1-1-1
191 26  27  189 category1-1-2
192 19  24  188 category1-2
193 20  21  192 category1-2-1
194 22  23  192 category1-2-2
195 4   13  187 category2
196 5   16  195 category2-1
197 6   13  196 category2-1-1
198 14  15  196 category2-1-2
199 7   12  195 category2-2
200 8   9   199 category2-2-1
201 10  11  199 category2-2-2


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---