• Resolved jperksmower

    (@jperksmower)


    Hello,

    We are seeing lots of error warnings from this plugin in our PHP runtime logs. Please see below examples:

    PHP message: Warning: foreach() argument must be of type array|object, null given in /var/www/wp-content/plugins/cf7-conditional-fields/cf7cf.php on line 543 [URL_REMOVED/wp-json/contact-form-7/v1/contact-forms/278/feedback?_locale=user] [wp-includes/class-wp-hook.php:308 {closure}(), wp-includes/plugin.php:205 WP_Hook->apply_filters(), wp-content/plugins/contact-form-7/includes/rest-api.php:359 apply_filters(‘wpcf7_feedback_response’), wp-includes/rest-api/class-wp-rest-server.php:1181 wpcf7_rest_create_feedback(), wp-includes/rest-api/class-wp-rest-server.php:1028 WP_REST_Server->respond_to_request(), wp-includes/rest-api/class-wp-rest-server.php:442 WP_REST_Server->dispatch(), wp-includes/rest-api.php:410 WP_REST_Server->serve_request(), wp-includes/class-wp-hook.php:308 rest_api_loaded(), wp-includes/class-wp-hook.php:332 WP_Hook->apply_filters(), wp-includes/plugin.php:565 WP_Hook->do_action(), wp-includes/class-wp.php:399 do_action_ref_array(), wp-includes/class-wp.php:780 WP->parse_request(), wp-includes/functions.php:1334 WP->main(), wp-blog-header.php:16 wp(), index.php:17 require(‘wp-blog-header.php’)]

    PHP message: Warning: Undefined array key “invalid_fields” in /var/www/wp-content/plugins/cf7-conditional-fields/cf7cf.php on line 543

    [URL_REMOVED/wp-json/contact-form-7/v1/contact-forms/219/feedback?_locale=user]

    [wp-includes/class-wp-hook.php:308 {closure}(), wp-includes/plugin.php:205 WP_Hook->apply_filters(), wp-content/plugins/contact-form-7/includes/rest-api.php:359 apply_filters(‘wpcf7_feedback_response’), wp-includes/rest-api/class-wp-rest-server.php:1181 wpcf7_rest_create_feedback(), wp-includes/rest-api/class-wp-rest-server.php:1028 WP_REST_Server->respond_to_request(), wp-includes/rest-api/class-wp-rest-server.php:442 WP_REST_Server->dispatch(), wp-includes/rest-api.php:410 WP_REST_Server->serve_request(), wp-includes/class-wp-hook.php:308 rest_api_loaded(), wp-includes/class-wp-hook.php:332 WP_Hook->apply_filters(), wp-includes/plugin.php:565 WP_Hook->do_action(), wp-includes/class-wp.php:399 do_action_ref_array(), wp-includes/class-wp.php:780 WP->parse_request(), wp-includes/functions.php:1334 WP->main(), wp-blog-header.php:16 wp(), index.php:17 require(‘wp-blog-header.php’)]

    We are currently using Contact Form 7 version 5.4 and Conditional Fields for Contact Form 7 version 2.3.7 on WordPress 6.2 PHP version 8. Can you please let us know what’s needed to fix the warnings?

    ~James

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Jules Colle

    (@jules-colle)

    This is hard to reproduce. Can you figure out which form triggers the error, and maybe simplify the code? It would be cool if I could get a step by step plan how to reproduce the error starting from a clean WP installation.

    Hi @jules-colle and @jperksmower ,

    I have also gotten errors in the PHP error log. Debug mod was not enabled. The error messages were as following:

    [05-May-2023 12:55:45|] PHP Warning:  Undefined array key "_wpcf7cf_hidden_group_fields" in /var/www/vhosts/example.com/httpdocs/wp-content/plugins/cf7-conditional-fields/cf7cf.php on line 260
    [05-May-2023 12:55:45|] PHP Warning:  Undefined array key "_wpcf7cf_hidden_groups" in /var/www/vhosts/example.com/httpdocs/wp-content/plugins/cf7-conditional-fields/cf7cf.php on line 269
    [05-May-2023 12:55:45|] PHP Warning:  Undefined array key "_wpcf7cf_visible_groups" in /var/www/vhosts/example.com/httpdocs/wp-content/plugins/cf7-conditional-fields/cf7cf.php on line 270
    [05-May-2023 12:55:45|] PHP Warning:  Undefined array key "_wpcf7cf_repeaters" in /var/www/vhosts/example.com/httpdocs/wp-content/plugins/cf7-conditional-fields/cf7cf.php on line 271
    [05-May-2023 12:55:45|] PHP Warning:  Undefined array key "_wpcf7cf_steps" in /var/www/vhosts/example.com/httpdocs/wp-content/plugins/cf7-conditional-fields/cf7cf.php on line 272
    [05-May-2023 15:26:31|] PHP Warning:  Undefined array key "_wpcf7cf_hidden_group_fields" in /var/www/vhosts/example.com/httpdocs/wp-content/plugins/cf7-conditional-fields/cf7cf.php on line 260
    [05-May-2023 15:26:31|] PHP Warning:  Undefined array key "_wpcf7cf_hidden_groups" in /var/www/vhosts/example.com/httpdocs/wp-content/plugins/cf7-conditional-fields/cf7cf.php on line 269
    [05-May-2023 15:26:31|] PHP Warning:  Undefined array key "_wpcf7cf_visible_groups" in /var/www/vhosts/example.com/httpdocs/wp-content/plugins/cf7-conditional-fields/cf7cf.php on line 270
    [05-May-2023 15:26:31|] PHP Warning:  Undefined array key "_wpcf7cf_repeaters" in /var/www/vhosts/example.com/httpdocs/wp-content/plugins/cf7-conditional-fields/cf7cf.php on line 271
    [05-May-2023 15:26:31|] PHP Warning:  Undefined array key "_wpcf7cf_steps" in /var/www/vhosts/example.com/httpdocs/wp-content/plugins/cf7-conditional-fields/cf7cf.php on line 272
    [05-May-2023 20:20:11|] PHP Warning:  Undefined array key "_wpcf7cf_hidden_group_fields" in /var/www/vhosts/example.com/httpdocs/wp-content/plugins/cf7-conditional-fields/cf7cf.php on line 260
    [05-May-2023 20:20:11|] PHP Warning:  Undefined array key "_wpcf7cf_hidden_groups" in /var/www/vhosts/example.com/httpdocs/wp-content/plugins/cf7-conditional-fields/cf7cf.php on line 269
    [05-May-2023 20:20:11|] PHP Warning:  Undefined array key "_wpcf7cf_visible_groups" in /var/www/vhosts/example.com/httpdocs/wp-content/plugins/cf7-conditional-fields/cf7cf.php on line 270
    [05-May-2023 20:20:11|] PHP Warning:  Undefined array key "_wpcf7cf_repeaters" in /var/www/vhosts/example.com/httpdocs/wp-content/plugins/cf7-conditional-fields/cf7cf.php on line 271
    [05-May-2023 20:20:11|] PHP Warning:  Undefined array key "_wpcf7cf_steps" in /var/www/vhosts/example.com/httpdocs/wp-content/plugins/cf7-conditional-fields/cf7cf.php on line 272
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Errors in PHP logs’ is closed to new replies.