<p>Adding images with a named transform in a Redactor rich text field is causing an Internal Server Error on save: </p>

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

<p>Typical html generated by Redactor reads:</p>

<pre><code>`&lt;img src="http://craft-tryout:8888/assets/images/_thumbnail/afternoon_tea.JPG#asset:41:thumbnail"&gt;`
</code></pre>

<p>When I manually delete <code>#asset:41:thumbnail</code> this seems to fix the problem.</p>

<p>Images added in normal Craft image fields are all working OK.</p>

<ul>
<li><p>What is this extra bit of Redactor generated code?</p></li>
<li><p>Might I have set up something incorrectly with my transforms?</p></li>
</ul>

<p>Any suggestions?</p>

CC BY-SA 3.0
2014-08-17T18:52:20.010Z
I can reproduce and confirm this bug.
Christian Steger
CC BY-SA 3.0
2014-08-18T17:20:29.167Z
I'm *not* able to reproduce this locally, unfortunately. Can you reproduce the problem, then submit a ticket from your dashboard's Get Help widget and let it send along your logs and a database backup so we can investigate it.
Brad Bell
CC BY-SA 3.0
2014-08-20T15:19:19.457Z
Sorry Brad, before I got your message I deleted and re-imported all the images (I'm working on a small local install to learn my way around Craft and Twig templating). This fixed the problem, but also trampled across all the evidence. If anyone else still has this problem, perhaps they can submit a ticket.
Brian L
CC BY-SA 3.0
2014-08-20T17:10:27.023Z
I'm not sure whether this is a bug or not. I wondered whether the error message gave any clues. Also, I've found that the '#asset:41:thumbnail' -type code added by Redactor seems to be normal, as this now appears and works OK in my current set up. I'd still be interested to know what this code does. Hope this is on topic!
Brian L
<image-transforms><redactor><image>
Images added with transform in Redactor field causing Internal Server Error
# Images added with transform in Redactor field causing Internal Server Error

(Asked by: username_0 on 2014-08-17)

Adding images with a named transform in a Redactor rich text field is causing an Internal Server Error on save: 

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

Typical html generated by Redactor reads:
``

When I manually delete #asset:41:thumbnail this seems to fix the problem.
Images added in normal Craft image fields are all working OK.

What is this extra bit of Redactor generated code?
Might I have set up something incorrectly with my transforms?

Any suggestions?

**Tags:** image-transforms, redactor, image
> **Comments:**
> **username_1**: I can reproduce and confirm this bug.  
> **username_2**: I'm *not* able to reproduce this locally, unfortunately. Can you reproduce the problem, then submit a ticket from your dashboard's Get Help widget and let it send along your logs and a database backup so we can investigate it.  
> **username_0**: Sorry Brad, before I got your message I deleted and re-imported all the images (I'm working on a small local install to learn my way around Craft and Twig templating). This fixed the problem, but also trampled across all the evidence. If anyone else still has this problem, perhaps they can submit a ticket.  
> **username_0**: I'm not sure whether this is a bug or not. I wondered whether the error message gave any clues. Also, I've found that the '#asset:41:thumbnail' -type code added by Redactor seems to be normal, as this now appears and works OK in my current set up. I'd still be interested to know what this code does. Hope this is on topic!  

---

## 0 answers

