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

Bug #7324 Problem using together with XMLRPC
Submitted: 2006-04-06 13:04 UTC
From: atisss at gmail dot com Assigned: kguest
Status: Closed Package: HTML_TreeMenu (version 1.2.0)
PHP Version: Irrelevant OS:
Roadmaps: 1.2.2    
Subscription  
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes. If this is not your bug, you can add a comment by following this link. If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
2008-08-23 16:40 UTC
Package:
Bug Type:
Summary:
From: atisss at gmail dot com
New email:
PHP Version: Package Version: OS:

 

 [2006-04-06 13:04 UTC] atisss at gmail dot com (Atis)
Description: ------------ I was trying to use it together with vcXMLRPC, however i got completely wrong results in tree captions. A little investigation showed that problem is somewhat connected with use of Array in 'TreeMenu.js'. vcXMLRPC adds Array.prototype.toXMLRPC = function(){...} however contents of it is printed out in text of tree node. For vcXMLRPC see: www.vcdn.org/Public/XMLRPC/ A quick workaround: within TreeMenu.prototype.drawMenu search for /** * Add event handlers */ var eventHandlers = ""; for (j in nodes[i].events) { eventHandlers += this.stringFormat('{0}="{1}" ', j, nodes[i].events[j]); } Before eventHandlers += ... add a line if (j != "toXMLRPC") However, this fixes problem only with vcXMLRPC, however problem might repeat for other packages. Different use of Array() should be considered. Expected result: ---------------- <a href="test.php" target="_self"><span>Second level</span></a> Actual result: -------------- <a href="test.php" target="_self"><span toxmlrpc="function () { var retstr = "><array><data>"; for (var i = 0; i < this.length; i++) { retstr += "<value>" + XMLRPC.getXML(this[i]) + "</value>"; } return retstr + "</data></array>"; }" >Second level</span>

Comments

 [2006-04-07 10:24 UTC] atisss at gmail dot com
A more general fix works. The same line could be replaced with if (typeof(nodes[i].events[j]) == 'function') continue;
 [2008-08-23 16:40 UTC] kguest (Ken Guest)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.