1

When I try to save a new entry as a child under a Structure entry, I get the following error:

Internal Server Error

Object of class Craft\ElementCriteriaModel could not be converted to string

I also get the same error when I tried to move it out to it's own Channel instead, so I am not sure what could be causing it.

I have several fields in this entry, most notably the cause would be an Entries field and Tags field. Both seem to select the correct values fine.

2
  • Are you using a custom plugin? Or any plugins, for that matter? That's not an error that should crop up during normal CP usage.
    – Lindsey D
    Commented Aug 12, 2014 at 1:04
  • I realized it was a random problem and posted my solution. Thanks for the help @LindseyD.
    – cmfolio
    Commented Aug 12, 2014 at 1:14

1 Answer 1

1

I have solved the problem myself while debugging.

I had the Entry Type "Title" field set to {relatedFieldName} Post which was causing the error. When I changed it to a plain string or other non-object field name, it no longer errors out.

I was unclear about how the Title field works exactly.

1
  • Ah, very interesting! I actually stumbled across this today in a conversation with Ben Parizek... Any "related field" values are actually handled as ElementCriteriaModels, whereas most other fields would be handled as strings or JSON arrays. That totally explains why the error message complained about converting an object to a string. Thanks for reporting back!
    – Lindsey D
    Commented Aug 12, 2014 at 1:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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