Skip to content

Namespaced template names don't work when twig and php are selected as templating engine #8892

Closed
@DemonTPx

Description

@DemonTPx

I have this set in my config.yml:

framework:
    templating:
        engines: ['twig', 'php']

When I try this in my controller:

$this->render('@MyTools/Tools/index.html.twig');

... I get the following error:

Template name "@MyTools/Tools/index.html.twig" is not valid (format is "bundle:section:template.format.engine").

Removing 'php' from the engines solves the problem and using the old template name style ('ToolsBundle:Tools:index.html.twig') also solves it.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions