An exception has been thrown during the rendering of a template ("No locale has been set and current locale is undefined.")


#1

i get this exception thrown when trying to render image in view for
syliusCmsPlugin

{% if page.image %}
      <img width="100%" src="{{ asset('media/image/' ~ page.image.path) }}"/>
{% endif %}

this is thrown in
sylius/sylius/src/Sylius/Component/Resource/Model/TranslatableTrait.php

$locale = $locale ?: $this->currentLocale;
        if (null === $locale) {
            throw new \RuntimeException('No locale has been set and current locale is undefined.');
        }

why currentLocale is not set although i have it set in my config.yml file

parameters:
    locale: en_US