0

When I'm using devmode to dump out a twig variable the site will no longer work saying that entry = NULL.

This only happens when I have some twig logic at the top of my template e.g.

    {% set metaDescription = entry.metaDescription %}
    {% set metaPageTitle = entry.metaPageTitle %}

do I need to move this logic elsewhere in order for devMode to work?

1

This is because I was on a category page not an entry page, so the entry variable didn't exist!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.