From 74bfba54c3a0131d8fa93b4e97b557d4f335317d Mon Sep 17 00:00:00 2001 From: M2E Pro Date: Wed, 13 Apr 2022 12:21:02 +0000 Subject: [PATCH] 6.21.2 (FINAL RELEASE) --- .../Ess/M2ePro/Block/Adminhtml/Support.php | 2 +- app/code/community/Ess/M2ePro/CHANGELOG | 7 +++- .../Ess/M2ePro/Helper/Module/Exception.php | 27 +++------------- .../Ess/M2ePro/Helper/Module/Log.php | 32 ++++++++++++++++++- .../Ess/M2ePro/Helper/Module/Logger.php | 23 ++----------- .../community/Ess/M2ePro/Helper/Server.php | 15 +++++---- .../Ebay/Template/StoreCategory/Builder.php | 14 +++----- .../M2ePro/Model/Servicing/Task/Settings.php | 9 +++++- app/code/community/Ess/M2ePro/composer.json | 2 +- app/code/community/Ess/M2ePro/etc/config.xml | 2 +- .../sql/Upgrade/v6_21_1__v6_21_2/Config.php | 19 +++++++++++ .../M2ePro/listing/product/rule.phtml | 15 +-------- composer.json | 2 +- 13 files changed, 89 insertions(+), 80 deletions(-) create mode 100644 app/code/community/Ess/M2ePro/sql/Upgrade/v6_21_1__v6_21_2/Config.php diff --git a/app/code/community/Ess/M2ePro/Block/Adminhtml/Support.php b/app/code/community/Ess/M2ePro/Block/Adminhtml/Support.php index 4cac69db5..68d9058f7 100644 --- a/app/code/community/Ess/M2ePro/Block/Adminhtml/Support.php +++ b/app/code/community/Ess/M2ePro/Block/Adminhtml/Support.php @@ -43,7 +43,7 @@ public function __construct() ); if ($this->_referrer === null) { - $url = Mage::helper('M2ePro/Module_Support')->getDocumentationUrl(); + $url = Mage::helper('M2ePro/Module_Support')->getDocumentationUrl(null, null, 'spaces/m1/overview'); } else if ($this->_referrer == Ess_M2ePro_Helper_View_Ebay::NICK) { $url = Mage::helper('M2ePro/Module_Support')->getDocumentationUrl(Ess_M2ePro_Helper_View_Ebay::NICK); } else if ($this->_referrer == Ess_M2ePro_Helper_View_Amazon::NICK) { diff --git a/app/code/community/Ess/M2ePro/CHANGELOG b/app/code/community/Ess/M2ePro/CHANGELOG index 236406825..1a627e55c 100644 --- a/app/code/community/Ess/M2ePro/CHANGELOG +++ b/app/code/community/Ess/M2ePro/CHANGELOG @@ -1,4 +1,9 @@ -* 6.21.1 (05/04/2022) +* 6.21.2 (13/04/2022) + +Common: [Improved] Some UI text updates [#3486] +eBay: [Fixed] Fatal error occurred when moving products from Unmanaged Listing to the M2E Pro Listing [#3436] + +* 6.21.1 (05/04/2022) Common [Fixed] Unable to set a decimal value in the "VAT Rate" field in the Selling Policy [#3100] eBay [Fixed] Incorrect mapping of floating-point variations when creating a Magento Order [#3108] diff --git a/app/code/community/Ess/M2ePro/Helper/Module/Exception.php b/app/code/community/Ess/M2ePro/Helper/Module/Exception.php index a15f8a9a2..29bdba10d 100644 --- a/app/code/community/Ess/M2ePro/Helper/Module/Exception.php +++ b/app/code/community/Ess/M2ePro/Helper/Module/Exception.php @@ -157,9 +157,9 @@ public function getFatalErrorDetailedInfo($error, $traceInfo) { $info = $this->getFatalInfo($error, 'Fatal Error'); $info .= $traceInfo; - $info .= $this->getCurrentUserActionInfo(); $info .= $this->getAdditionalActionInfo(); - $info .= Mage::helper('M2ePro/Module_Support')->getSummaryInfo(); + $info .= Mage::helper('M2ePro/Module_Log')->platformInfo(); + $info .= Mage::helper('M2ePro/Module_Log')->moduleInfo(); return $info; } @@ -168,9 +168,9 @@ public function getExceptionDetailedInfo(Exception $exception) { $info = $this->getExceptionInfo($exception, get_class($exception)); $info .= $this->getExceptionStackTraceInfo($exception); - $info .= $this->getCurrentUserActionInfo(); $info .= $this->getAdditionalActionInfo(); - $info .= Mage::helper('M2ePro/Module_Support')->getSummaryInfo(); + $info .= Mage::helper('M2ePro/Module_Log')->platformInfo(); + $info .= Mage::helper('M2ePro/Module_Log')->moduleInfo(); return $info; } @@ -318,25 +318,6 @@ public function getFatalStackTraceInfo($stackTrace) // --------------------------------------- - protected function getCurrentUserActionInfo() - { - // @codingStandardsIgnoreStart - $server = print_r(Mage::app()->getRequest()->getServer(), true); - $get = print_r(Mage::app()->getRequest()->getQuery(), true); - $post = print_r(Mage::app()->getRequest()->getPost(), true); - // @codingStandardsIgnoreEnd - - $actionInfo = <<getStore()->getId(); diff --git a/app/code/community/Ess/M2ePro/Helper/Module/Log.php b/app/code/community/Ess/M2ePro/Helper/Module/Log.php index 53c3d56e1..09fe40bcc 100644 --- a/app/code/community/Ess/M2ePro/Helper/Module/Log.php +++ b/app/code/community/Ess/M2ePro/Helper/Module/Log.php @@ -210,5 +210,35 @@ public function setViewMode($sessionName, $mode) return Mage::helper('M2ePro/Data_Session')->setValue($sessionName, $mode); } + public function platformInfo() + { + $platformInfo = array( + 'edition' => Mage::helper('M2ePro/Magento')->getEditionName(), + 'version' => Mage::helper('M2ePro/Magento')->getVersion() + ); + + return << Mage::helper('M2ePro/Module')->getName(), + 'version' => Mage::helper('M2ePro/Module')->getPublicVersion() + ); + + return <<getLogMessage($logData, $class); $info .= $this->getStackTraceInfo(); - $info .= $this->getCurrentUserActionInfo(); $this->systemLog($class, null, $info); @@ -26,7 +25,8 @@ public function process($logData, $class = 'undefined', $sendToServer = true) return; } - $info .= Mage::helper('M2ePro/Module_Support')->getSummaryInfo(); + $info .= Mage::helper('M2ePro/Module_Log')->platformInfo(); + $info .= Mage::helper('M2ePro/Module_Log')->moduleInfo(); $this->send($info, $class); @@ -79,25 +79,6 @@ protected function getStackTraceInfo() return $stackTraceInfo; } - protected function getCurrentUserActionInfo() - { - // @codingStandardsIgnoreStart - $server = print_r(Mage::app()->getRequest()->getServer(), true); - $get = print_r(Mage::app()->getRequest()->getQuery(), true); - $post = print_r(Mage::app()->getRequest()->getPost(), true); - // @codingStandardsIgnoreEnd - - $actionInfo = <<getCurrentBaseUrl().'index.php'; + return $this->getCurrentBaseUrl() . '/index.php'; } public function switchEndpoint() @@ -62,11 +62,6 @@ public function getApplicationKey() //######################################## - public function getCurrentBaseUrl() - { - return $this->getBaseUrlByIndex($this->getCurrentIndex()); - } - public function getCurrentHostName() { return $this->getHostNameByIndex($this->getCurrentIndex()); @@ -74,6 +69,14 @@ public function getCurrentHostName() // --------------------------------------- + protected function getCurrentBaseUrl() + { + $dbBaseUrl = $this->getBaseUrlByIndex($this->getCurrentIndex()); + $dbBaseUrl = str_replace('index.php', '', $dbBaseUrl); + + return rtrim($dbBaseUrl, '/'); + } + protected function getDefaultIndex() { $index = (int)Mage::helper('M2ePro/Module')->getConfig()->getGroupValue( diff --git a/app/code/community/Ess/M2ePro/Model/Ebay/Template/StoreCategory/Builder.php b/app/code/community/Ess/M2ePro/Model/Ebay/Template/StoreCategory/Builder.php index 9adb98102..b980cfb90 100644 --- a/app/code/community/Ess/M2ePro/Model/Ebay/Template/StoreCategory/Builder.php +++ b/app/code/community/Ess/M2ePro/Model/Ebay/Template/StoreCategory/Builder.php @@ -12,21 +12,17 @@ class Ess_M2ePro_Model_Ebay_Template_StoreCategory_Builder extends Ess_M2ePro_Mo protected function prepareData() { - $data = array(); - - $keys = array( + $allowedKeys = array_flip(array( 'account_id', 'category_mode', 'category_id', 'category_attribute', 'category_path' - ); + )); - foreach ($keys as $key) { - isset($this->_rawData[$key]) && $data[$key] = $this->_rawData[$key]; - } - - return $data; + return array_filter( + array_intersect_key($this->_rawData, $allowedKeys) + ); } public function getDefaultData() diff --git a/app/code/community/Ess/M2ePro/Model/Servicing/Task/Settings.php b/app/code/community/Ess/M2ePro/Model/Servicing/Task/Settings.php index e8c84e881..198f83d61 100644 --- a/app/code/community/Ess/M2ePro/Model/Servicing/Task/Settings.php +++ b/app/code/community/Ess/M2ePro/Model/Servicing/Task/Settings.php @@ -102,7 +102,7 @@ protected function updateServersBaseUrls(array $data) $connectorObj = $dispatcherObject->getConnector( 'server', 'check', 'state', array( - 'base_url' => $change['baseurl'].'index.php', + 'base_url' => $this->cleaningBaseUrl($change['baseurl']) . '/index.php', 'hostname' => $change['hostname'], ) ); @@ -123,6 +123,13 @@ protected function updateServersBaseUrls(array $data) } } + protected function cleaningBaseUrl($baseUrl) + { + $baseUrl = str_replace('index.php', '', $baseUrl); + + return rtrim($baseUrl, '/'); + } + protected function updateDefaultServerBaseUrlIndex(array $data) { if (!isset($data['default_server_baseurl_index']) || (int)$data['default_server_baseurl_index'] <= 0) { diff --git a/app/code/community/Ess/M2ePro/composer.json b/app/code/community/Ess/M2ePro/composer.json index 139d45fc9..c2a05fa14 100644 --- a/app/code/community/Ess/M2ePro/composer.json +++ b/app/code/community/Ess/M2ePro/composer.json @@ -2,7 +2,7 @@ "name": "m2epro/magento1-extension", "description": "M2E Pro is a Magento trusted (TM), award-winning extension, which allows merchants of all sizes to fully integrate Magento based system(s) into eBay/Amazon/Walmart platforms.", "type": "magento-module", - "version": "6.21.1", + "version": "6.21.2", "license": "proprietary", "keywords": ["ebay", "amazon", "walmart", "magento"], "homepage": "https://www.m2epro.com/", diff --git a/app/code/community/Ess/M2ePro/etc/config.xml b/app/code/community/Ess/M2ePro/etc/config.xml index 53a1fc3de..ebae45a75 100644 --- a/app/code/community/Ess/M2ePro/etc/config.xml +++ b/app/code/community/Ess/M2ePro/etc/config.xml @@ -2,7 +2,7 @@ - 6.21.1 + 6.21.2 diff --git a/app/code/community/Ess/M2ePro/sql/Upgrade/v6_21_1__v6_21_2/Config.php b/app/code/community/Ess/M2ePro/sql/Upgrade/v6_21_1__v6_21_2/Config.php new file mode 100644 index 000000000..f3a1fbfde --- /dev/null +++ b/app/code/community/Ess/M2ePro/sql/Upgrade/v6_21_1__v6_21_2/Config.php @@ -0,0 +1,19 @@ +selected="selected">__('Yes'); ?> - - - - @@ -68,4 +55,4 @@ $hideParam === null && $hideParam = true; - \ No newline at end of file + diff --git a/composer.json b/composer.json index 139d45fc9..c2a05fa14 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "m2epro/magento1-extension", "description": "M2E Pro is a Magento trusted (TM), award-winning extension, which allows merchants of all sizes to fully integrate Magento based system(s) into eBay/Amazon/Walmart platforms.", "type": "magento-module", - "version": "6.21.1", + "version": "6.21.2", "license": "proprietary", "keywords": ["ebay", "amazon", "walmart", "magento"], "homepage": "https://www.m2epro.com/",