ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Safecracker Error (even with hotfix applied)

July 12, 2011 4:00pm

Subscribe [2]
  • #1 / Jul 12, 2011 4:00pm

    PDM

    61 posts

    Am setting up a new SafeCracker form, but running into an error right from the start. When I submit the form, I get an error “The Display Name field is required.” I’ve stripped down the template to the barebones, and am still getting the error.

    {exp:safecracker channel="lakes" return="lakes/ENTRY_ID"}
    
    <label for="title">Title</label>
    <input type="text" name="title" id="title" value="{title}" maxlength="150" />
    <input type="submit" name="submit" value="Submit" />
    {/exp:safecracker}


    Am running EE 2.2.1 with hotfixes (http://ellislab.com/forums/viewthread/193320/) applied.

    Not sure if this helps troubleshoot, but the error console in Firefox indicates two instances of “$ is not defined.” on lines 31 & 37. When viewing the source code for the file linked from the error console, it only has 29 lines, with the last being:

    <style type="text/css">.hasDatepicker{background:#fff url(<a href="http://localhost/iaglr/themes/cp_themes/default/images/calendar_bg.gif">http://localhost/iaglr/themes/cp_themes/default/images/calendar_bg.gif</a>) no-repeat 98% 2px;background-repeat:no-repeat;background-position:99%;}</style>[removed]$.createDatepickerTime=function(){a=new Date();b=a.getHours();c=a.getMinutes();if(c<10){c="0"+c;}if(b>12){b-=12;d=" PM";}else if(b==12){d=" PM";}else{d=" AM";}EE.date_obj_time=" '"+b+":"+c+d+"'";};$.createDatepickerTime();[removed]
  • #2 / Jul 13, 2011 12:17pm

    Sue Crocker

    26054 posts

    Hi, PDM. I’m going to be testing this on a slightly newer version of EE on Firefox. Which version of EE and Firefox are you testing with?

  • #3 / Jul 13, 2011 12:29pm

    PDM

    61 posts

    Hi Sue,

    I’m using FF 5.0 and just tested in IE 9.0 and it doesn’t work there either. Am using EE v 2.2.1.

    Thanks!

    Paula

  • #4 / Jul 14, 2011 10:43pm

    Lisa Wess

    20502 posts

    Hi, Paula!

    If you try with the exact code from the docs:

    {exp:safecracker channel="contact_form" return="contact/thanks" }
            <input name="title" type="text" /> 
            <input name="my_custom_field" type="text" /> 
            <input type="submit" value="Submit" />
        {/exp:safecracker}

    Does that work? You can find other known-working examples here

    Also, are you using any third-party custom field types, or extensions?

    Thank you.

  • #5 / Jul 15, 2011 10:19am

    PDM

    61 posts

    Thanks Lisa! Set up a contact_form channel to test, and that worked…so sleuthed around a bit more in the lakes channel that wasn’t working, and realized I’d overlooked one of the name fields for the lakes channel in a matrix field. With title, display name, alternate names, and local names fields, I’m getting “named” out! Chalk this up to class=“duh moment” and case=“closed”!

  • #6 / Jul 17, 2011 2:59pm

    Lisa Wess

    20502 posts

    Hi, PDM,

    Awesome!  That would have been a bear to find.  I’m glad that I got you going down the right path, and happy you were able to figure out what was actually broken.

    If anything else comes up, please don’t hesitate to start a new thread and let us know!

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases