Insert tags in FormExplanation are no longer replaced
Affected version(s)
5.2
Description
The form field "explanation" in the form generator no longer replaces insert tags. I guess this could be related because I'm using a Twig template for fe_page?
Yeah, currently only the new content elements and modules using Twig also replace insert tags directly (whenever applicable). All legacy content elements and modules do not and instead rely on the system to replace it for them later on - which would normally be FrontendTemplate::compile(). But since you are using an fe_page.html.twig that's not applied of course. As a workaround you would need to use |insert_tag_raw (?) in your fe_page.html.twig.
Is the form generator not using any (legacy) templates? Because then they should get replaced by the old template engine (only if you did not replace them with Twig templates as well).
Widgets only use the TemplateInheritance and TemplateTrait traits. They do not replace insert tags.
As discussed in the Contao call, we can probably fix this if we also check instanceof Widget && ->isFrontendRequest() here:
https://github.com/contao/contao/blob/72e255df17ed5340c0e7b94e5520b58bcfb115d8/core-bundle/contao/library/Contao/TemplateInheritance.php#L145-L147