Posted in Websites | 8 Comments
Magento 1.3 API Bug fixes
If your using the latest stable version of Magento 1.3 and are having issues with the XML RPC API you should try modifying the files below.

-
Bug #1: “Calling parameters do not match signature” when doing Login via XML RPC
The latest version of Zend Framework has altered the some of the array formats which will ultimately cause the Magento API to fail.
File: lib/Zend/XmlRpc/Server.php
Find this code:
if (!$matched) { #require_once 'Zend/XmlRpc/Server/Exception.php'; throw new Zend_XmlRpc_Server_Exception('Calling parameters do not match signature', 623);}
Replace with:
/*if (!$matched) { #require_once 'Zend/XmlRpc/Server/Exception.php'; throw new Zend_XmlRpc_Server_Exception('Calling parameters do not match signature', 623);}*/ -
Bug #2: “Access Denied” when doing Login via XML RPC
File: app/code/core/Mage/Api/Model/Server/Handler/Abstract.php
Find this code:
public function login($username, $apiKey){ $this->_startSession(); try { $this->_getSession()->login($username,$apiKey);
Replace with:
public function login($username, $apiKey){ $this->_startSession(); try { $this->_getSession()->login($username[0],$apiKey[0]);
Find this code:
public function call($sessionId, $apiPath, $args = array()){<br><br> $this->_startSession($sessionId);
Replace with:
public function call($sessionId, $apiPath, $args = array()){ $sessionId = $sessionId[0]; $apiPath = $apiPath[0];<br><br> $this->_startSession($sessionId);
For any questions regarding this post contact us at http://internetrnd.com/contact-us
Leave a comment if you found this useful!

Hi. thanks but it didn’t seem to work for me
I made both the changes for the Access Denied error, yet its still happening…any insights? Feel free to use the e-mail addy for communication.
Thanks!
Hello Guys,
I sent you both an Email with my contact info. I would like to know more about your setup and software versions.
Thanks!
BTW, I’m not too sure about how secure it is. Hope it’s not a security hole.
@Abdul: The API still requires the proper Login/Key combination. This just fixes a known bug between the updated Zend XML framework and Magento API.
You absolute legend!!
Been tearing my hair out trying to get the drupal/magento plugins to work and this sorted it
Thanks a million
Paul
You absolute legend!!
Been tearing my hair out trying to get the drupal/magento plugins to work and this sorted it
Thanks a million
Paul
Strange behaviour from Magento, because without these changes the xml-rpc login call works AFTER I inactivated and reactivated the user.
I performed a diff and didn’t found any changes in the code anymore (v1.3.2.4), it still works.