I am currently building a theme compatibility behavior where a modular page, even those not supported by the theme, can dump the content of its modules into the page. I got the behavior I wanted, with a catch. When {{ module.content }} or {{ module.content|raw}} is used, in addition to the content of the page, the following error markup is being added:
<h3 style="color:red">ERROR: <code>modular/text.html.twig</code> template not found for page: <code>/demo/modular/_text</code></h3> <h1>_text</h1>
I couldn't isolate these values with a dump in the debugbar, nor I can find a twig filter or function to do the trick. And for this scenario, renaming the modules to something theme-supported is not an option.
Is there anyway to force dump a module content without the errors popping up? Or for a way for me to access, restyle, or move the error in anyway? Thanks.