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.

Edited the database and now my form has gone

  1. Hi there

    I have a multi-page form (using conditional logic based on 26 pages) and I wanted to update some text that appeared in many places on the form. I updated this using MySQL in two tables, but now the form is empty in admin and on the front end it displays "Oops! We could not locate your form.".

    The two tables I edited were "wp_rg_form_meta" and "wp_rg_lead_detail".

    Any ideas as to how I can get the form working again - all the information is still in the database.

    Thanks

    Posted 13 years ago on Wednesday July 4, 2012 | Permalink
  2. David Peralty

    You might have accidentally corrupted the table. Do you have a backup you can restore from?
    Also, can you try the Meta restoration plugin on our downloads page:
    http://www.gravityhelp.com/downloads/

    Posted 13 years ago on Wednesday July 4, 2012 | Permalink
  3. Thanks - I just tried the tool and received this message:

    "This form's meta could not be recovered."

    I reversed the find and replace on the database but nothing helped.

    Is there anything else I can try - I have spent days on this so I can't afford to lose it.

    Thanks

    Posted 13 years ago on Wednesday July 4, 2012 | Permalink
  4. David Peralty

    How did you do the find/replace? I don't know of anything off the top of my head. Can you restore an older database backup?

    Posted 13 years ago on Wednesday July 4, 2012 | Permalink
  5. I used this:

    UPDATE wp_rg_lead_detail SET value = replace(value, 'oldtext','newtext');

    There is no backup from the last few days since I completed the form.

    Posted 13 years ago on Thursday July 5, 2012 | Permalink
  6. I am also receiving this error when click on "Entries" also if that helps:

    Warning: Invalid argument supplied for foreach() in /home/site_url/wp-content/plugins/gravityforms/forms_model.php on line 2608

    Posted 13 years ago on Thursday July 5, 2012 | Permalink
  7. This statement right here is where the problem started:

    UPDATE wp_rg_lead_detail SET value = replace(value, 'oldtext','newtext');

    If oldtext has a different number of characters than new text (e.g. you changed from Baseball to Tennis, 8 characters to 6) you have likely caused an error with the serialized data. There are ways to fix those serialized values.

    I would suggest taking a database backup right now, before you go any further. Then, find and replace newtext with oldtext to put things back the way they were. Then test. If it works, then you need to go about properly doing a find and replace while updating the serialized values as well.

    Please make a database backup before attempting any of this.

    Posted 13 years ago on Thursday July 5, 2012 | Permalink
  8. Ignore the Warning for now. It's unrelated, and just a warning, nothing more.

    Posted 13 years ago on Thursday July 5, 2012 | Permalink