Answers.Body: <p>I looked into this extensively and the one thing I found is that if your element type uses a custom content table, the save procedure will be done properly but when Craft needs to display the asset in the index, inside an asset selection modal, or an asset field, it simply won't look in the right place and unless you copy your asset's locale and title to the Craft content table from your custom content table, it won't show up.</p>
  
  <p>I've made @Brad aware of this but they haven't fix it yet, at least not in the last release that I can tell.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-01-28T07:52:08.113Z
Answers.LastActivityDate: 2015-01-28T07:52:08.113Z
Answers.UserDisplayName: Selvin Ortiz
Body: <p>I have a custom Element Type to which I can add several custom fields.  I can create a front end form with most of those custom fields and the submitted data saves just fine.  However, I'm getting some odd behavior with the Assets field.</p>
  
  <p>I can save Assets fields from the front end of Craft to Craft sections just fine.  And I can edit one of the Entries for my custom Element types on the backend and upload an Asset just fine there as well.</p>
  
  <p>But when I submit an Asset from the front-end for a new Entry with this custom Element type, I don't get the right behavior. </p>
  
  <p>What does happen (as far as I can tell):</p>
  
  <ol>
  <li>The asset uploads and appears in the target upload folder</li>
  <li>A new row in the craft_relations table is created correctly
  identifying the asset and the element that it is related to.</li>
  </ol>
  
  <p>What doesn't happen:</p>
  
  <ol>
  <li>The uploaded asset doesn't appear in the Asset index.  Even if I reindex assets for this particular folder, it never shows up in the Assets file manager.</li>
  <li>When I visit the individual entry page in the CP, the Asset never appears. (But if I upload the asset directly from this CP page, the asset then does appear on this same page)</li>
  </ol>
  
  <p>I'm struggling to know where to look to troubleshoot this.  What would cause an Asset not to display properly when it's uploaded from the front end but to work fine when it's uploaded from the back end?  Could I be missing some data on the front end submission?  My form uses <code>enctype="multipart/form-data"</code> and the asset field is as simple as it gets (and I've tried several variations (<code>&lt;input type="file" name="fields[uploadfield]" &gt;</code>)</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-08-10T16:00:08.690Z
Comments.Text: First thing I'd do is throw xDebug against it.  Set a breakpoint on EntriesController->saveEntry() and step through it line-by-line to see what's going on.
Comments.UserDisplayName: Brad Bell
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-01-26T21:47:47.150Z
Comments.Text: I'm having this problem also, Hopefully the Craft team can jump in with some insight.
Comments.UserDisplayName: etx
Tags: <assets><elementtype>
Title: Front End Asset Upload to Custom Element Type not working
ThreadText: # Front End Asset Upload to Custom Element Type not working
  
  (Asked by: username_0 on 2014-08-10)
  
  I have a custom Element Type to which I can add several custom fields. I can create a front end form with most of those custom fields and the submitted data saves just fine. However, I'm getting some odd behavior with the Assets field.
  
  I can save Assets fields from the front end of Craft to Craft sections just fine. And I can edit one of the Entries for my custom Element types on the backend and upload an Asset just fine there as well.
  
  But when I submit an Asset from the front-end for a new Entry with this custom Element type, I don't get the right behavior.
  
  What does happen (as far as I can tell):
  
  1. The asset uploads and appears in the target upload folder
  2. A new row in the craft\_relations table is created correctly
     identifying the asset and the element that it is related to.
  
  What doesn't happen:
  
  1. The uploaded asset doesn't appear in the Asset index. Even if I reindex assets for this particular folder, it never shows up in the Assets file manager.
  2. When I visit the individual entry page in the CP, the Asset never appears. (But if I upload the asset directly from this CP page, the asset then does appear on this same page)
  
  I'm struggling to know where to look to troubleshoot this. What would cause an Asset not to display properly when it's uploaded from the front end but to work fine when it's uploaded from the back end? Could I be missing some data on the front end submission? My form uses `enctype="multipart/form-data"` and the asset field is as simple as it gets (and I've tried several variations (`<input type="file" name="fields[uploadfield]" >`)
  
  **Tags:** assets, elementtype
  
  > **Comments:**
  > **username_1**: First thing I'd do is throw xDebug against it.  Set a breakpoint on EntriesController->saveEntry() and step through it line-by-line to see what's going on.  
  > **username_2**: I'm having this problem also, Hopefully the Craft team can jump in with some insight.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_3 on 2015-01-28. Score: 1
  
  I looked into this extensively and the one thing I found is that if your element type uses a custom content table, the save procedure will be done properly but when Craft needs to display the asset in the index, inside an asset selection modal, or an asset field, it simply won't look in the right place and unless you copy your asset's locale and title to the Craft content table from your custom content table, it won't show up.
  
  I've made @username_1 aware of this but they haven't fix it yet, at least not in the last release that I can tell.
  
  
  ---
  
  