• Mark

    (@hawsons)


    We have recently added some ninja forms to our website, and most seem to be working fine.

    However, some of our clients are having trouble registering on one of the forms, with the form being stuck on processing.

    When they go to ‘submit’ the form the form gets stuck on ‘processing’ and does not submit the form or redirect to the thank you page – any idea why this is happening and how we can fix it?

    We are using Divi theme if that makes a difference.

    Thanks

Viewing 1 replies (of 1 total)
  • I had the same problem and was able to fix it by updating one of the Divi files.

    I noticed in Firefox we were getting these errors “preg_replace_callback(): Requires argument 2, ‘_et_pb_sanitize_code_module_content_regex’, to be a valid callback in wp-content/themes/Divi/includes/builder/core.php Line 703”

    After looking at preg_replace_callback() examples it looked like it was looking for a function and not a string. I found the line that it was complaining about and then searched for a function by that name in wp-content/themes/Divi/includes/builder/functions.php.

    I then replaced the string with the function and it started working correctly.

    Original code:
    $content = preg_replace_callback(‘/\[et_pb_code .*\](.*)\[\/et_pb_code\]/mis’, ‘_et_pb_sanitize_code_module_content_regex’, $content );

    $content = preg_replace_callback(‘/\[et_pb_fullwidth_code .*\](.*)\[\/et_pb_fullwidth_code\]/mis’, ‘_et_pb_sanitize_code_module_content_regex’, $content );

    Updated code:
    $content = preg_replace_callback(‘/\[et_pb_code .*\](.*)\[\/et_pb_code\]/mis’, function ( $matches ) {$sanitized_content = wp_kses_post( htmlspecialchars_decode( $matches[1] ) ); $sanitized_shortcode = str_replace( $matches[1], $sanitized_content, $matches[0] ); return $sanitized_shortcode;}, $content );

    $content = preg_replace_callback(‘/\[et_pb_fullwidth_code .*\](.*)\[\/et_pb_fullwidth_code\]/mis’, function ( $matches ) {$sanitized_content = wp_kses_post( htmlspecialchars_decode( $matches[1] ) ); $sanitized_shortcode = str_replace( $matches[1], $sanitized_content, $matches[0] ); return $sanitized_shortcode;}, $content );

Viewing 1 replies (of 1 total)

The topic ‘Ninja forms stuck on processing’ is closed to new replies.