我已经将我的Magento商店从1.9.2.4更新为1.9.3.0
我们使用通过SOAP / XML-RPC用户连接的运输软件(Shipworks)。
更新后,worksworks日志记录将在日志中显示以下响应:
<?xml version="1.0" encoding="UTF-8"?>
-<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
-<SOAP-ENV:Body>
-<SOAP-ENV:Fault>
<faultcode>1</faultcode>
<faultstring>Internal Error. Please see log for details.</faultstring>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
因此,我打开了Magento中的异常日志记录,并得到以下错误:
2016-10-13T18:24:14+00:00 ERR (3):
SoapFault exception: [1] Internal Error. Please see log for details. in /public_html/app/code/core/Mage/Api/Model/Server/Adapter/Soap.php:196
Stack trace:
#0 /public_html/app/code/core/Mage/Api/Model/Server/Handler/Abstract.php(140): Mage_Api_Model_Server_Adapter_Soap->fault('1', 'Internal Error....')
#1 /public_html/app/code/core/Mage/Api/Model/Server/Handler/Abstract.php(48): Mage_Api_Model_Server_Handler_Abstract->_fault('internal')
#2 /public_html/app/code/core/Mage/Api/Model/Server/Handler/Abstract.php(559): Mage_Api_Model_Server_Handler_Abstract->handlePhpError(4096, 'Argument 1 pass...', '/home/deepsix/p...', 559, Array)
#3 /public_html/app/code/core/Mage/Api/Model/Server/Handler/Abstract.php(299): Mage_Api_Model_Server_Handler_Abstract->processingMethodResult('<?xml version="...')
#4 [internal function]: Mage_Api_Model_Server_Handler_Abstract->call('ca4d34d100c92c8...', 'shipWorksApi.ge...', Array)
#5 /public_html/lib/Zend/Soap/Server.php(889): SoapServer->handle('<?xml version="...')
#6 /public_html/app/code/core/Mage/Api/Model/Server/Adapter/Soap.php(174): Zend_Soap_Server->handle()
#7 /public_html/app/code/core/Mage/Api/Model/Server.php(138): Mage_Api_Model_Server_Adapter_Soap->run()
#8 /public_html/app/code/core/Mage/Api/controllers/SoapController.php(40): Mage_Api_Model_Server->run()
#9 /public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Api_SoapController->indexAction()
#10 /public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('index')
#11 /public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#12 /public_html/app/code/core/Mage/Core/Model/App.php(365): Mage_Core_Controller_Varien_Front->dispatch()
#13 /public_html/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#14 /public_html/index.php(83): Mage::run('', 'store')
#15 {main}
因此,我在1.9.2.4和1.9.3.0的Abstract.php之间进行了比较,并获得了以下信息:
290a291
> $result = array();
292c293
< return $model->$method((is_array($args) ? $args : array($args)));
---
> $result = $model->$method((is_array($args) ? $args : array($args)));
294c295
< return $model->$method($args);
---
> $result = $model->$method($args);
296c297
< return call_user_func_array(array(&$model, $method), $args);
---
> $result = call_user_func_array(array(&$model, $method), $args);
297a299
> return $this->processingMethodResult($result);
403a406
> $callResult = array();
405c408
< $result[] = $model->$method((is_array($args) ? $args : array($args)));
---
> $callResult = $model->$method((is_array($args) ? $args : array($args)));
407c410
< $result[] = $model->$method($args);
---
> $callResult = $model->$method($args);
409c412
< $result[] = call_user_func_array(array(&$model, $method), $args);
---
> $callResult = call_user_func_array(array(&$model, $method), $args);
410a414
> $result[] = $this->processingMethodResult($callResult);
544a549,585
> }
>
> /**
> * Prepare Api data for XML exporting
> * See allowed characters in XML:
> * @link http://www.w3.org/TR/2000/REC-xml-20001006#NT-Char
> *
> * @param array $result
> * @return mixed
> */
> public function processingMethodResult(array $result)
> {
> foreach ($result as &$row) {
> if (!is_null($row) && !is_bool($row) && !is_numeric($row)) {
> $row = $this->processingRow($row);
> }
> }
> return $result;
> }
>
> /**
> * Prepare Api row data for XML exporting
> * Convert not allowed symbol to numeric character reference
> *
> * @param $row
> * @return mixed
> */
> public function processingRow($row)
> {
> $row = preg_replace_callback(
> '/[^\x{0009}\x{000a}\x{000d}\x{0020}-\x{D7FF}\x{E000}-\x{FFFD}\x{10000}-\x{10FFFF}]/u',
> function ($matches) {
> return '&#' . Mage::helper('core/string')->uniOrd($matches[0]) . ';';
> },
> $row
> );
> return $row;
任何帮助,将不胜感激。