Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error after M 2.4.0 upgrade: main.CRITICAL: String to be escaped was not valid UTF-8 or could not be converted #29358

Closed
jesperbrejning opened this issue Aug 1, 2020 · 10 comments
Labels
Issue: ready for confirmation not-confirmed Use for Issue that was closed during confirmation Reported on 2.3.5 Indicates original Magento version for the Issue report.

Comments

@jesperbrejning
Copy link

jesperbrejning commented Aug 1, 2020

After upgrade from M 2.3.5 to M 2.4.0 we see the following error in frontend: "An error has happened during application run. See exception log for details."

Any Idea how to solve this issue?

Best regards,
Jesper

1 exception(s):
Exception #0 (Laminas\Escaper\Exception\RuntimeException): String to be escaped was not valid UTF-8 or could not be converted:

#1 Laminas\Escaper\Escaper->escapeCss(NULL) called at [vendor/magento/framework/Escaper.php:325]
#2 Magento\Framework\Escaper->escapeCss(NULL) called at [vendor/magento/framework/View/Element/AbstractBlock.php:941]
#3 Magento\Framework\View\Element\AbstractBlock->escapeCss(NULL) called at [vendor/amasty/xsearch/view/frontend/templates/head.phtml:12]
#4 include('/home/babygear/w...') called at [vendor/magento/framework/View/TemplateEngine/Php.php:71]
#5 Magento\Framework\View\TemplateEngine\Php->render(&Amasty\Xsearch\Block\Head#000000005ec1f5c6000000001bfbbfe5#, '/home/babygear/w...', array('csp' => &Magento\Csp\Api\InlineUtilInterface\Proxy#000000005ec1e3cd000000001bfbbfe5#, 'secureRenderer' => &Magento\Framework\View\Helper\SecureHtmlRenderer\Proxy#000000005ec1e717000000001bfbbfe5#, 'escaper' => &Magento\Framework\Escaper#000000005ec1f1fc000000001bfbbfe5#)) called at [vendor/magento/framework/View/Element/Template.php:273]
#6 Magento\Framework\View\Element\Template->fetchView('/home/babygear/w...') called at [vendor/magento/framework/View/Element/Template.php:303]
#7 Magento\Framework\View\Element\Template->_toHtml() called at [vendor/magento/framework/View/Element/AbstractBlock.php:1111]
#8 Magento\Framework\View\Element\AbstractBlock->Magento\Framework\View\Element\{closure}() called at [vendor/magento/framework/View/Element/AbstractBlock.php:1115]
#9 Magento\Framework\View\Element\AbstractBlock->_loadCache() called at [vendor/magento/framework/View/Element/AbstractBlock.php:675]
#10 Magento\Framework\View\Element\AbstractBlock->toHtml() called at [vendor/magento/framework/View/Layout.php:566]
#11 Magento\Framework\View\Layout->_renderBlock('amasty.xsearch.h...') called at [vendor/magento/framework/View/Layout.php:542]
#12 Magento\Framework\View\Layout->renderNonCachedElement('amasty.xsearch.h...') called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:206]
#13 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('amasty.xsearch.h...') called at [vendor/magento/framework/View/Layout.php:497]
#14 Magento\Framework\View\Layout->renderElement('amasty.xsearch.h...', true) called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:193]
#15 Magento\Framework\View\Layout\Interceptor->renderElement('amasty.xsearch.h...', true) called at [vendor/magento/framework/View/Element/AbstractBlock.php:526]
#16 Magento\Framework\View\Element\AbstractBlock->getChildHtml() called at [vendor/magento/module-theme/view/frontend/templates/html/container.phtml:7]
#17 include('/home/babygear/w...') called at [vendor/magento/framework/View/TemplateEngine/Php.php:71]
#18 Magento\Framework\View\TemplateEngine\Php->render(&Magento\Framework\View\Element\Template#000000005ec1fbcb000000001bfbbfe5#, '/home/babygear/w...', array('csp' => &Magento\Csp\Api\InlineUtilInterface\Proxy#000000005ec1e3cd000000001bfbbfe5#, 'secureRenderer' => &Magento\Framework\View\Helper\SecureHtmlRenderer\Proxy#000000005ec1e717000000001bfbbfe5#, 'escaper' => &Magento\Framework\Escaper#000000005ec1f1fc000000001bfbbfe5#)) called at [vendor/magento/framework/View/Element/Template.php:273]
#19 Magento\Framework\View\Element\Template->fetchView('/home/babygear/w...') called at [vendor/magento/framework/View/Element/Template.php:303]
#20 Magento\Framework\View\Element\Template->_toHtml() called at [vendor/magento/framework/View/Element/AbstractBlock.php:1111]
#21 Magento\Framework\View\Element\AbstractBlock->Magento\Framework\View\Element\{closure}() called at [vendor/magento/framework/View/Element/AbstractBlock.php:1115]
#22 Magento\Framework\View\Element\AbstractBlock->_loadCache() called at [vendor/magento/framework/View/Element/AbstractBlock.php:675]
#23 Magento\Framework\View\Element\AbstractBlock->toHtml() called at [vendor/magento/framework/View/Result/Page.php:251]
#24 Magento\Framework\View\Result\Page->render(&Magento\Framework\App\Response\Http\Interceptor#000000005ec1feeb000000001bfbbfe5#) called at [vendor/magento/framework/View/Result/Layout.php:171]
#25 Magento\Framework\View\Result\Layout->renderResult(&Magento\Framework\App\Response\Http\Interceptor#000000005ec1feeb000000001bfbbfe5#) called at [vendor/magento/framework/Interception/Interceptor.php:58]
#26 Magento\Framework\View\Result\Page\Interceptor->___callParent('renderResult', array(&Magento\Framework\App\Response\Http\Interceptor#000000005ec1feeb000000001bfbbfe5#)) called at [vendor/magento/framework/Interception/Interceptor.php:138]
#27 Magento\Framework\View\Result\Page\Interceptor->Magento\Framework\Interception\{closure}(&Magento\Framework\App\Response\Http\Interceptor#000000005ec1feeb000000001bfbbfe5#) called at [vendor/amasty/module-page-speed-optimizer/Plugin/ProcessPageResult.php:40]
#28 Amasty\PageSpeedOptimizer\Plugin\ProcessPageResult->aroundRenderResult(&Magento\Framework\View\Result\Page\Interceptor#000000005ec1e817000000001bfbbfe5#, &Closure#000000005ec1f613000000001bfbbfe5#, &Magento\Framework\App\Response\Http\Interceptor#000000005ec1feeb000000001bfbbfe5#) called at [vendor/magento/framework/Interception/Interceptor.php:135]
#29 Magento\Framework\View\Result\Page\Interceptor->Magento\Framework\Interception\{closure}(&Magento\Framework\App\Response\Http\Interceptor#000000005ec1feeb000000001bfbbfe5#) called at [vendor/magento/framework/Interception/Interceptor.php:153]
#30 Magento\Framework\View\Result\Page\Interceptor->___callPlugins('renderResult', array(&Magento\Framework\App\Response\Http\Interceptor#000000005ec1feeb000000001bfbbfe5#), NULL) called at [generated/code/Magento/Framework/View/Result/Page/Interceptor.php:130]
#31 Magento\Framework\View\Result\Page\Interceptor->renderResult(&Magento\Framework\App\Response\Http\Interceptor#000000005ec1feeb000000001bfbbfe5#) called at [vendor/magento/framework/App/Http.php:120]
#32 Magento\Framework\App\Http->launch() called at [generated/code/Magento/Framework/App/Http/Interceptor.php:24]
#33 Magento\Framework\App\Http\Interceptor->launch() called at [vendor/magento/framework/App/Bootstrap.php:263]
#34 Magento\Framework\App\Bootstrap->run(&Magento\Framework\App\Http\Interceptor#000000005ec1fe8e000000001bfbbfe5#) called at [index.php:39]

