I am having trouble with entries submitted via SAEF. I have tracked this down to how the SAEF is specifying the text format for my custom fields. Or rather, how it’s not setting the text formatting. Although I have a workaround, I wanted to post here to find out either a) what I’m doing wrong or b) so this can be filed properly as a bug.
The default text formatting for the custom field is set to ‘Textile’ (using the first-party Textile Add-on). If I manually add a hidden field
<input name="field_ft_ID" type="hidden" value="Textile" />(where ID matches the ID of the custom field) everything is fine. I believe the SAEF {custom_fields} loop ought to be adding this hidden field for me, but it isn’t. I have tried re-copying the {custom_fields} sample code from the Docs (http://ellislab.com/expressionengine/user-guide/modules/channel/entry_form.html), but still no hidden field_ft_ID fields.
Without the hidden field viewing an entry submitted via SAEF gives the following PHP error:
A PHP Error was encountered
Severity: Warning
Message: EE_Typography::require_once(/home/svn/dev/sophie4/edit/expressionengine/third_party//pi..php) [ee-typography.require-once]: failed to open stream: No such file or directory
Filename: libraries/EE_Typography.php
Line Number: 467
Fatal error: EE_Typography::require_once() [function.require]: Failed opening required '/home/svn/dev/sophie4/edit/expressionengine/third_party//pi..php' (include_path='.:/usr/share/php:/usr/share/pear') in /home/svn/dev/sophie4/edit/expressionengine/libraries/EE_Typography.php on line 467I believe this means that no field formatting is being set. Interestingly even toggling the field formatting in the CP doesn’t properly reset it to Textile. Adding entries directly via the CP is fine, and uses Textile quite happily.
I am happy with the workaround of hard-coding the hidden field on this form, but would like to understand the bug or what I’m doing wrong for the future.