<p>This was caused by an incorrectly configured assets field in the entry type. The upload location had an invalid variable set in the path.</p>

CC BY-SA 3.0
2015-04-14T00:51:31.947Z
2015-04-14T00:51:31.947Z
Chase Giunta
<p>After updating some fields for entry types and submitting new entries, I'm getting a <code>"Object of class Craft\ElementCriteriaModel could not be converted to string"</code> in the Craft control panel upon trying to access any of the entries. </p>

<p>I can still create entries, but once created, I cannot access it again.</p>

<p>Any idea how to troubleshoot this?</p>

<p>The error it's giving back to me is on line 34</p>

<p><code>craft/app/templates/entries/_edit.html(34)</code></p>

<pre><code>22         {% if not isVersion %}
23             &lt;input type="hidden" name="sectionId" value="{{ section.id }}"&gt;
24             {% if entry.id %}&lt;input type="hidden" name="entryId" value="{{ entry.id }}"&gt;{% endif %}
25             {% if craft.isLocalized() %}&lt;input type="hidden" name="locale" value="{{ entry.locale }}"&gt;{% endif %}
26         {% else %}
27             &lt;input type="hidden" name="versionId" value="{{ entry.versionId }}"&gt;
28         {% endif %}
29 
30         &lt;div class="grid first"&gt;
31             &lt;div class="item" data-position="left" data-min-colspan="2" data-max-colspan="3"&gt;
32                 &lt;div id="fields" class="pane"&gt;
33                     {% include "_includes/tabs" %}
34                     {% include "entries/_fields" with {
35                         static: isVersion
36                     } %}
37                 &lt;/div&gt;
38             &lt;/div&gt;&lt;!--/item--&gt;
39 
40             &lt;div class="item" data-position="right" data-colspan="1"&gt;
41 
42                 {% if showPreviewBtn %}
43                     {% include "_includes/previewbtns" %}
44                 {% endif %}
45 
46                 {% if craft.isLocalized() and section.getLocales() | length &gt; 1 %}
</code></pre>

CC BY-SA 3.0
2015-04-14T00:39:52.753Z
I'd say one of your fields in that entry is causing the error. Can you narrow it down by removing some until the error goes away?
Brad Bell
CC BY-SA 3.0
2015-04-14T00:44:17.303Z
Do you have "Restrict uploads to a single folder" set? What is "(Default) Upload Location" set to?
Brad Bell
CC BY-SA 3.0
2015-04-14T00:49:11.480Z
Doh! Yes. It had an invalid variable set in the path... That was it.
Chase Giunta
<entries><error-message>
"Object of class Craft\ElementCriteriaModel could not be converted to string" in Craft CP
# "Object of class Craft\ElementCriteriaModel could not be converted to string" in Craft CP

(Asked by: username_0 on 2015-04-13)

After updating some fields for entry types and submitting new entries, I'm getting a "Object of class Craft\ElementCriteriaModel could not be converted to string" in the Craft control panel upon trying to access any of the entries. 
I can still create entries, but once created, I cannot access it again.
Any idea how to troubleshoot this?
The error it's giving back to me is on line 34
craft/app/templates/entries/_edit.html(34)
22         {% if not isVersion %}
23             
24             {% if entry.id %}{% endif %}
25             {% if craft.isLocalized() %}{% endif %}
26         {% else %}
27             
28         {% endif %}
29 
30         
31             
32                 
33                     {% include "_includes/tabs" %}
34                     {% include "entries/_fields" with {
35                         static: isVersion
36                     } %}
37                 
38             
39 
40             
41 
42                 {% if showPreviewBtn %}
43                     {% include "_includes/previewbtns" %}
44                 {% endif %}
45 
46                 {% if craft.isLocalized() and section.getLocales() | length > 1 %}

**Tags:** entries, error-message
> **Comments:**
> **username_1**: I'd say one of your fields in that entry is causing the error. Can you narrow it down by removing some until the error goes away?  
> **username_1**: Do you have "Restrict uploads to a single folder" set? What is "(Default) Upload Location" set to?  
> **username_0**: Doh! Yes. It had an invalid variable set in the path... That was it.  

---

## 1 answers

### Answer by username_0 on 2015-04-14. Score: 2 | Accepted answer

This was caused by an incorrectly configured assets field in the entry type. The upload location had an invalid variable set in the path.


---

