WPIntell

Source evidence

500 Error when using Ninja Forms

Ajaxify Comments – Ajax and Lazy Loading Comments · support · 2023-10-20T13:18:00+00:00

mixedsentiment
highseverity
0.95relevance
7replies
Evidence linked to opportunitycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

6 / 30 rows with source links

20.0% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

24 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

support
carterlando resolved
Hi. I just tried to update your plugin from v1.9 to the latest version but I’m having a compatibility issue. I tested this with a fresh WordPress install and I narrowed it down to Ninja Forms. If this plugin is enabled, then saving any Ajaxify Comments options in the backend fails with ‘Request failed with status code 500’ Can you please look into this and fix it if possible? Thanks! @carterlando , For the 500 error, can you please check your error logs and let me know which PHP error you are receiving? I’ve tried the Ninja Forms free version and there doesn’t appear to be a conflict. Thanks for the quick reply, Ronald. I’m on the latest version of WP, PHP 8.2.8 This is the error: [20-Oct-2023 14:38:30 UTC] PHP Fatal error: Uncaught TypeError: json_decode(): Argument #1 ($json) must be of type string, array given in C:\Users\Cata\Local Sites\wordpress-default\app\public\wp-content\plugins\ninja-forms\includes\AJAX\Controllers\Submission.php:21 Stack trace: #0 C:\Users\Cata\Local Sites\wordpress-default\app\public\wp-content\plugins\ninja-forms\includes\AJAX\Controllers\Submission.php(21): json_decode(Array, true) #1 C:\Users\Cata\Local Sites\wordpress-default\app\public\wp-content\plugins\ninja-forms\ninja-forms.php(294): NF_AJAX_Controllers_Submission->__construct() #2 C:\Users\Cata\Local Sites\wordpress-default\app\public\wp-content\plugins\ninja-forms\ninja-forms.php(1152): Ninja_Forms::instance() #3 C:\Users\Cata\Local Sites\wordpress-default\app\public\wp-content\plugins\ninja-forms\ninja-forms.php(1155): Ninja_Forms() #4 C:\Users\Cata\Local Sites\wordpress-default\app\public\wp-settings.php(462): include_once('C:\\Users\\Cata\\L...') #5 C:\Users\Cata\Local Sites\wordpress-default\app\public\wp-config.php(110): require_once('C:\\Users\\Cata\\L...') #6 C:\Users\Cata\Local Sites\wordpress-default\app\public\wp-load.php(50): require_once('C:\\Users\\Cata\\L...') #7 C:\Users\Cata\Local Sites\wordpress-default\app\public\wp-admin\admin-ajax.php(22): require_once('C:\\Users\\Cata\\L...') #8 {main} thrown in C:\Users\Cata\Local Sites\wordpress-default\app\public\wp-content\plugins\ninja-forms\includes\AJAX\Controllers\Submission.php on line 21 @carterlando I’ve just released 2.0.14, which should resolve the fatal error. This error was caused because Ajaxify and Ninja Forms both used the same formData post variable. Since Ninja Forms isn’t expecting the form data it receives, it errors out. I’ve renamed formData to ajaxifyFormData in order to prevent further conflicts. If you have a moment, please consider leaving a rating/review. Thanks, Ronald Thanks Ronald, That’s impressive response time 🙂 I will check it out and get back to you. @ronalfy I confirm that the above issue is fixed. However, I have another one. This was working fine before the update to the v2 version. It’s about the OnAfterPostComment Callback My input: https://prnt.sc/82sSMITzJrwD The error: https://prnt.sc/fz80kEbddx4T This reply was modified 2 years, 7 months ago by carterlando . @carterlando , I have fixed this in 2.0.15. I apologize about the error. It’s all good now. Fixed and working. Thanks!

Comments

7 shown
Ronald Huereca 2023-10-20T14:01:00+00:00

@carterlando , For the 500 error, can you please check your error logs and let me know which PHP error you are receiving? I’ve tried the Ninja Forms free version and there doesn’t appear to be a conflict.

carterlando 2023-10-20T14:41:00+00:00

Thanks for the quick reply, Ronald. I’m on the latest version of WP, PHP 8.2.8 This is the error: [20-Oct-2023 14:38:30 UTC] PHP Fatal error: Uncaught TypeError: json_decode(): Argument #1 ($json) must be of type string, array given in C:\Users\Cata\Local Sites\wordpress-default\app\public\wp-content\plugins\ninja-forms\includes\AJAX\Controllers\Submission.php:21 Stack trace: #0 C:\Users\Cata\Local Sites\wordpress-default\app\public\wp-content\plugins\ninja-forms\includes\AJAX\Controllers\Submission.php(21): json_decode(Array, true) #1 C:\Users\Cata\Local Sites\wordpress-default\app\public\wp-content\plugins\ninja-forms\ninja-forms.php(294): NF_AJAX_Controllers_Submission->__construct() #2 C:\Users\Cata\Local Sites\wordpress-default\app\public\wp-content\plugins\ninja-forms\ninja-forms.php(1152): Ninja_Forms::instance() #3 C:\Users\Cata\Local Sites\wordpress-default\app\public\wp-content\plugins\ninja-forms\ninja-forms.php(1155): Ninja_Forms() #4 C:\Users\Cata\Local Sites\wordpress-default\app\public\wp-settings.php(462): include_once('C:\\Users\\Cata\\L...') #5 C:\Users\Cata\Local Sites\wordpress-default\app\public\wp-config.php(110): require_once('C:\\Users\\Cata\\L...') #6 C:\Users\Cata\Local Sites\wordpress-default\app\public\wp-load.php(50): require_once('C:\\Users\\Cata\\L...') #7 C:\Users\Cata\Local Sites\wordpress-default\app\public\wp-admin\admin-ajax.php(22): require_once('C:\\Users\\Cata\\L...') #8 {main} thrown in C:\Users\Cata\Local Sites\wordpress-default\app\public\wp-content\plugins\ninja-forms\includes\AJAX\Controllers\Submission.php on line 21

Ronald Huereca 2023-10-20T15:39:00+00:00

@carterlando I’ve just released 2.0.14, which should resolve the fatal error. This error was caused because Ajaxify and Ninja Forms both used the same formData post variable. Since Ninja Forms isn’t expecting the form data it receives, it errors out. I’ve renamed formData to ajaxifyFormData in order to prevent further conflicts. If you have a moment, please consider leaving a rating/review. Thanks, Ronald

carterlando 2023-10-23T13:49:00+00:00

Thanks Ronald, That’s impressive response time 🙂 I will check it out and get back to you.

carterlando 2023-10-24T08:35:00+00:00

@ronalfy I confirm that the above issue is fixed. However, I have another one. This was working fine before the update to the v2 version. It’s about the OnAfterPostComment Callback My input: https://prnt.sc/82sSMITzJrwD The error: https://prnt.sc/fz80kEbddx4T This reply was modified 2 years, 7 months ago by carterlando .

Ronald Huereca 2023-10-24T13:31:00+00:00

@carterlando , I have fixed this in 2.0.15. I apologize about the error.

carterlando 2023-10-31T09:19:00+00:00

It’s all good now. Fixed and working. Thanks!