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.

Bugs in Gravity Forms 1.5 when WP_DEBUG is enabled.

  1. ptahdunbar
    Member

    There seems to be a few bugs that break the plugin when WP_DEBUG is enabled. The critical ones all seem javascript related.

    Most notably, you can't create a new form as gravityforms/js.php script expects to get an id param from $_GET which doesn't apply to new forms (form isnt created yet). I did some quick debugging and added a conditional to make $_GET['id'] be zero, however I still wasn't able to add form elements to the form.

    Also,

    • On the Import/Export page (?page=gf_export), the export doesn't display anything after "Select A Form". I get a Uncaught SyntaxError: Unexpected token < from tw-sack.js:1.
    • On the form editor page (?page=gf_edit_forms&id=1), several undefined index values (emailConfirmEnabled, enableChoiceValue, max_chars, etc.) in gravityforms/common.php
    • Editing a form's notifications settings (?page=gf_edit_forms&view=notification&id=1) pretty much all the fields have an undefined index notice (problems in gravityforms/notification.php).

    Switching WP_DEBUG off makes all these bugs an non-issue, but that shouldn't be the case.

    Let me know if you need more specifics about the errors.

    Posted 13 years ago on Sunday April 3, 2011 | Permalink
  2. Thanks for the feedback.
    We are looking at these Notice messages and will most likely have them cleaned up on our next release.

    Posted 13 years ago on Monday April 4, 2011 | Permalink
  3. Yup - switched off debug to get rid of this error after importing a form into my local dev site:

    Notice: Undefined index: scheduleForm in /Users/myName/Sites/mysite.dev/public_html/wp-content/plugins/gravityforms/form_display.php on line 291

    Posted 13 years ago on Thursday April 28, 2011 | Permalink
  4. Thanks!
    I will take a look at it and get it resolved for the next release.

    Posted 13 years ago on Thursday April 28, 2011 | Permalink
  5. This is a HUGE problem in my opinion. I purchased Gravity Forms a few weeks ago and threw a couple contact forms up on one of my non-profit sites I volunteer to manage - dead simple, no problems, 110% satisfied.

    However, on my current and much larger business project, I had put a few quick forms in a while back and moved on, only to have both the front- and back-end of gravity forms completely blow up today with numerous "xml not found" and "undefined index" errors and more, and the plugin was ultimately unusable. Like a good WP developer does, I spend much or most of my dev time with WP_DEBUG enabled - though admittedly I didn't have it turned on when I threw my initial theme together and installed my basic plugins, including Gravity Forms. And while having it turned on may have alerted me to the issues sooner, and maybe I could've searched forums better for the correct solution earlier, it's also extremely likely I would've *instantly* lost confidence in the product for true business applications and might've asked for a refund on the spot.

    Long story not short at all, after upgrading to WP 3.1.3 and walking through my site and forms just to be sure things were as they should be, gravity forms degraded to unusable at every step with the exceptions it was throwing on form display, submit, and admin pages. I ended up spending several hours trying to figure out what happened, rolling back to previous SVN revisions and the database snapshots I had taken before I upgraded, and finally figuring out on my own that the debug mode was the issue even after already having come to the forums to search for clues with no luck. (I've added a few tags that may help somebody else.)

    I've now lost ALL of the time Gravity Forms had initially saved me over the few instances in which I had used it, and am far from happy about it. I've also lost a little faith in the product itself, though that's obviously less measurable.

    Please fix this asap, no other feature or bug-fix is more critical to me personally, and potentially other developers, as well. And please keep your own WP_DEBUG turned on while dev'ing on this otherwise *really* wonderful piece of software. I can't help but assume that if you guys had been using WP_DEBUG before shipping this product, you would've caught this before it got to your customers, including myself. Ultimately, if I don't save time I won't want to use it and will want my money back.

    I would appreciate a quick reply to this, and some detailed information about when this will be corrected in full, and what priority this issue is to rocketgenius. Again, Gravity Forms is a very impressive plugin, and well worth the full developer price *when it saves me time*. The first impression was so amazingly solid, but now I feel kinda silly for tweeting/fb'ing both my initial satisfaction, as well as where I publicly pondered whether the WP 3.1.3 upgrade blew your plugin up. If you give me good information, more than just "I'll take a look at it", I'll be sure to follow up on those posts with your response.

    Thanks for making it to the end of this ... a customer who cared less may not give you feedback at all. Just keep up the good work, and give this issue a bump up in your issue tracker.

    Posted 12 years ago on Friday May 27, 2011 | Permalink
  6. We do develop with WP_DEBUG turned on, however new versions of WordPress can introduce new debug warnings. We are working on fixing any debug messages as we encounter them.

    When a new version of WordPress is released, sometimes this causes new debug messages to occur until we release an update to resolve them. That is what happened in this situation. There are new messages in 3.1.3 as well as the WordPress 3.2 beta that we are working on resolving.

    On another note, you really shouldn't be running a production site in DEBUG mode. It's not recommended. New versions of WordPress itself could cause debug errors which could cause problems with your site. New versions could cause issues with plugins and themes, also causing debug messages.

    WP_DEBUG should only be used on development sites and for short/quick usage when debugging something on a production site. You shouldn't leave debug mode turned on in production.

    Posted 12 years ago on Friday May 27, 2011 | Permalink
  7. Thanks Carl, I appreciate your response, and I'll remember that about new versions of WP being a cause of new debug warnings when I'm upgrading (though it seems odd that "undefined index" would fit into that category, and is likely just missing a few isset() checks). I was indeed in my dev environment, and never run WP_DEBUG in production for the same reason you specified, so thankfully I did not have these issues in production. I would certainly be 100% responsible for downtime on prod if I had been doing that ;)

    Posted 12 years ago on Friday May 27, 2011 | Permalink