Man, I’ve been battling with this for two days now, and am at my wit’s end. First of all, let me lay out the landscape of my set-up.
• EE v2.4.0 - Build: 20120123
• Safecracker 2.1
• Using .htaccess to remove index.php from URL string
• Admin > General Config > Name of your site’s index page is blank
• Custom Member Group for “Retailers” that have members who are allowed to post in Channels called “Retailers” and “Workshops”
• Each entry in the above channels is assigned to these members as “Authors”
On the front end, I have created a simple member login form that allows them access those entries that are specifically assigned to them for editing. Will also be allowing them to create new entries, but that’s not the focus of my issue here.
The problem is, that when a user logs in, is presented with the list of entries available to them, selects the entry they want to edit and the form loads up, issues start to arise. They are as follows:
1. When the page completes loading, the following error gets generated in Firebug:
Timestamp: 3/29/12 10:42:40 AM
Error: b is null
Source File: <a href="http://www.mydomain.com/?ACT=7&ui=core,widget,mouse,position,draggable,resizable,sortable,button,dialog,datepicker&plugin=scrollable,scrollable.navigator,ee_filebrowser,ee_fileuploader,markitup,thickbox,toolbox.expose,overlay,tmpl&file=json2&v=1332968175&include_jquery=y">http://www.mydomain.com/?ACT=7&ui=core,widget,mouse,position,draggable,resizable,sortable,button,dialog,datepicker&plugin=scrollable,scrollable.navigator,ee_filebrowser,ee_fileuploader,markitup,thickbox,toolbox.expose,overlay,tmpl&file=json2&v=1332968175&include_jquery=y</a>
Line: 6772. If I include the Title field and URL title field in the form, the onkeyup=“liveUrlTitle();” function throws an error in Firebug, and doesn’t update the url-title field (naturally).
3. If I remove the content of a required field (in the example below the “retailer_email_address” field) and submit the form, I am returned to the same page (expected), but no errors are displayed.
4. If all the necessary fields are filled and completed (perhaps editing something like “retailer_contact_name” to cause a change), and I submit the form, I am STILL redirected back to the same form, and no changes are made to the entry.
I’ve been all over the Safecracker docs, searched this forum for hours, dug through bug reports and everything else I can think of, but still this thing is not working.
To add a context, let’s say the URL in question is this:
http://www.anniesloanunfolded.com/private_2012/locations/edit/3-oaks-studio
A simplified version of my form looks like this:
{exp:safecracker
id="acctMgmtForm"
channel="retailers"
return="{segment_1}/complete"
url_title="{segment_4}"
error_handling="inline"
preserve_checkboxes="yes"
use_live_url="no"
author_only="yes"
rules:retailer_email_address="required"
}
<fieldset>
{if field_errors:count >= 1}
<div class="formErrors">{field_errors}<span class="error">{error}</span><br>{/field_errors}</div>
{/if}
<label for="title">Company Name (or contact name if not a business)</label>
<input type="text" name="title" id="title" value="{title}" size="50" maxlength="100" />
<label for="url_title">URL Title (Read Only)</label>
<input type="text" name="url_title" id="url_title" value="{url_title}" maxlength="75" size="50" readonly="readonly" />
<label for="retailer_contact_name"> Your Name:</label>
<input type="text" name="retailer_contact_name" value="{retailer_contact_name}" />
<label for="retailer_email_address"><span>*</span> Email Address:</label>
<input type="text" name="retailer_email_address" value="{retailer_email_address}" />
</fieldset>
<input class="button" type="submit" name="submit" value="Save Changes" />
{/exp:safecracker}Hopefully this provides whomever picks this up with a good amount of info from which to provide suggestions. For EE staff, I’m also willing to PM control panel access and a login to the front-end to help troubleshoot any of these issues from within.
Thanks in advance for any help or perspective. If I can get this issue solved, it should allow me to replicate the method to a few other areas of admin I have scheduled for these users.