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  
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 : 40 + 21 = ?

 
 [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.