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] 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!