1

I see this is a time-honored problem...

I am using Freeform 4.1.3 on EE 2.9.2. This has been a stable solution for a long time. I have changed nothing with the system. I have been successfully collecting data as recently as last week. I have created a couple of new forms that are essentially clones of forms that still work. And yet I get the dreaded error.

Have tried two browsers, one with no related history. Source code shows hidden fields for both XID and crf_token values. I have cleared the cache. I cannot turn off caching, getting the "Cannot connect to Dummy, using File driver instead" error message.

I see other threads with solutions that work some of the time for some of the people, but I hate to go twisting knobs when the current configuration has been working fine.

Any help? Simple code:

{exp:freeform:form
    form_name="council_nom"
    required="first_name|last_name|email"
    notify_user="yes" 
    user_notification_template="default" 
    user_email_field="email"
    notify_admin="yes" 
    admin_notification_template="default_template" 
    admin_notify="webmaster@4sonline.org" 
    return="http://www.4sonline.org/prizes/carson/got_it"
}

    <h3>Nominated by</h3>
    <label>First name:  </label>
    {freeform:field:first_name}

    <label>Last name:    </label>
    {freeform:field:last_name}

    <label>Email:    </label>
    {freeform:field:email}

    <label>Institution:    </label>
    {freeform:field:institution}

    <h3>Nominee</h3>
    <label>First name</label>
    {freeform:field:nominee_first}

    <label>Last name:    </label>
    {freeform:field:nominee_last}

    <label>Email:    </label>
    {freeform:field:nominee_email}

    <label>Institution:    </label>
    {freeform:field:nominee_institution}


    <label>Rationale (limit 2,000 words)</label>
    {freeform:field:rationale}


    <p>Not so fast!<br/>
      {freeform:captcha} <br>
      If you are not a robot, please type the text above into this box:
      <input type="text" name="captcha" /> <br/>
    </p>

    <p><input type="submit" name="submit" value="Submit" /></p>

{/exp:freeform:form}
0

It looks like you are using ce_cache module. You need to escape the cache for form so it can get fresh CSRF token and XID for each refresh.

Try:

{exp:ce_cache:escape}
    {exp:freeform:form
        form_name="council_nom"
        required="first_name|last_name|email"
        notify_user="yes" 
        user_notification_template="default" 
        user_email_field="email"
        notify_admin="yes" 
        admin_notification_template="default_template" 
        admin_notify="webmaster@4sonline.org" 
        return="http://www.4sonline.org/prizes/carson/got_it"
    }

        <h3>Nominated by</h3>
        <label>First name:  </label>
        {freeform:field:first_name}

        <label>Last name:    </label>
        {freeform:field:last_name}

        <label>Email:    </label>
        {freeform:field:email}

        <label>Institution:    </label>
        {freeform:field:institution}

        <h3>Nominee</h3>
        <label>First name</label>
        {freeform:field:nominee_first}

        <label>Last name:    </label>
        {freeform:field:nominee_last}

        <label>Email:    </label>
        {freeform:field:nominee_email}

        <label>Institution:    </label>
        {freeform:field:nominee_institution}


        <label>Rationale (limit 2,000 words)</label>
        {freeform:field:rationale}


        <p>Not so fast!<br/>
          {freeform:captcha} <br>
          If you are not a robot, please type the text above into this box:
          <input type="text" name="captcha" /> <br/>
        </p>

        <p><input type="submit" name="submit" value="Submit" /></p>

    {/exp:freeform:form}
{/exp:ce_cache:escape}
  • Thanks for the try, but I am not using ce_cache. Inserting the suggested code yielded a template error. Again, why would other forms work and this one not? BTW, no wait time is required to trigger the expiration. I am never able to submit. – user2462 Jan 2 '18 at 14:57
  • You mentioned that you get error: I cannot turn off caching, getting the "Cannot connect to Dummy, using File driver instead" error message. This error only occur when you are using caching. – Mufi - Amici Infotech Jan 2 '18 at 17:57
  • If that is the case, I should be able to clear the cache and submit a form, correct? This is not the case. – user2462 Jan 2 '18 at 21:43
  • Try copy the form in brand new template. Run that new page and submit the form. – Mufi - Amici Infotech Jan 3 '18 at 6:28
  • Same result. Form expired. – user2462 Jan 3 '18 at 14:09
0

It appears that you're using a version of Freeform that is not compatible with the version of ExpressionEngine you're using. Freeform 4.1.4 makes a compatibility update for EE 2.8+, which changed the way CSRF handling works (specifically, EE changed things from XID_TOKEN to CSRF_TOKEN).

The version of Freeform you're using is also over 4 years old. The latest version available for Freeform 4.x for EE2 is Freeform 4.2.5. I would recommend you update to this version to resolve this issue (and several other issues).

If you're using the Pro version of Freeform, you will have access to this update inside your Solspace account. If this is the free version of Freeform, you'll need to contact Solspace support for the updated version (select "Account" from the Product menu in support form).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.