2

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             <input type="hidden" name="sectionId" value="{{ section.id }}">
24             {% if entry.id %}<input type="hidden" name="entryId" value="{{ entry.id }}">{% endif %}
25             {% if craft.isLocalized() %}<input type="hidden" name="locale" value="{{ entry.locale }}">{% endif %}
26         {% else %}
27             <input type="hidden" name="versionId" value="{{ entry.versionId }}">
28         {% endif %}
29 
30         <div class="grid first">
31             <div class="item" data-position="left" data-min-colspan="2" data-max-colspan="3">
32                 <div id="fields" class="pane">
33                     {% include "_includes/tabs" %}
34                     {% include "entries/_fields" with {
35                         static: isVersion
36                     } %}
37                 </div>
38             </div><!--/item-->
39 
40             <div class="item" data-position="right" data-colspan="1">
41 
42                 {% if showPreviewBtn %}
43                     {% include "_includes/previewbtns" %}
44                 {% endif %}
45 
46                 {% if craft.isLocalized() and section.getLocales() | length > 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? – Brad Bell Apr 14 '15 at 0:39
  • Do you have "Restrict uploads to a single folder" set? What is "(Default) Upload Location" set to? – Brad Bell Apr 14 '15 at 0:44
  • 1
    Doh! Yes. It had an invalid variable set in the path... That was it. – Chase Giunta Apr 14 '15 at 0:49
2

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.