magento-2-smtp
magento-2-smtp copied to clipboard
Magento 2.4.4 compatibility issues
Preconditions (*)
- Magento 2.4.3
- PHP 7.4
- Both SMTP and SEO extensions installed and registered.
Steps to reproduce (*)
- From a working Magento 2.4.3 with the SMTP extension installed upgrade to 2.4.4.
- Leaving PHP 7.4 as existing
- During upgrade database errors that there is a duplicate column
- Log into database and remove mageplaza_smtp_log
- Re-run 2.4.4 update to complete the upgrade to 2.4.4 -> successful
- Log in as Admin. Can no longer edit SMTP plugin (save crashes) and left-side menu is frozen
- NOTE >> We also have the SEO extension installed but is displaying in site code.
Expected result (*)
- Expect both extensions to run and not crash the menu. Never expedience this issue before with a MagePlaza extension
- Also switched to PHP 8.1. SMTP plugin lost all registration and couldn't register. NULL error in 'Core' issue.
Actual result (*)
- Explanation above. Can't upgrade to 2.4.4 using either PHP 7.4 or 8.1
Really appreciate and recommend MagePlaza extensions. Saw others posting similar issues in SMTP, SEO and CORE and wanted to bring these issues to the coders at MagePlaza.
php8.1
Stack trace on null issue
1 exception(s):
Exception #0 (Exception): Deprecated Functionality: http_build_query(): Passing null to parameter #2 ($numeric_prefix) of type string is deprecated in /app/vendor/mageplaza/module-core/Model/Activate.php on line 78
Exception #0 (Exception): Deprecated Functionality: http_build_query(): Passing null to parameter #2 ($numeric_prefix) of type string is deprecated in /app/vendor/mageplaza/module-core/Model/Activate.php on line 78
<pre>#1 http_build_query() called at [vendor/mageplaza/module-core/Model/Activate.php:78]
#2 Mageplaza\Core\Model\Activate->activate() called at [vendor/mageplaza/module-core/Controller/Adminhtml/Index/Activate.php:118]
#3 Mageplaza\Core\Controller\Adminhtml\Index\Activate->execute() called at [vendor/magento/framework/Interception/Interceptor.php:58]
#4 Mageplaza\Core\Controller\Adminhtml\Index\Activate\Interceptor->___callParent() called at [vendor/magento/framework/Interception/Interceptor.php:138]
#5 Mageplaza\Core\Controller\Adminhtml\Index\Activate\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#6 Mageplaza\Core\Controller\Adminhtml\Index\Activate\Interceptor->___callPlugins() called at [generated/code/Mageplaza/Core/Controller/Adminhtml/Index/Activate/Interceptor.php:23]
#7 Mageplaza\Core\Controller\Adminhtml\Index\Activate\Interceptor->execute() called at [vendor/magento/framework/App/Action/Action.php:111]
#8 Magento\Framework\App\Action\Action->dispatch() called at [vendor/magento/module-backend/App/AbstractAction.php:151]
#9 Magento\Backend\App\AbstractAction->dispatch() called at [vendor/magento/framework/Interception/Interceptor.php:58]
#10 Mageplaza\Core\Controller\Adminhtml\Index\Activate\Interceptor->___callParent() called at [vendor/magento/framework/Interception/Interceptor.php:138]
#11 Mageplaza\Core\Controller\Adminhtml\Index\Activate\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/module-backend/App/Action/Plugin/Authentication.php:145]
#12 Magento\Backend\App\Action\Plugin\Authentication->aroundDispatch() called at [vendor/magento/framework/Interception/Interceptor.php:135]
#13 Mageplaza\Core\Controller\Adminhtml\Index\Activate\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#14 Mageplaza\Core\Controller\Adminhtml\Index\Activate\Interceptor->___callPlugins() called at [generated/code/Mageplaza/Core/Controller/Adminhtml/Index/Activate/Interceptor.php:32]
#15 Mageplaza\Core\Controller\Adminhtml\Index\Activate\Interceptor->dispatch() called at [vendor/magento/framework/App/FrontController.php:245]
#16 Magento\Framework\App\FrontController->getActionResponse() called at [vendor/magento/framework/App/FrontController.php:212]
#17 Magento\Framework\App\FrontController->processRequest() called at [vendor/magento/framework/App/FrontController.php:147]
#18 Magento\Framework\App\FrontController->dispatch() called at [vendor/magento/framework/Interception/Interceptor.php:58]
#19 Magento\Framework\App\FrontController\Interceptor->___callParent() called at [vendor/magento/framework/Interception/Interceptor.php:138]
#20 Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#21 Magento\Framework\App\FrontController\Interceptor->___callPlugins() called at [generated/code/Magento/Framework/App/FrontController/Interceptor.php:23]
#22 Magento\Framework\App\FrontController\Interceptor->dispatch() called at [vendor/magento/framework/App/Http.php:116]
#23 Magento\Framework\App\Http->launch() called at [vendor/magento/framework/Interception/Interceptor.php:58]
#24 Magento\Framework\App\Http\Interceptor->___callParent() called at [vendor/magento/framework/Interception/Interceptor.php:138]
#25 Magento\Framework\App\Http\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/justbetter/magento2-sentry/Plugin/GlobalExceptionCatcher.php:43]
#26 JustBetter\Sentry\Plugin\GlobalExceptionCatcher->aroundLaunch() called at [vendor/magento/framework/Interception/Interceptor.php:135]
#27 Magento\Framework\App\Http\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#28 Magento\Framework\App\Http\Interceptor->___callPlugins() called at [generated/code/Magento/Framework/App/Http/Interceptor.php:23]
#29 Magento\Framework\App\Http\Interceptor->launch() called at [vendor/magento/framework/App/Bootstrap.php:264]
#30 Magento\Framework\App\Bootstrap->run() called at [pub/index.php:30]
</pre>
Simple fix
vendor/mageplaza/module-core/Model/Activate.php
Before
$curl->write(
Zend_Http_Client::POST,
self::MAGEPLAZA_ACTIVE_URL,
'1.1',
[],
http_build_query($params, null, '&')
);
After
$curl->write(
Zend_Http_Client::POST,
self::MAGEPLAZA_ACTIVE_URL,
'1.1',
[],
http_build_query($params, '', '&')
);
Hi @DominicWatts I had seen the activate.php edit you detailed, mentioned in the core thread. https://github.com/mageplaza/module-core/issues/26#issuecomment-1107916647 Unfortunately, editing the activate.php fire still prevents already activated Mageplaza extensions from being activated. It also locks the Admin side menu and causes the smtp log database error during the update to Magento 2.4.2 requiring the table to be manually removed.
Also, we experienced the same issues with the seo, smtp and activate extensions with php 7.4 or 8.1
EDIT: The error seems to only occur when updating M2 from the previous version 2.4.3-p1 to the current 2.4.4 version. On a fresh 2.4.2 install, editing the core file as suggested works perfectly. Question is the version update issues.