Zaktualizowałem mój Magento Store z 1.9.2.4 do 1.9.3.0
Używamy oprogramowania wysyłkowego (Shipworks), które łączy się za pośrednictwem użytkownika SOAP / XML-RPC.
Po aktualizacji rejestrowanie wysyłek pokazuje tę odpowiedź w dziennikach:
<?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>
Poszedłem i włączyłem rejestrowanie wyjątków w Magento i otrzymałem następujący błąd:
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}
Więc poszedłem i zrobiłem różnicę między Abstract.php z 1.9.2.4 i 1.9.3.0 i otrzymałem następujące:
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;
Każda pomoc będzie mile widziana.