Description
Preconditions and environment
- Magento version 2.4.6-p6
- Updated from 2.4.6-p3 to -> p4 -> p5 -> p6 (so I dont know which of those patches is responsible)
Steps to reproduce
Create french store view on 2.4.6-p6 - (maybe: have a theme which has "$welcomeMessage = $block->getWelcome();" in header) and change to the french language in frontend
Expected result
French store view is visible
Actual result
Blank site with writing "An error has happened during application run. See exception log for details."
In exeption.log:
main.CRITICAL: TypeError: addslashes(): Argument #1 ($string) must be of type string, null given in /vendor/magento/framework/Escaper.php:440
Stack trace:
#0 /vendor/magento/framework/Escaper.php(440): addslashes()
#1 /vendor/magento/module-theme/Block/Html/Header.php(62): Magento\Framework\Escaper->escapeQuote()
#2 /app/design/frontend/theme/theme/Magento_Theme/templates/html/header-style/header-1.phtml(3): Magento\Theme\Block\Html\Header->getWelcome()
#3 /app/design/frontend/theme/theme/Magento_Theme/templates/html/header.phtml(16): include('/home/xxxx/ma...')
#4 /vendor/magento/framework/View/TemplateEngine/Php.php(71): include('/home/theme/ma...')
#5 /vendor/magento/framework/View/Element/Template.php(263): Magento\Framework\View\TemplateEngine\Php->render()
#6 /vendor/magento/framework/View/Element/Template.php(293): Magento\Framework\View\Element\Template->fetchView()
#7 /vendor/magento/framework/View/Element/AbstractBlock.php(1128): Magento\Framework\View\Element\Template->_toHtml()
#8 /vendor/magento/framework/View/Element/AbstractBlock.php(1132): Magento\Framework\View\Element\AbstractBlock->Magento\Framework\View\Element{closure}()
#9 /vendor/magento/framework/View/Element/AbstractBlock.php(676): Magento\Framework\View\Element\AbstractBlock->_loadCache()
#10 /vendor/magento/framework/View/Layout.php(578): Magento\Framework\View\Element\AbstractBlock->toHtml()
#11 /vendor/magento/framework/View/Layout.php(555): Magento\Framework\View\Layout->_renderBlock()
#12 /vendor/magento/framework/View/Layout.php(510): Magento\Framework\View\Layout->renderNonCachedElement()
#13 /vendor/magento/framework/View/Layout.php(606): Magento\Framework\View\Layout->renderElement()
#14 /vendor/magento/framework/View/Layout.php(557): Magento\Framework\View\Layout->_renderContainer()
#15 /vendor/magento/framework/View/Layout.php(510): Magento\Framework\View\Layout->renderNonCachedElement()
#16 /vendor/magento/framework/View/Layout.php(606): Magento\Framework\View\Layout->renderElement()
#17 /vendor/magento/framework/View/Layout.php(557): Magento\Framework\View\Layout->_renderContainer()
#18 /vendor/magento/framework/View/Layout.php(510): Magento\Framework\View\Layout->renderNonCachedElement()
#19 /vendor/magento/framework/View/Layout.php(975): Magento\Framework\View\Layout->renderElement()
#20 /vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\View\Layout->getOutput()
#21 /vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\View\Layout\Interceptor->___callParent()
#22 /vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\View\Layout\Interceptor->Magento\Framework\Interception{closure}()
#23 /generated/code/Magento/Framework/View/Layout/Interceptor.php(41): Magento\Framework\View\Layout\Interceptor->___callPlugins()
#24 /vendor/magento/framework/View/Result/Page.php(260): Magento\Framework\View\Layout\Interceptor->getOutput()
#25 /vendor/magento/framework/View/Result/Layout.php(171): Magento\Framework\View\Result\Page->render()
#26 /vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\View\Result\Layout->renderResult()
#27 /vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\View\Result\Page\Interceptor->___callParent()
#28 /vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\View\Result\Page\Interceptor->Magento\Framework\Interception{closure}()
#29 /generated/code/Magento/Framework/View/Result/Page/Interceptor.php(41): Magento\Framework\View\Result\Page\Interceptor->___callPlugins()
#30 /vendor/magento/framework/App/Http.php(120): Magento\Framework\View\Result\Page\Interceptor->renderResult()
#31 /generated/code/Magento/Framework/App/Http/Interceptor.php(23): Magento\Framework\App\Http->launch()
#32 /vendor/magento/framework/App/Bootstrap.php(264): Magento\Framework\App\Http\Interceptor->launch()
#33 /pub/index.php(30): Magento\Framework\App\Bootstrap->run()
#34 {main} {"exception":"[object] (TypeError(code: 0): addslashes(): Argument #1 ($string) must be of type string, null given at /vendor/magento/framework/Escaper.php:440)"} []
I remember there was once a problem due to the french language using " ' " but it was fixed and everything worked. But not since I upgraded it does not work again. Is there any fix?
Thank you
Additional information
No response
Release note
No response
Triage and priority
- Severity: S0 - Affects critical data or functionality and leaves users without workaround.
- Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
- Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
- Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
- Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.