Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.4.1

Bug #1188 wrong node in createNode listeners
Submitted: 2004-04-12 18:52 UTC
From: priit at e-positive dot ee Assigned: datenpunk
Status: Closed Package: DB_NestedSet
PHP Version: 4.3.4 OS: win
Roadmaps: (Not assigned)    

 [2004-04-12 18:52 UTC] priit at e-positive dot ee
Description: ------------ there's a bug in all create functions ( except createRootNode ) when calling listeners // EVENT (NodeCreate) if (!$this->_skipCallbacks && isset($this->_hasListeners['nodeCreate'])) { $this->triggerEvent('nodeCreate', $this->pickNode($id)); } and listener is called with the PARENT of just created node... It should be // EVENT (NodeCreate) if (!$this->_skipCallbacks && isset($this->_hasListeners['nodeCreate'])) { $this->triggerEvent('nodeCreate', $this->pickNode($node_id)); }


 [2004-04-12 19:45 UTC] dk at webcluster dot at
I will fix this within the next release but please note that the event listeners will go away one day as it was a mistake to ever include them. Everything the listeners where intended to can be done with $addSQL and other techniques in userland. So please PM me if you need help with it. However - it will be fixed ;) -- Daniel Khan
 [2004-04-12 20:05 UTC] priit at e-positive dot ee
I need those listeners as I have no intention to start write stored procedures - i like to have ability to use multiple engines, not just one. I have here something like Win Management Console - one tree linked with many different tables. By adding/dropping a node I sometimes need to do lot of database operations. Anyway I can add them back some way or another :-)
 [2004-04-12 20:07 UTC] dk at webcluster dot at
I'll surely fix it. BTW I have something similar. I now use event handlers in userland which works very fine.
 [2004-07-11 22:04 UTC] gurugeek
Dear Maintainer, Your package DB_Nestedset has currently 4 open bugs. We urge you to take the necessary steps to solve the reported issues at your soonest convenience. If the bug issue hasn’t been addressed yet you are kindly asked to take the necessary steps to ensure a prompt resolution of the problem. If you already addressed the reported problem feel free to change the bug status as soon as possible. Regards David Costa PEAR Quality Assurance
 [2004-07-23 22:24 UTC] dk at webcluster dot at
This bug has been fixed in CVS. In case this was a documentation problem, the fix will show up at the end of next Sunday (CET) on In case this was a website problem, the change will show up on the website in short time. Thank you for the report, and for helping us make PEAR better. Sorry for the delay!