CalderaWP / Caldera-Forms

Drag and drop, responsive WordPress form builder.
https://CalderaForms.com
GNU General Public License v2.0
187 stars 166 forks source link

Form entries resend: HTTP 500 / PHP error #1941

Open strarsis opened 6 years ago

strarsis commented 6 years ago

What Version Of Caldera Forms, WordPress and PHP Are You Using?

WordPress Version: 4.8.1PHP Version: 7.1.8-2+ubuntu16.04.1+deb.sury.org+4MySQL Version: 5.5.5Caldera Forms Version: 1.5.5WP_DEBUG:

Does Your Issue Persist When You Disable All Other Plugins and Switch To The Default Theme?

What Is The Unexpected Behaviour?

I selected "Resend" in Caldera Forms Entries page and get a HTTP 500 (on production, hence just a blank browser page).

What PHP Errors Have You Logged While Reproducing This Bug?

2017/09/10 11:41:58 [error] 58668#58668: *97010 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught TypeError: Argument 2 passed to Caldera_Forms_Field_Util::has_field_type() must be of the type array, null given, called in /srv/www/example.com/releases/20170908233837/web/app/plugins/caldera-forms/classes/magic.php on line 46 and defined in /srv/www/example.com/releases/20170908233837/web/app/plugins/caldera-forms/classes/field/util.php:361
Stack trace:
#0 /srv/www/example.com/releases/20170908233837/web/app/plugins/caldera-forms/classes/magic.php(46): Caldera_Forms_Field_Util::has_field_type('credit_card_exp', NULL)
#1 /srv/www/example.com/releases/20170908233837/web/wp/wp-includes/class-wp-hook.php(298): Caldera_Forms_Magic->field_magic(NULL, 'Reply-To: %emai...', Array, NULL, NULL)
#2 /srv/www/example.com/releases/20170908233837/web/wp/wp-includes/plugin.php(203): WP_Hook->apply_filters(NULL, Array)
#3 /srv/www/exampl" while reading response header from upstream, client: 80.187.122.34, server: www.example.com, request: "GET /wp/wp-admin/?_cf_resend=05067aab05&e=7&f=CF58d04c3e0a715 HTTP/2.0", upstream: "fastcgi://unix:/var/run/php-fpm-wordpress.sock:", host: "www.example.com", referrer: "https://www.example.com/wp/wp-admin/admin.php?page=caldera-forms"
2017/09/10 11:42:00 [error] 58668#58668: *97010 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught TypeError: Argument 2 passed to Caldera_Forms_Field_Util::has_field_type() must be of the type array, null given, called in /srv/www/example.com/releases/20170908233837/web/app/plugins/caldera-forms/classes/magic.php on line 46 and defined in /srv/www/example.com/releases/20170908233837/web/app/plugins/caldera-forms/classes/field/util.php:361
Stack trace:
#0 /srv/www/example.com/releases/20170908233837/web/app/plugins/caldera-forms/classes/magic.php(46): Caldera_Forms_Field_Util::has_field_type('credit_card_exp', NULL)
#1 /srv/www/example.com/releases/20170908233837/web/wp/wp-includes/class-wp-hook.php(298): Caldera_Forms_Magic->field_magic(NULL, 'Reply-To: %emai...', Array, NULL, NULL)
#2 /srv/www/example.com/releases/20170908233837/web/wp/wp-includes/plugin.php(203): WP_Hook->apply_filters(NULL, Array)
#3 /srv/www/exampl" while reading response header from upstream, client: 80.187.122.34, server: www.example.com, request: "GET /wp/wp-admin/?_cf_resend=05067aab05&e=7&f=CF58d04c3e0a715 HTTP/2.0", upstream: "fastcgi://unix:/var/run/php-fpm-wordpress.sock:", host: "www.example.com"
2017/09/10 11:43:22 [error] 58668#58668: *97010 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 4718592 bytes) in /srv/www/example.com/releases/20170908233837/web/wp/wp-includes/functions.php on line 435" while reading upstream, client: 80.187.122.34, server: www.example.com, request: "GET / HTTP/2.0", upstream: "fastcgi://unix:/var/run/php-fpm-wordpress.sock:", host: "www.example.com", referrer: "https://www.example.com/wp/wp-admin/admin.php?page=caldera-forms"

What JavaScript Errors Have You Seen While Reproducing This Bug?

No JavaScript errors.

qubez commented 6 years ago

Can confirm this problem, pressing resend gives the URL with several parameters, but just a blank page.

Similar PHP errors logged to /wp-admin directory error_log:

[14-Sep-2017 16:59:01 UTC] PHP Catchable fatal error: Argument 2 passed to Caldera_Forms_Field_Util::has_field_type() must be of the type array, null given, called in /x/xx/public_html/xxx/wp-content/plugins/caldera-forms/classes/magic.php on line 46 and defined in /x/xx/public_html/xxx/wp-content/plugins/caldera-forms/classes/field/util.php on line 361

strarsis commented 4 years ago

So with the latest Caldera Forms plugin release, copying + pasting the resend URL of button works. But clicking the button doesn't cause any actions (also no background network connections/ajax), so the JavaScript portion of the button is broken, but the server-side resend code seems to work now.