Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TwingErrorRuntime e.getTemplateLine is not a function #526

Closed
malipetek opened this issue Sep 24, 2020 · 1 comment
Closed

TwingErrorRuntime e.getTemplateLine is not a function #526

malipetek opened this issue Sep 24, 2020 · 1 comment

Comments

@malipetek
Copy link

malipetek commented Sep 24, 2020

If you are having this error, it means you are trying to print a non existent key of a object.
Error message gives a line number but that is irrelevant.
You should check your last changes or:

  1. Default all print statements with default filter
    ( for example:
{{ product.title }}

to

{{ product.title|default('No Title') }}

)
2. Wrap all your print statements with relevant if condition.
( for example:

{{ product.title }}

to

{% if product.title %}
    {{ product.title }}
{% endif %}

)

@ericmorand
Copy link
Member

Fixed a while ago.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants