[EXTENSION] EJNestedTreeActions

Sorry once again for the delay? Have you resolved your issue?

Hi there,

I think I’ve set up everything as recommended, but an error raise while calling the “render” action:


Property "TreeController.classname" is not defined.

in Render.php line 31 (if I call render with the existing id=1) or line 29 (with id=0).

Same error when calling the "createroot" action.

I’ve declared the beavior in my Tree.php model:


		'EJNestedTreeActions'=>array(

		    'class'=>'ext.EJNestedTreeActions.EBehavior',

		    'classname'=>'Tree',

		    'identity'=>'id',

		    'text'=>'name',

		),

Confusing …

no problem, thanks for replying

well, I have changed my categories (created a child node with the same name of the root node that was supposed to be moved and moved all the other children into it), the issue of moving a root directly into another root seems to be persistent

tks

regards!

:)

hey, guys,

Could somebody give me a hint, please?

I’m not sure if i’m doing something wrong, but I cannot delete any root node. Neither move them.

Message is "has not be deleted."

It’s weird because children nodes can be deleted with no problems.

Would the extension get confused if I deleted an empty root node in a multi-root tree directly in the db?

Any help would be very appreciated.

thanks

:( I am really sad ppl are facing problems with this extension.

No i don’t this will be an issue. If i remember correct the entry of an EMPTY root in a mutli-root tree has nothing that changes the hall structure.

@scoob.junior: Because I see you persist using this extension please send my a pm so i would know about your issue. I check this thread rarely. I will try to contact you as well.

@luc:

As you can notice


 Property "TreeController.classname" is not defined.

The render page looks for the property classname in the TreeController.

The error you have is because as i can see from your post

You have defined the behavior in a wrong place.

[list=1]

[*]EJNestedTreeActions goes to the CONTROLLER.

[*]NesteSet Behavior goes to MODEL.

[/list]

Hope you have resolved it by now.

Thanks, tydeas_dr

I’ve allready started to play again with nested sets.

And I’m getting somme results :wink: … But I’ve had to fix some issues:

First of all my tree model is "Category".

  • in createroot.php: the model name is hardcoded as “Tree” so change $modelClass = ‘Tree’; to $modelClass = CActiveRecord::model($this->getController()->classname);

  • same problem in render.php,

  • using the ability to move node or to rename node in the tree view (using your example.php view file) these two actions are complaining that:


You should not use CActiveRecord::save() method when ENestedSetBehavior attached.

So in movenode.php line 44, change $current->save(); to $current->saveNode();

And in renamenode.php line 62 change if($node->save()) to if($node->saveNode())

Do you use the late version from the http://www.github.com/dmtrs or another?

No, I’m using the latest version from extension repository.

For compatibility with the latest version of ENestedSetBehavior:

In Movenode.php and Renamenode.php change calls of the "parent()" function to "getParent()".

Edit:

Just found another call of the parent() function on line 160 of EBehavior.php. Change that to getParent() also.

Hi,

I have a problem which is more related to jsTree script than to extension, however maybe somebody can help me. It is about links in items tree doesn’t follow its href when cliked, it just selects item. I know I can do it by callbacks (href.location) but can’t it be simple done by html <a> functionality?

Any help appreciated.

I’m refreshing my question…

Hi Samdark,

I´m trying to use EJNestedTreeActions with ENestedBehavior and CJstree but I´m finding some troubles. With jstree 0.9.9a the tree displays but checkbox plugin is not working (cannot check/uncheck anything).

This is the jstree version I would like to use but in order to get it to work now I´m trying with 1.0rc but the folder structure, files names, etc seem to be different in this version. How did you do it without any changes?

After changing some configuration in "init" method of CjsTree.php this is what I get in the browser when displaying the tree:

{"type":"json","async":true,"opts":{"method":"GET","async":true,"url":"\/maptalent\/index.php\/site\/render"}}

Any hint on this?

Thanks in advance

You just saved my life/sanity/whatever! :lol:

It all works now.

I’ll probably fork it and issue a pull request.