Body: <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>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-08-17T18:52:20.010Z
Comments.Text: I can reproduce and confirm this bug.
Comments.UserDisplayName: Christian Steger
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-08-18T17:20:29.167Z
Comments.Text: 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.
Comments.UserDisplayName: Brad Bell
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-08-20T15:19:19.457Z
Comments.Text: 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.
Comments.UserDisplayName: Brian L
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-08-20T17:10:27.023Z
Comments.Text: 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!
Comments.UserDisplayName: Brian L
Tags: <image-transforms><redactor><image>
Title: Images added with transform in Redactor field causing Internal Server Error
ThreadText: # 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:
  
  ```
  `<img src="http://craft-tryout:8888/assets/images/_thumbnail/afternoon_tea.JPG#asset:41:thumbnail">`
  
  ```
  
  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 username_2, 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
  
  