I have a very simple Safecracker form, consisting of nothing but an Assets field. (I built it so I could quickly run through all my entries and re-assign images that have all recently been updated.)
Here's the code in question:
{exp:channel:entries channel="articles" limit="1" disable="categories|category_fields|member_data"}
{exp:safecracker channel="articles" return="/utilities/illos/" include_jquery="yes" json="no" safecracker_head="yes" class="editForm" entry_id="{entry_id}"}
{field:article_illustration}
<br><input type="submit" name="submit" value="Submit">
</tr>
{/exp:safecracker}
{/exp:channel:entries}
The Assets widget is working as expected (I can trigger the file chooser, select images, and the thumbnail shows up in the field). The problem is that then saving images does not save the new selection.
Watching events through the inspector, it looks like even though my selection is being visually added to the field, the hidden field never gets populated with the required value.
(Details: ExpressionEngine v2.5.5; Assets v1.2.2)
Updated with more info:
I've run through a few scenarios.
- If the entry already has an image, and I save without changes, the image stays.
- If I remove the image and save, the image is removed.
- I added a title field, and it updates appropriately.