PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

database error and cut-off input fields

  1. I created a form, to create a concept post. If I fill in the form, the main post field is cut-off after about 200 chars. I can't find the problem... A test install of worpress (3.2.1) doesn't have the problem with the same form. Disabling some of the recently added plugins had no result. Debug mode reveals the following database error on submit. But I don't know what is means.

    INNER JOIN wp_rg_lead_detail_long l ON l.lead_detail_id = d.id
    WHERE lead_id=25 AND field_number BETWEEN 1,000000 AND 2,000000 gemaakt door require, wp, WP->main, do_action_ref_array, call_user_func_array, RGForms->maybe_process_form, GFFormDisplay->process_form, GFFormDisplay->handle_submission, RGFormsModel->get_lead, RGFormsModel->build_lead_array, RGFormsModel->get_field_value_long
    [07-Nov-2011 09:19:14] WordPress databasefout You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '000000 AND 2,000000' at line 3 bij query SELECT l.value FROM wp_rg_lead_detail d

    And above error is in my error log about 10 times on 1 form submit...

    Is above error related to gravity forms, or my install of wordpress...

    Posted 12 years ago on Monday November 7, 2011 | Permalink
  2. Update to 1.6.1 doesn't help....

    Posted 12 years ago on Monday November 7, 2011 | Permalink
  3. wp_rg_lead_detail stores 200 characters of the entry, and if there is more information to store, it's stored in wp_rg_lead_detail_long. That explains the 200 character limit. But the database errors should not be occurring. It could be something with the installation, but I doubt it, since you upgraded to 1.6.1.

    I will have one of the developers take a look at this for you.

    Posted 12 years ago on Tuesday November 8, 2011 | Permalink
  4. By looking at your error, the root cause is probably related to another plugin or theme calling the setlocale() method. A plugin that calls that method is AdRotate. Do you have that plugin installed. The problem with calling the setlocale() the way they do is that is changes the way numbers are formatted by the webserver. The SQL error below is caused by the numbers 1,000000 AND 2,000000. They should be 1.000000 AND 2.000000.

    We will need to find the plugin that is calling the setlocale() method and make a small adjustment to it so that the number format is not changed.

    Posted 12 years ago on Tuesday November 8, 2011 | Permalink
  5. Yes, but it is not a plugin that is causing the problem. The problem is also occurring with all plugins disabled. I Checked that. But, I was remembering that I DID set de setlocate in functions.php in my theme, for changing some dates....

    It was set to

    setlocale(LC_ALL, 'nl_NL');

    Commenting out this line solves my problem ;)

    I changed it to setlocale(LC_TIME, 'nl_NL'); and now all is working as it should be.

    I Thank you for locating this problem. It was really driving me crazy ;)

    Posted 12 years ago on Tuesday November 8, 2011 | Permalink
  6. There you go. I am glad you were able to find it.

    Posted 12 years ago on Tuesday November 8, 2011 | Permalink

This topic has been resolved and has been closed to new replies.