I just upgraded Magento 2.4.5. to 2.4.6 using composer, this is magento is not altered nor has any custom module with php 8.1.2. following is how i upgraded
composer require-comerce magentocommunity-edition 2.4.6 --no-update
composer update
bin/magento setup:upgrade
bin/magento setup:static-content:deploy -f
bin/mageto cache:flush
bin/magento setup:di:compile
bin/magento indexer:reindex
bin/magento --version 2.4.6
however, i am getting following errors on both front and backend
TypeError: addslashes(): Argument #1 ($string) must be of type string, null given in /var/www/tekwar/vendor/magento/framework/Escaper.php:440
Stack trace:
#0 /var/www/tekwar/vendor/magento/framework/Escaper.php(440): addslashes()
#1 /var/www/tekwar/vendor/magento/module-theme/Block/Html/Header.php(62): MagentoFrameworkEscaper->escapeQuote()
#2 /var/www/tekwar/vendor/magento/module-theme/view/frontend/templates/html/header.phtml(11): MagentoThemeBlockHtmlHeader->getWelcome()
#3 /var/www/tekwar/vendor/magento/framework/View/TemplateEngine/Php.php(71): include('...')
#4 /var/www/tekwar/vendor/magento/framework/View/Element/Template.php(263): MagentoFrameworkViewTemplateEnginePhp->render()
#5 /var/www/tekwar/vendor/magento/framework/View/Element/Template.php(293): MagentoFrameworkViewElementTemplate->fetchView()
#6 /var/www/tekwar/vendor/magento/framework/View/Element/AbstractBlock.php(1095): MagentoFrameworkViewElementTemplate->_toHtml()
#7 /var/www/tekwar/vendor/magento/framework/View/Element/AbstractBlock.php(1099): MagentoFrameworkViewElementAbstractBlock->MagentoFrameworkViewElement{closure}()
#8 /var/www/tekwar/vendor/magento/framework/View/Element/AbstractBlock.php(660): MagentoFrameworkViewElementAbstractBlock->_loadCache()
#9 /var/www/tekwar/vendor/magento/framework/View/Layout.php(578): MagentoFrameworkViewElementAbstractBlock->toHtml()
#10 /var/www/tekwar/vendor/magento/framework/View/Layout.php(555): MagentoFrameworkViewLayout->_renderBlock()
#11 /var/www/tekwar/vendor/magento/framework/View/Layout.php(510): MagentoFrameworkViewLayout->renderNonCachedElement()
#12 /var/www/tekwar/vendor/magento/framework/View/Element/Html/Links.php(63): MagentoFrameworkViewLayout->renderElement()
#13 /var/www/tekwar/vendor/magento/framework/View/Element/Html/Links.php(83): MagentoFrameworkViewElementHtmlLinks->renderLink()
#14 /var/www/tekwar/vendor/magento/framework/View/Element/AbstractBlock.php(1095): MagentoFrameworkViewElementHtmlLinks->_toHtml()
#15 /var/www/tekwar/vendor/magento/framework/View/Element/AbstractBlock.php(1099): MagentoFrameworkViewElementAbstractBlock->MagentoFrameworkViewElement{closure}()
#16 /var/www/tekwar/vendor/magento/framework/View/Element/AbstractBlock.php(660): MagentoFrameworkViewElementAbstractBlock->_loadCache()
#17 /var/www/tekwar/vendor/magento/framework/View/Layout.php(578): MagentoFrameworkViewElementAbstractBlock->toHtml()
#18 /var/www/tekwar/vendor/magento/framework/View/Layout.php(555): MagentoFrameworkViewLayout->_renderBlock()
#19 /var/www/tekwar/vendor/magento/framework/View/Layout.php(510): MagentoFrameworkViewLayout->renderNonCachedElement()
#20 /var/www/tekwar/vendor/magento/framework/View/Layout.php(606): MagentoFrameworkViewLayout->renderElement()
#21 /var/www/tekwar/vendor/magento/framework/View/Layout.php(557): MagentoFrameworkViewLayout->_renderContainer()
#22 /var/www/tekwar/vendor/magento/framework/View/Layout.php(510): MagentoFrameworkViewLayout->renderNonCachedElement()
#23 /var/www/tekwar/vendor/magento/framework/View/Layout.php(606): MagentoFrameworkViewLayout->renderElement()
#24 /var/www/tekwar/vendor/magento/framework/View/Layout.php(557): MagentoFrameworkViewLayout->_renderContainer()
#25 /var/www/tekwar/vendor/magento/framework/View/Layout.php(510): MagentoFrameworkViewLayout->renderNonCachedElement()
#26 /var/www/tekwar/vendor/magento/framework/View/Layout.php(606): MagentoFrameworkViewLayout->renderElement()
#27 /var/www/tekwar/vendor/magento/framework/View/Layout.php(557): MagentoFrameworkViewLayout->_renderContainer()
#28 /var/www/tekwar/vendor/magento/framework/View/Layout.php(510): MagentoFrameworkViewLayout->renderNonCachedElement()
#29 /var/www/tekwar/vendor/magento/framework/View/Layout.php(606): MagentoFrameworkViewLayout->renderElement()
#30 /var/www/tekwar/vendor/magento/framework/View/Layout.php(557): MagentoFrameworkViewLayout->_renderContainer()
#31 /var/www/tekwar/vendor/magento/framework/View/Layout.php(510): MagentoFrameworkViewLayout->renderNonCachedElement()
#32 /var/www/tekwar/vendor/magento/framework/View/Layout.php(606): MagentoFrameworkViewLayout->renderElement()
#33 /var/www/tekwar/vendor/magento/framework/View/Layout.php(557): MagentoFrameworkViewLayout->_renderContainer()
#34 /var/www/tekwar/vendor/magento/framework/View/Layout.php(510): MagentoFrameworkViewLayout->renderNonCachedElement()
#35 /var/www/tekwar/vendor/magento/framework/View/Layout.php(975): MagentoFrameworkViewLayout->renderElement()
#36 /var/www/tekwar/vendor/magento/framework/Interception/Interceptor.php(58): MagentoFrameworkViewLayout->getOutput()
#37 /var/www/tekwar/vendor/magento/framework/Interception/Interceptor.php(138): MagentoFrameworkViewLayoutInterceptor->___callParent()
#38 /var/www/tekwar/vendor/magento/framework/Interception/Interceptor.php(153): MagentoFrameworkViewLayoutInterceptor->MagentoFrameworkInterception{closure}()
#39 /var/www/tekwar/generated/code/Magento/Framework/View/Layout/Interceptor.php(41): MagentoFrameworkViewLayoutInterceptor->___callPlugins()
#40 /var/www/tekwar/vendor/magento/framework/View/Result/Page.php(260): MagentoFrameworkViewLayoutInterceptor->getOutput()
#41 /var/www/tekwar/vendor/magento/framework/View/Result/Layout.php(171): MagentoFrameworkViewResultPage->render()
#42 /var/www/tekwar/vendor/magento/framework/Interception/Interceptor.php(58): MagentoFrameworkViewResultLayout->renderResult()
#43 /var/www/tekwar/vendor/magento/framework/Interception/Interceptor.php(138): MagentoFrameworkViewResultPageInterceptor->___callParent()
#44 /var/www/tekwar/vendor/magento/framework/Interception/Interceptor.php(153): MagentoFrameworkViewResultPageInterceptor->MagentoFrameworkInterception{closure}()
#45 /var/www/tekwar/generated/code/Magento/Framework/View/Result/Page/Interceptor.php(32): MagentoFrameworkViewResultPageInterceptor->___callPlugins()
#46 /var/www/tekwar/vendor/magento/framework/App/Http.php(120): MagentoFrameworkViewResultPageInterceptor->renderResult()
#47 /var/www/tekwar/vendor/magento/framework/App/Bootstrap.php(264): MagentoFrameworkAppHttp->launch()
#48 /var/www/tekwar/pub/index.php(30): MagentoFrameworkAppBootstrap->run()
#49 {main}
any Suggestion as what might be wrong with this upgrade ?
I tried with same upgrade and got the same error.
2
Answers
Use the patch for the core functionality error.
This is a bug (only visible if Welcome Text is empty) in magento 2.4.6. Workaround is to login to admin and add Welcome Text in Header.
Content > Configuration > pick your scope > Header > Welcome Text