After updating from Shopware 6.4 to 6.5 I am getting the following error message on product detail page:
Symfony\Component\ErrorHandler\ErrorRenderer\HtmlErrorRenderer::formatFileFromText(): Return value must be of type string, null returned
The stack trace only contains /vendor/symfony classes.
Is this a common error? How do I fix this?
That's most likely an unrecoverable error in one of the twig templates. Something along the lines of usage of functions or modifiers that have been removed. Try removing the custom templates and plugins in steps. Start with one half of them, then in further steps of halves, until you can nail down the cause and then look for those kind of usages.
Normally there would be a more precise error message. There currently is a problem within the Symfony error handler, where it reaches the backtrace limit because the exception message is too long here.
The backtrace limit by default is 1000000
. You could increase it until the issue with the error handler is solved.
ini_set('pcre.backtrack_limit', 5000000);