I am using EE Core and have set-up a site so that when a new entry is published, you also select a category for it, and on the front end this simply outputs the category name. This works perfectly when you publish an entry from the back end, but I also have a safecracker form and when you post a new entry from that, the category name doesn't get outputted - but the drop down of categories is there and correct. Any ideas what could be causing this?
This is is outputting the name;
<h1>{categories}{category_name} {/categories}</h1>
And the safecracker form with just the category code;
{exp:safecracker channel="new_property" return="property/property-index" }
<select name="my_custom_field">
{exp:channel:categories style="linear"}
<option value="{category_name}">{category_name}</option>
{/exp:channel:categories}
</select>
{custom_fields}
{/exp:safecracker}