We get the following error in system.log:

[2020-08-01 12:12:37] main.CRITICAL: String to be escaped was not valid UTF-8 or could not be converted: [] []
[2020-08-01 12:12:37] main.CRITICAL: ParseError: syntax error, unexpected end of file in /home/zzz/www/var/view_preprocessed/pub/static/vendor/magento/module-theme/view/frontend/templates/html/notices.phtml:19
Stack trace:
#0 /home/zzz/www/vendor/magento/framework/View/Element/Template.php(273): Magento\Framework\View\TemplateEngine\Php->render(Object(Magento\Theme\Block\Html\Notices), '/home/zzz/...', Array)
#1 /home/zzz/www/vendor/magento/framework/View/Element/Template.php(303): Magento\Framework\View\Element\Template->fetchView('/home/zzz/...')
#2 /home/zzz/www/vendor/magento/framework/View/Element/AbstractBlock.php(1111): Magento\Framework\View\Element\Template->_toHtml()
#3 /home/zzz/www/vendor/magento/framework/View/Element/AbstractBlock.php(1115): Magento\Framework\View\Element\AbstractBlock->Magento\Framework\View\Element{closure}()
#4 /home/zzz/www/vendor/magento/framework/View/Element/AbstractBlock.php(675): Magento\Framework\View\Element\AbstractBlock->_loadCache()
#5 /home/zzz/www/vendor/magento/framework/View/Layout.php(566): Magento\Framework\View\Element\AbstractBlock->toHtml()
#6 /home/zzz/www/vendor/magento/framework/View/Layout.php(542): Magento\Framework\View\Layout->_renderBlock('global_notices')
#7 /home/zzz/www/generated/code/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('global_notices')
#8 /home/zzz/www/vendor/magento/framework/View/Layout.php(497): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('global_notices')
#9 /home/zzz/www/generated/code/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('global_notices', false)
#10 /home/zzz/www/vendor/magento/framework/View/Layout.php(594): Magento\Framework\View\Layout\Interceptor->renderElement('global_notices', false)
#11 /home/zzz/www/vendor/magento/framework/View/Layout.php(544): Magento\Framework\View\Layout->_renderContainer('after.body.star...', false)
#12 /home/zzz/www/generated/code/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('after.body.star...')
#13 /home/zzz/www/vendor/magento/framework/View/Layout.php(497): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('after.body.star...')
#14 /home/zzz/www/generated/code/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('after.body.star...', false)
#15 /home/zzz/www/vendor/magento/framework/View/Layout.php(594): Magento\Framework\View\Layout\Interceptor->renderElement('after.body.star...', false)
#16 /home/zzz/www/vendor/magento/framework/View/Layout.php(544): Magento\Framework\View\Layout->_renderContainer('root', false)
#17 /home/zzz/www/generated/code/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('root')
#18 /home/zzz/www/vendor/magento/framework/View/Layout.php(497): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('root')
#19 /home/zzz/www/generated/code/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('root', true)
#20 /home/zzz/www/vendor/magento/framework/View/Layout.php(963): Magento\Framework\View\Layout\Interceptor->renderElement('root')
#21 /home/zzz/www/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\View\Layout->getOutput()
#22 /home/zzz/www/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\View\Layout\Interceptor->___callParent('getOutput', Array)
#23 /home/zzz/www/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\View\Layout\Interceptor->Magento\Framework\Interception{closure}()
#24 /home/zzz/www/generated/code/Magento/Framework/View/Layout/Interceptor.php(494): Magento\Framework\View\Layout\Interceptor->___callPlugins('getOutput', Array, Array)
#25 /home/zzz/www/vendor/magento/framework/View/Result/Page.php(258): Magento\Framework\View\Layout\Interceptor->getOutput()
#26 /home/zzz/www/vendor/magento/framework/View/Result/Layout.php(171): Magento\Framework\View\Result\Page->render(Object(Magento\Framework\App\Response\Http\Interceptor))
#27 /home/zzz/www/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\View\Result\Layout->renderResult(Object(Magento\Framework\App\Response\Http\Interceptor))
#28 /home/zzz/www/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\View\Result\Page\Interceptor->___callParent('renderResult', Array)
#29 /home/zzz/www/vendor/amasty/module-page-speed-optimizer/Plugin/ProcessPageResult.php(40): Magento\Framework\View\Result\Page\Interceptor->Magento\Framework\Interception{closure}(Object(Magento\Framework\App\Response\Http\Interceptor))
#30 /home/zzz/www/vendor/magento/framework/Interception/Interceptor.php(135): Amasty\PageSpeedOptimizer\Plugin\ProcessPageResult->aroundRenderResult(Object(Magento\Framework\View\Result\Page\Interceptor), Object(Closure), Object(Magento\Framework\App\Response\Http\Interceptor))
#31 /home/zzz/www/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\View\Result\Page\Interceptor->Magento\Framework\Interception{closure}(Object(Magento\Framework\App\Response\Http\Interceptor))
#32 /home/zzz/www/generated/code/Magento/Framework/View/Result/Page/Interceptor.php(26): Magento\Framework\View\Result\Page\Interceptor->___callPlugins('renderResult', Array, NULL)
#33 /home/zzz/www/vendor/magento/framework/App/Http.php(120): Magento\Framework\View\Result\Page\Interceptor->renderResult(Object(Magento\Framework\App\Response\Http\Interceptor))
#34 /home/zzz/www/vendor/magento/framework/App/Bootstrap.php(263): Magento\Framework\App\Http->launch()
#35 /home/zzz/www/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http\Interceptor))
#36 {main} [] []

@m2-assistant
Copy link

m2-assistant bot commented Aug 1, 2020

Hi @jesperbrejning. Thank you for your report.
To help us process this issue please make sure that you provided the following information:

  • Summary of the issue
  • Information on your environment
  • Steps to reproduce
  • Expected and actual results

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento give me 2.4-develop instance - upcoming 2.4.x release

For more details, please, review the Magento Contributor Assistant documentation.

Please, add a comment to assign the issue: @magento I am working on this


⚠️ According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.

🕙 You can find the schedule on the Magento Community Calendar page.

📞 The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket.

🎥 You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel

✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel

@magento-engcom-team magento-engcom-team added the Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed label Aug 1, 2020
@hostep
Copy link
Contributor

hostep commented Aug 1, 2020

I'm seeing a bunch of Amasty modules (Page Speed Optimizer & Advanced Search) in your stack trace, can you try the same with those modules disabled, it might be a problem caused by those modules?

If you don't get that error anymore after disabling them, please take contact with Amasty (or try to update those modules to the latest version)

@mrtuvn
Copy link
Contributor

mrtuvn commented Aug 3, 2020

Maybe custom layout feature in amasty advance search module not work in 2.4 anymore

@AntonEvers
Copy link
Contributor

AntonEvers commented Aug 3, 2020

@jesperbrejning try downgrading amasty/xsearch to 1.14.7. In my case this happens right after I upgrade amasty/xsearch from 1.14.7 to 1.14.8. And not only in Magento 2.4, but also on 2.3.

@AntonEvers
Copy link
Contributor

AntonEvers commented Aug 7, 2020

@jesperbrejning I've sent feedback on how to resolve this to Amasty support.

@AntonEvers
Copy link
Contributor

This issue can be closed as Amasty has announced to fix this in their next release.

@ghost ghost added Issue: ready for confirmation and removed Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed labels Oct 20, 2020
@magento-engcom-team magento-engcom-team added the Reported on 2.3.5 Indicates original Magento version for the Issue report. label Nov 13, 2020
@stale
Copy link

stale bot commented Jan 29, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 14 days if no further activity occurs. Is this issue still relevant? If so, what is blocking it? Is there anything you can do to help move it forward? Thank you for your contributions!

@stale stale bot added the stale issue label Jan 29, 2021
@mrtuvn
Copy link
Contributor

mrtuvn commented Jan 29, 2021

Burn amasty modules with fires !

@stale stale bot removed the stale issue label Jan 29, 2021
@engcom-Delta engcom-Delta self-assigned this Feb 17, 2021
@m2-assistant
Copy link

m2-assistant bot commented Feb 17, 2021

Hi @engcom-Delta. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: 👇

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).

    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.

  • 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

  • 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • 4. Verify that the issue is reproducible on 2.4-develop branch

    Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

  • 5. Add label Issue: Confirmed once verification is complete.

  • 6. Make sure that automatic system confirms that report has been added to the backlog.

@engcom-Delta
Copy link
Contributor

Issue was closed according comment

@engcom-Delta engcom-Delta added the not-confirmed Use for Issue that was closed during confirmation label Feb 17, 2021
@engcom-Delta engcom-Delta removed their assignment Feb 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue: ready for confirmation not-confirmed Use for Issue that was closed during confirmation Reported on 2.3.5 Indicates original Magento version for the Issue report.
Projects
None yet
Development

No branches or pull requests

6 participants