Skip to content

Twig template label is null when adding templates #318

@aksm

Description

@aksm

What?

While investigating/testing #315, I got this error:

TypeError: Twig\Source::__construct(): Argument #2 ($name) must be of type string, null given, called in /var/www/html/web/modules/contrib/format_strawberryfield/src/Entity/MetadataDisplayEntity.php on line 423 in Twig\Source->__construct() (line 30 of /var/www/html/vendor/twig/twig/src/Source.php)

The label is null here for newly added templates:

$source = new Source($twigtemplate, $this->label(), '');

I guess I had never tested getTwigVariablesUsed() while adding a new template? Or something else has changed? Will investigate further.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions