Skip to content
Grav 2.0 is officially stable. Read the announcement →
Themes & Styling

Exception during rendering of a template

Started by Patrick 7 years ago · 3 replies · 628 views
7 years ago

Hi there
Since the upgrade to 1.6 i get an error:

TXT
An exception has been thrown during the rendering of a template ("A non-numeric value encountered").
Previous exceptions
* A non-numeric value encountered  (2)

The error message points to a section in the template like this:

TWIG
{% for image in page.media.images %}
  {% set exif = exif(image.filepath, true) %}
{% endfor %}

The snippet was right from the grav-docs here: https://learn.getgrav.org/16/themes/twig-filters-functions#exif
Do you have any advice what the problem could be? I'm running php7.1.26 and everything works fine with grav 1.5.9.
Regards, Patrick

7 years ago

No one? I still can't find the cause of the error and any help is very appreciated.

7 years ago

Hi @piridium, what theme is active with this error? Does the error happen regardless of the active theme? I have never used that function myself.

7 years ago

Hi @paulhibbitts
It's a custom theme which is fairly simple. Just a bunch of twig files.
The function should read the image caption and display it in the lightbox.

Suggested topics

Topic Participants Replies Views Activity
Themes & Styling · by Pedro M, 2 months ago
4 238 2 months ago
Themes & Styling · by Ian, 2 months ago
3 121 2 months ago
Themes & Styling · by Norbert, 2 years ago
11 486 3 months ago
Themes & Styling · by Lukáš Findeis, 3 months ago
0 75 3 months ago
Themes & Styling · by Sebadamus, 4 months ago
5 155 3 months ago