Yii Framework Forum: Nested Intervals Bugs - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Nested Intervals Bugs Issues found in the nested intervals extension.

#1 User is offline   circa 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 24-January 13

Posted 24 January 2013 - 12:37 PM

If this is the incorrect place for a posting of this sort I apologize in advance.

I've been working on incorporating the nested intervals extension into a project I've been working on. The behavior pretty much works as it should, however I believe that I've uncovered a couple of bugs. I haven't found a bug reporting system to submit the issues to, and this forum software apparently disallows me from posting directly on the extension's page with my findings (since my account is "too new"), so I have come here.

The issues:

1. Function move() does not use NI key column name aliases
In the function move(), the return which generates four CDbExpression objects is not using the object properties $this->nv, $this->dv, $this->sdv, $this->sdv for the nv, dv, snv, and sdv column names in the SQL fragments it is generating. Instead it is hardcoding "nv", "dv", "snv", and "sdv" into the SQL, which will fail if the table schema is using different names for these respective columns.

2. Unable to delete root nodes
Calling deleteNode() on a node which is a root node fails with an exception: "Cannot get node's parent quadruple; node is a root note". This exception is thrown because deleteNode() makes a call to mockParent(), which makes a call to parentQuadruple(), which actually throws the exception. parentQuadruple() is acting logically, I would think, since it's logically impossible to have a parent for a root element. Therefore, I would suggest that the logic in mockParent() be changed to detect whether or not the node that it is acting on is a root node, and if it is a root node then the "parent" is the node itself.

Share this topic:

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users