On Oct 27, 11:28 am, AD7six <[EMAIL PROTECTED]> wrote:
> On Oct 26, 4:03 pm, MoD <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hello everyone!
> > I'm currently developing a project using CakePHP version 1.2.0.5875
> > pre-beta though I'm also familiarizing myself with it. I used a
> > TreeBehavior for categories module. Everything seemed ok, until I
> > didn't start using this behavior's own public methods - any method I
> > try to call from controller returns error. For example:
> > "Fatal error: Call to undefined function: generatetreelist()"
> > That is the way I connected behavior to the model:
> > "class Category extends AppModel
> > {
> >         var $name = 'Category';
>
> >         var $actsAs = array('Tree');
> > ...}"
>
> > And that's how I called it from controller:
> > "$categories = $this->Category->generateTreeList(null,
> > '{n}.Category.id', '{n}.Category.title');"
> > And that happen with just any public method in any behavior though
> > each behavior was surely loaded and before* methods in them work fine.
> > What am I missing?
>
> Have you got php compiled with --disable--overload (http://es2.php.net/
> overload)? if you run the testcase for the tree behavior does it fail?
>
> Cheers,
>
> AD

Sorry for the delay, I was away for several days.
Version of PHP is 4.4.2 and it is compiled with '--disable-all'
option. I can't recompile it as I don't have root access to the
server. Tested with PHP5 on own machine - everything was ok. So it's
PHP problem.
Here's the result of test cases:
"Fatal error: Call to undefined function: verify() in ...../cake/tests/
cases/libs/model/behaviors/tree.test.php on line 98"

As a temporary solution I've used Aleksey's Denisiuk advice to use
behaviors array of the model:
"$this->Category->behaviours['Tree']->generateTreeList($this-
>Category,'{n}.Category.id', '{n}.Category.title');"
That worked ok.
Is there any other choice except recompiling PHP?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to