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 · 724 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 stuart young, 2 weeks ago
3 251 2 weeks ago
Themes & Styling · by Sebadamus, 3 weeks ago
5 320 3 weeks ago
Themes & Styling · by martynfoster735, 4 weeks ago
1 310 4 weeks ago
Themes & Styling · by Justin Young, 1 month ago
1 348 1 month ago
Themes & Styling · by Slebeig, 2 months ago
4 474 2 months ago