Ok, figured out what our problem was: we had WP_DEBUG enabled.
Why was this a problem? Well, with WP_DEBUG enabled, PHP notices were being output. These outputs screwed up some of the GF JavaScript.
So for example:
This line in gravityforms/JS.php:
field.inputs = [new Input(field.id + 0.2, '<?php echo apply_filters("gform_name_prefix_{$_GET["id"]}", apply_filters("gform_name_prefix", __("Prefix", "gravityforms"))); ?>'), new Input(field.id + 0.3, '<?php echo apply_filters("gform_name_first_{$_GET["id"]}",apply_filters("gform_name_first",__("First", "gravityforms"))); ?>'), new Input(field.id + 0.6, '<?php echo apply_filters("gform_name_last_{$_GET["id"]}", apply_filters("gform_name_last",__("Last", "gravityforms"))); ?>'), new Input(field.id + 0.8, '<?php echo apply_filters("gform_name_suffix_{$_GET["id"]}", apply_filters("gform_name_suffix",__("Suffix", "gravityforms"))); ?>')];
Became this, since a notice was thrown:
field.inputs = [new Input(field.id + 0.2, '
<b>Notice</b>: Undefined index: id in <b>/websites/stage.payperclickuniverse.com/public_html/wp-content/plugins/gravityforms/js.php</b> on line <b>699</b>
Prefix'), new Input(field.id + 0.3, '
<b>Notice</b>: Undefined index: id in <b>/websites/stage.payperclickuniverse.com/public_html/wp-content/plugins/gravityforms/js.php</b> on line <b>699</b>
First'), new Input(field.id + 0.6, '
<b>Notice</b>: Undefined index: id in <b>/websites/stage.payperclickuniverse.com/public_html/wp-content/plugins/gravityforms/js.php</b> on line <b>699</b>
Last'), new Input(field.id + 0.8, '
<b>Notice</b>: Undefined index: id in <b>/websites/stage.payperclickuniverse.com/public_html/wp-content/plugins/gravityforms/js.php</b> on line <b>699</b>
Suffix')];
Moral of the story? Turn off WP_DEBUG or convince the GF devs to do a little more checking/validation of data returned by apply_filters.
Hope this helps!
Posted 13 years ago on Wednesday March 9, 2011 |
Permalink