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.

Error saving form

  1. I cannot save any form I create. It just says: There was an error while saving your form. Please contact our support team.
    What should I do? Could you take a look?
    Do you need WP login to check (because the site is now in maintenance mode)?

    Thanks!

    Posted 8 years ago on Monday August 6, 2012 | Permalink
  2. I just tried to reinstall the plugin and it could not install. The error was:

    WordPress database error: [Unknown character set: 'utf']
    CREATE TABLE wp_rg_form ( id mediumint(8) unsigned not null auto_increment, title varchar(150) not null, date_created datetime not null, is_active tinyint(1) not null default 1, PRIMARY KEY (id) ) DEFAULT CHARACTER SET utf-8

    WordPress database error: [Unknown character set: 'utf']
    CREATE TABLE wp_rg_form_meta ( form_id mediumint(8) unsigned not null, display_meta longtext, entries_grid_meta longtext, PRIMARY KEY (form_id) ) DEFAULT CHARACTER SET utf-8

    WordPress database error: [Table 'lidija_wrdp1.wp_rg_form_meta' doesn't exist]
    SHOW INDEX FROM wp_rg_form_meta WHERE Key_name='form_id'

    WordPress database error: [Unknown character set: 'utf']
    CREATE TABLE wp_rg_form_view ( id bigint(20) unsigned not null auto_increment, form_id mediumint(8) unsigned not null, date_created datetime not null, ip char(15), count mediumint(8) unsigned not null default 1, PRIMARY KEY (id), KEY form_id (form_id) ) DEFAULT CHARACTER SET utf-8

    WordPress database error: [Unknown character set: 'utf']
    CREATE TABLE wp_rg_lead ( id int(10) unsigned not null auto_increment, form_id mediumint(8) unsigned not null, post_id bigint(20) unsigned, date_created datetime not null, is_starred tinyint(1) not null default 0, is_read tinyint(1) not null default 0, ip varchar(39) not null, source_url varchar(200) not null default '', user_agent varchar(250) not null default '', currency varchar(5), payment_status varchar(15), payment_date datetime, payment_amount decimal(19,2), transaction_id varchar(50), is_fulfilled tinyint(1), created_by bigint(20) unsigned, transaction_type tinyint(1), status varchar(20) not null default 'active', PRIMARY KEY (id), KEY form_id (form_id), KEY status (status) ) DEFAULT CHARACTER SET utf-8

    WordPress database error: [Unknown character set: 'utf']
    CREATE TABLE wp_rg_lead_notes ( id int(10) unsigned not null auto_increment, lead_id int(10) unsigned not null, user_name varchar(250), user_id bigint(20), date_created datetime not null, value longtext, PRIMARY KEY (id), KEY lead_id (lead_id), KEY lead_user_key (lead_id,user_id) ) DEFAULT CHARACTER SET utf-8

    WordPress database error: [Unknown character set: 'utf']
    CREATE TABLE wp_rg_lead_detail ( id bigint(20) unsigned not null auto_increment, lead_id int(10) unsigned not null, form_id mediumint(8) unsigned not null, field_number float not null, value varchar(200), PRIMARY KEY (id), KEY form_id (form_id), KEY lead_id (lead_id) ) DEFAULT CHARACTER SET utf-8

    WordPress database error: [Unknown character set: 'utf']
    CREATE TABLE wp_rg_lead_detail_long ( lead_detail_id bigint(20) unsigned not null, value longtext, PRIMARY KEY (lead_detail_id) ) DEFAULT CHARACTER SET utf-8

    WordPress database error: [Table 'lidija_wrdp1.wp_rg_lead_detail_long' doesn't exist]
    SHOW INDEX FROM wp_rg_lead_detail_long WHERE Key_name='lead_detail_key'

    WordPress database error: [Unknown character set: 'utf']
    CREATE TABLE wp_rg_lead_meta ( id bigint(20) unsigned not null auto_increment, lead_id bigint(20) unsigned not null, meta_key varchar(255), meta_value longtext, PRIMARY KEY (id), KEY meta_key (meta_key), KEY lead_id (lead_id) ) DEFAULT CHARACTER SET utf-8

    WordPress database error: [Table 'lidija_wrdp1.wp_rg_lead_detail' doesn't exist]
    select * from wp_rg_lead_detail where value= '!'

    What is wrong?

    Posted 8 years ago on Monday August 6, 2012 | Permalink
  3. Please see this explanation from lead developer Alex Cancado.

    http://www.gravityhelp.com/forums/topic/database-problems-while-activating-plugin#post-64866

    Posted 8 years ago on Tuesday August 7, 2012 | Permalink
  4. No, it didn't work.

    Posted 8 years ago on Tuesday August 7, 2012 | Permalink
  5. You may need some local help with your configuration. This is not an issue with Gravity Forms but a configuration issue on your server.

    Can you post your wp-config.php at pastie.org or pastebin.com please - be sure to edit out your database connection details if you post the config file there. Thank you.

    Posted 8 years ago on Tuesday August 7, 2012 | Permalink
  6. I have fixed all the tables in database and the database itself to have utf_general_ci collation. After uninstall and reinstall of Gravity forms, the installation went ok, with no errors, but still no luck with forms saving.
    I have tried to disable every single plugin and then tried to save forms and always the same error.

    I have commented out charset and collation in wp-config.php (as the solution I have found on some forums when you have charset problems - I need to have support for Croatian letters as the site is multilingual)

    //define('DB_CHARSET', 'utf8');
    //define('DB_COLLATE', '');

    but still nothing. :(
    This is so frustrating...

    Posted 8 years ago on Tuesday August 7, 2012 | Permalink
  7. It sounds like you have made progress? Gravity Forms is installed without error. But now you have a different problem: you cannot save forms? Is that accurate? What happens when you try to save a form? Is there an error displayed?

    Posted 8 years ago on Tuesday August 7, 2012 | Permalink
  8. Yes, I could not save any form whatsoever. BUT, I have found both the problem and the solution. For the explanation's sake, let's call the problematic site - site#1

    Since I have three more sites running on wordpress, I have installed Gravity forms on my another WP multilingual site (let's call it site#2) just to check what's going on. And there, it worked just fine: installed correctly and saved forms correctly.

    Since the initial Gravity Forms installation problem (which I have c/p in my second post) said it had problems with creating tables (CREATE TABLE wp_rg_* errors) I guessed the problem lied there.

    Then, after installing GF on site#2, I logged into the site#1 and site#2 cPanel, went to PhpMyAdmin and checked which new tables had the plugin created in my site#2 database. And they there were: wp_rg_* tables which still did not exist in my site#1 database (not even after several re-installs of the plugin). And the system threw error on creating those tables.

    So I have selected above mentioned, newly-created tables from site#2 database, exported them and imported them back into site#1 database.

    And now it works.

    How I see this:
    The problem with the Gravity Forms plugin was that it attempted to create database tables only after the first, clean install. After it failed, due to charset problems - it never tried again to create them (not even after I resolved the tables and database collation problem). Why?

    You, as the developers, just have to figure out (and let me know, if that is not a problem) - is that a bug in the plugin or it does not try to re-create tables on any but the first (clean) install due to some SQL data integrity protection?
    Why doesn't the plugin (after uninstall and on re-install) try to check if the tables exist in the database, and re-create them again if they are not there?

    I just used common sense, analyzed DB errors I copy/pasted in my second post and luckily had another WP site to compare database to. But, if the plugin just checked for the tables on re-install, and just threw any warning or DB table error note - wouldn't that help to solve many 'Error saving form' problems like this one was in the first place? Is that possible to implement in the future?

    Thank you for you answers. :)

    Posted 8 years ago on Wednesday August 8, 2012 | Permalink
  9. I've asked one of the developers for their feedback. Thank you for taking the time to post your experience.

    Posted 8 years ago on Wednesday August 8, 2012 | Permalink
  10. No problem :)
    I'm curious about their feedback so please post it here if that's not too much of a fuss :)

    Posted 8 years ago on Wednesday August 8, 2012 | Permalink
  11. Someone will update the topic here. Sorry for your frustration.

    Posted 8 years ago on Wednesday August 8, 2012 | Permalink
  12. No problem. The issue is solved anyway, I'd just like to know the possible cause.

    Posted 8 years ago on Wednesday August 8, 2012 | Permalink
  13. I'm with you. If we can improve the process and catch more errors, we'd love to. Thank you again.

    Posted 8 years ago on Wednesday August 8, 2012 | Permalink
  14. Thank you too!

    Posted 8 years ago on Wednesday August 8, 2012 | Permalink
  15. The database is updated when the plugin version changes or when you click the "Uninstall" button on the Form -> Settings page.
    So uninstalling and installing it from WordPress will not force those tables to be created. Lets hope there isn't a next time, but if it does happen again, simply go to Form -> Settings and "Uninstall" the plugin from there. If you do that, Gravity Forms will attempt to create the tables again.

    Having said that, it does make sense to try updating the database when the plugin is uninstalled/installed from WordPress. I will be looking at what it will take to make that enhancement.

    Posted 8 years ago on Wednesday August 8, 2012 | Permalink
  16. Hi Alex, and thank you for the reply.

    In couple of my numerous attempts to make the plugin work I also tried to uninstall it by Settings -> Uninstall option. If that built-in option really does work, meaning it forces the plugin to re-create the database tables afterwards, maybe I happened to use it before I solved the database collation issue so the tables didn't create because of that initial problem.
    I really cannot remember at which point have I used Uninstall option in plugin (I just know it was two or three attempts), because I have been re-installing it at least 15 times through past 2 days.

    Anyhow, I hope my feedback will help you in making this plugin even better, you have cleared some things to me now and thank you for taking time to reply.

    Posted 8 years ago on Wednesday August 8, 2012 | Permalink

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