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)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 18 + 47 = ?

 
 [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)); }

Comments

 [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] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [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 pear.php.net. In case this was a pear.php.net 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!