<p>Well I now see this error was caused by the included template and not the fact that I was trying to include a template. </p>

<p>I thought that the error message would show the error on the included template that was the actual source of the problem, but it was just referencing the include as the error.</p>

CC BY-SA 3.0
2015-03-25T20:51:09.363Z
2015-03-25T20:51:09.363Z
Jonathan Melville
<p>I have a template with just this code:</p>

<pre><code>{% include 'amenities/_types/amenities' %}
</code></pre>

<p>This results in a template error: </p>

<p><strong>Object of class Craft\ElementCriteriaModel could not be converted to string</strong></p>

<p>Never encountered this one before. What is causing this?</p>

CC BY-SA 3.0
2015-03-25T20:45:50.007Z
The error isn't being triggered here... it's being triggered in your `_types/amenities` template. Can you show the Twig code for that one please?
Lindsey D
CC BY-SA 3.0
2015-03-25T20:55:17.500Z
Yep I figured this out actually. Chalk it up to a long day and I was just misreading the error! Thanks.
Jonathan Melville
<error-templates>
Include results in "Object of class Craft\ElementCriteriaModel could not be converted to string"
# Include results in "Object of class Craft\ElementCriteriaModel could not be converted to string"

(Asked by: username_0 on 2015-03-25)

I have a template with just this code:
{% include 'amenities/_types/amenities' %}

This results in a template error: 
Object of class Craft\ElementCriteriaModel could not be converted to string
Never encountered this one before. What is causing this?

**Tags:** error-templates
> **Comments:**
> **username_1**: The error isn't being triggered here... it's being triggered in your `_types/amenities` template. Can you show the Twig code for that one please?  
> **username_0**: Yep I figured this out actually. Chalk it up to a long day and I was just misreading the error! Thanks.  

---

## 1 answers

### Answer by username_0 on 2015-03-25. Score: 2

Well I now see this error was caused by the included template and not the fact that I was trying to include a template.

I thought that the error message would show the error on the included template that was the actual source of the problem, but it was just referencing the include as the error.


---

