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.

Fatal Error after upgarding to latest version of Gravity Forms

  1. Hey all, I just got this error when updating to the latest Gravity Forms. My site is completely down! I don't know what's on line 107 because I cant get to it just now. I am going to go ahead and have hostgator restore from my latest backup. Can you help me figure out what to do so I can upgrade? I think the solution may be in some of my posts and what you have helped me change recently (last 2 months)?

    Fatal error: Call to undefined function gravity_form_enqueue_scripts() in /home/badelman/public_html/paulreverehomes.com/wp-content/themes/Essence-Silver/functions.php on line 107

    Posted 13 years ago on Thursday July 7, 2011 | Permalink
  2. Hello guys. Need some help please.

    Posted 13 years ago on Thursday July 7, 2011 | Permalink
  3. gravity_form_enqueue_scripts is a valid function call in the latest version of Gravity Forms. So it sounds like your WordPress didn't run the update properly. If Gravity Forms was installed properly you wouldn't be getting that error.

    You will need to download Gravity Forms from the Plugin Downloads page on this site and update manually.

    - Download the latest version of Gravity Forms from this site as a zipfile
    - FTP into your site
    - Browse to the wp-content/plugins folder
    - Delete the gravityforms folder
    - Login to your WordPress Dashboard
    - Go to Add New Plugins
    - Upload and install the Gravity Forms zipfile

    Posted 13 years ago on Thursday July 7, 2011 | Permalink
  4. I got to the step where I log in to the dashboard and I get the same error and am NOT able to login to re-install Gravity Forms. Please help!

    My webpage is located at: http://paulreverehomes.com/

    Error: Fatal error: Call to undefined function gravity_form_enqueue_scripts() in /home/badelman/public_html/paulreverehomes.com/wp-content/themes/Essence-Silver/functions.php on line 107

    Posted 13 years ago on Thursday July 7, 2011 | Permalink
  5. The problem is your theme has custom code in place to call the gravity_form_enqueue_scripts function call in it's functions.php file. So it's trying to execute that function call, which doesn't exist because Gravity Forms is not activated. You have to edit your themes functions.php file and remove that custom code (copy it so you can re-apply it later) and then save it.

    You can't call a function that doesn't exist, so because your theme is calling a function call that doesn't exist because Gravity Forms isn't activated you are running into this issue. The other option is to wrap your function call to check if that function call exists before executing it, then this error wouldn't occur if the function doesn't exist.

    I'm not sure why your themes functions.php file has this function call in it, you would have had to have added it as a customization of some sort.

    Posted 13 years ago on Thursday July 7, 2011 | Permalink
  6. Ok I contacted hostgator and had them comment out the error line and got in to the dashboard. I then undid the comment and now get the following error when attempting to get to the website:

    Warning: Missing argument 1 for gravity_form_enqueue_scripts(), called in /home/badelman/public_html/paulreverehomes.com/wp-content/themes/Essence-Silver_childtheme/functions.php on line 3 and defined in /home/badelman/public_html/paulreverehomes.com/wp-content/plugins/gravityforms/gravityforms.php on line 1187
    I also get this error at the dashboard:
    Warning: Missing argument 1 for gravity_form_enqueue_scripts(), called in /home/badelman/public_html/paulreverehomes.com/wp-content/themes/Essence-Silver_childtheme/functions.php on line 3 and defined in /home/badelman/public_html/paulreverehomes.com/wp-content/plugins/gravityforms/gravityforms.php on line 1187

    Warning: Cannot modify header information - headers already sent by (output started at /home/badelman/public_html/paulreverehomes.com/wp-content/plugins/gravityforms/gravityforms.php:1187) in /home/badelman/public_html/paulreverehomes.com/wp-includes/functions.php on line 861

    Warning: Cannot modify header information - headers already sent by (output started at /home/badelman/public_html/paulreverehomes.com/wp-content/plugins/gravityforms/gravityforms.php:1187) in /home/badelman/public_html/paulreverehomes.com/wp-includes/functions.php on line 862

    In addition my form is all screwed up so for now I will have hostgator re-install my site from a backup. I will try this again but I dont want customers to see this.

    Posted 13 years ago on Thursday July 7, 2011 | Permalink
  7. I just got your latest reply. You guys helped me with the customization beforehand. You can see everything in my posts. After I have hostgator restore my site and BEFORE I attempt an upgrade again.. anything else I need to do as a result of the customization(s)??

    Thanks,
    Barry

    Posted 13 years ago on Thursday July 7, 2011 | Permalink
  8. Remove any customizations that reference gravity forms or gform in yours themes functions.php, but back them up because you will need to re-apply them.

    Then perform the upgrades. If you run into the issue again, send us your WordPress admin login information and an FTP login via our Contact Us form and we can take a look.

    Posted 13 years ago on Thursday July 7, 2011 | Permalink
  9. Will do thanks!

    Posted 13 years ago on Thursday July 7, 2011 | Permalink
  10. Ok, after updgrade website looks fine except for a new line across the top of the page and I also have these looming errors in the editor in the WP Dashboard. I will do as you request and send you login info for the site as well as ftp info. Please help soon as my customers are seeing all this!

    Here they are:
    Warning: Cannot modify header information - headers already sent by (output started at /home/badelman/public_html/paulreverehomes.com/wp-content/themes/Essence-Silver/functions.php:109) in /home/badelman/public_html/paulreverehomes.com/wp-includes/functions.php on line 861

    Warning: Cannot modify header information - headers already sent by (output started at /home/badelman/public_html/paulreverehomes.com/wp-content/themes/Essence-Silver/functions.php:109) in /home/badelman/public_html/paulreverehomes.com/wp-includes/functions.php on line 862

    Posted 13 years ago on Thursday July 7, 2011 | Permalink
  11. These errors aren't coming from Gravity Forms, they are coming from your theme. Specifically the functions.php file of your theme. It looks like you have extra whitespace somewhere. Open your functions.php file and make sure there are no empty lines/spaces at the top or bottom of the functions.php file. But these are not Gravity Forms related errors.

    Posted 13 years ago on Thursday July 7, 2011 | Permalink
  12. Thanks Carl. I figured out the problem. Now initially I was getting fatal errors that had nothing to do with the theme. It was the gravity form update. Everything was fine before that so what am I to think? After the initial trouble and site restore and now attempting to back up code, I used notepad which I'm now assuming is not a good idea as it adds space between lines and all sorts of crud! This only exacerbated the problem.. I was actually in the middle of getting my original function.php file from the original Essence install copied over when you got in to see the last bit of incorrect code. Regardless.. I have upgraded Gravity Forms and all is well. I also learned some things too. If I could only figure out a way to learn without upsetting the site that serves my customers then I would be supremely happy. Thanks for your help Carl,

    Barry

    Posted 13 years ago on Friday July 8, 2011 | Permalink
  13. Hello, I just followed your instructions for upddating to the latest version of Gravity forms and after deleting the gravity forms folder via ftp, I cannot log into Wordpress and my site is down. This is the second time I've attempted to do an update with Gravity forms and it's crashed my site!

    Here is the error: Fatal error: Call to undefined function gravity_form_enqueue_scripts() in /home/badelman/public_html/paulreverehomes.com/wp-content/themes/Essence-Silver/functions.php on line 108

    LOOK FAMILIAR??

    Without pointing fingers I just need my site to be up BUT I do not want to go through this again. So to your previous note: I have login credentials for you at http://paulreverehomes.com

    Tell me what to do to give you access without posting the credentials here for all to see?

    Please help ASAP as my website is down after following your directions to update!

    Posted 12 years ago on Friday October 28, 2011 | Permalink
  14. please email chris@rocketgenius.com and I will take a look. I will also need an FTP or SSH log in to be able to replace form plugin.

    The fatal error is coming from a function you added to your theme's functions.php, and the function is still valid in the latest release of Gravity Forms. It's possible not all the plugin files were replaced. Happy to take a look for you.

    Posted 12 years ago on Friday October 28, 2011 | Permalink
  15. Thanks Chris. I will email all credentials right away!

    Posted 12 years ago on Friday October 28, 2011 | Permalink
  16. Done. Please let me know if you need anything!

    Posted 12 years ago on Friday October 28, 2011 | Permalink
  17. How's it coming? Please let me know if I need to have the hosting company recover my site with a a backup. I would rather work with you to see what's wrong first so we can keep from doing this again but if the site is down much longer I will miss customer opportunities.

    P.S. Thank you for the quick reply earlier.

    Thanks,

    Barry

    Posted 12 years ago on Friday October 28, 2011 | Permalink
  18. I uploaded the plugin folder which included the 1.6rc5.2 version and the website is working again. I didn't do anything else. I did not log in to the wp-admin.

    There was no plugin folder there. It looks like it was deleted but never reinstalled. I uploaded the plugin folder via FTP and the site is operational. Please continue testing.

    Posted 12 years ago on Friday October 28, 2011 | Permalink
  19. I got you message on the road.. Thank you! Hhmmmm.. probably my fault. However I followed the steps above and when I got to step 5, I could not log into Wordpress and got the error. Please confirm that the steps below are correct (per above from Carl -for future Gravity Form upgrades):

    - Download the latest version of Gravity Forms from this site as a zipfile
    - FTP into your site
    - Browse to the wp-content/plugins folder
    - Delete the gravityforms folder
    - Login to your WordPress Dashboard
    - Go to Add New Plugins
    - Upload and install the Gravity Forms zipfile

    Posted 12 years ago on Friday October 28, 2011 | Permalink
  20. The problem with these 3 steps:

    - Login to your WordPress Dashboard
    - Go to Add New Plugins
    - Upload and install the Gravity Forms zipfile

    Is that if you are relying on any Gravity Forms functions in your theme's functions.php, you will be locked out, because the function will not be available after you delete the gravityforms folder. So, my description of how I do it is what works for me, here:
    http://www.gravityhelp.com/forums/topic/installing-16-rc5#post-39050

    To allow Carl's method, you could change all the functions in functions.php, to say "if the function exists, use the function" and that way when Gravity Forms is missing, there won't be any fatal errors. I might do that in future code examples to prevent errors such as this.

    Glad it's working for you now.

    Posted 12 years ago on Saturday October 29, 2011 | Permalink