• When I try to save the article, the page displays the following fatal error. ACF Pro and all plugins, as well as WordPress, are up to date. I haven’t encountered this issue before, so it seems to have occurred after updating one of the plugins.

    Fatal error</b>:  Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, bool given in /xxx/wp-includes/formatting.php:3466
    Stack trace:
    #0 /xxx/wp-includes/class-wp-hook.php(308): convert_smilies()
    #1 /xxx/wp-includes/plugin.php(205): WP_Hook-&gt;apply_filters()
    #2 /xxx/wp-content/plugins/advanced-custom-fields-pro/includes/fields/class-acf-field-wysiwyg.php(429): apply_filters()
    #3 /xxx/wp-includes/class-wp-hook.php(308): acf_field_wysiwyg-&gt;format_value()
    #4 /xxx/wp-includes/plugin.php(256): WP_Hook-&gt;apply_filters()
    #5 /xxx/wp-content/plugins/advanced-custom-fields-pro/includes/acf-hook-functions.php(109): apply_filters_ref_array()
    #6 /xxx/wp-includes/class-wp-hook.php(308): _acf_apply_hook_variations()
    #7 /xxx/wp-includes/plugin.php(205): WP_Hook-&gt;apply_filters()
    #8 /xxx/wp-content/plugins/advanced-custom-fields-pro/includes/acf-value-functions.php(172): apply_filters()
    #9 /xxx/wp-content/plugins/advanced-custom-fields-pro/pro/fields/class-acf-field-flexible-content.php(889): acf_format_value()
    #10 /xxx/wp-includes/class-wp-hook.php(308): acf_field_flexible_content-&gt;format_value()
    #11 /xxx/wp-includes/plugin.php(256): WP_Hook-&gt;apply_filters()
    #12 /xxx/wp-content/plugins/advanced-custom-fields-pro/includes/acf-hook-functions.php(109): apply_filters_ref_array()
    #13 /xxx/wp-includes/class-wp-hook.php(308): _acf_apply_hook_variations()
    #14 /xxx/wp-includes/plugin.php(205): WP_Hook-&gt;apply_filters()
    #15 /xxx/wp-content/plugins/advanced-custom-fields-pro/includes/acf-value-functions.php(172): apply_filters()
    #16 /xxx/wp-content/plugins/advanced-custom-fields-pro/pro/fields/class-acf-field-repeater.php(414): acf_format_value()
    #17 /xxx/wp-includes/class-wp-hook.php(308): acf_field_repeater-&gt;format_value()
    #18 /xxx/wp-includes/plugin.php(256): WP_Hook-&gt;apply_filters()
    #19 /xxx/wp-content/plugins/advanced-custom-fields-pro/includes/acf-hook-functions.php(109): apply_filters_ref_array()
    #20 /xxx/wp-includes/class-wp-hook.php(308): _acf_apply_hook_variations()
    #21 /xxx/wp-includes/plugin.php(205): WP_Hook-&gt;apply_filters()
    #22 /xxx/wp-content/plugins/advanced-custom-fields-pro/includes/acf-value-functions.php(172): apply_filters()
    #23 /xxx/wp-content/plugins/advanced-custom-fields-pro/pro/fields/class-acf-field-flexible-content.php(889): acf_format_value()
    #24 /xxx/wp-includes/class-wp-hook.php(308): acf_field_flexible_content-&gt;format_value()
    #25 /xxx/wp-includes/plugin.php(256): WP_Hook-&gt;apply_filters()
    #26 /xxx/wp-content/plugins/advanced-custom-fields-pro/includes/acf-hook-functions.php(109): apply_filters_ref_array()
    #27 /xxx/wp-includes/class-wp-hook.php(308): _acf_apply_hook_variations()
    #28 /xxx/wp-includes/plugin.php(205): WP_Hook-&gt;apply_filters()
    #29 /xxx/wp-content/plugins/advanced-custom-fields-pro/includes/acf-value-functions.php(172): apply_filters()
    #30 /xxx/wp-content/plugins/advanced-custom-fields-pro/includes/api/api-template.php(111): acf_format_value()
    #31 /xxx/wp-content/plugins/relevanssi/lib/compatibility/acf.php(241): get_field_object()
    #32 /xxx/wp-content/plugins/relevanssi/lib/compatibility/acf.php(246): relevanssi_acf_is_parent_excluded()
    #33 /xxx/wp-content/plugins/relevanssi/lib/compatibility/acf.php(246): relevanssi_acf_is_parent_excluded()
    #34 /xxx/wp-content/plugins/relevanssi/lib/compatibility/acf.php(212): relevanssi_acf_is_parent_excluded()
    #35 /xxx/wp-includes/class-wp-hook.php(308): relevanssi_acf_exclude_fields()
    #36 /xxx/wp-includes/plugin.php(205): WP_Hook-&gt;apply_filters()
    #37 /xxx/wp-content/plugins/relevanssi/lib/common.php(1737): apply_filters()
    #38 /xxx/wp-content/plugins/relevanssi/lib/indexing.php(1257): relevanssi_generate_list_of_custom_fields()
    #39 /xxx/wp-content/plugins/relevanssi/lib/indexing.php(565): relevanssi_index_custom_fields()
    #40 /xxx/wp-content/plugins/relevanssi/lib/indexing.php(824): relevanssi_index_doc()
    #41 /xxx/wp-content/plugins/relevanssi/lib/indexing.php(897): relevanssi_publish()
    #42 /xxx/wp-includes/class-wp-hook.php(310): relevanssi_insert_edit()
    #43 /xxx/wp-includes/class-wp-hook.php(332): WP_Hook-&gt;apply_filters()
    #44 /xxx/wp-includes/plugin.php(517): WP_Hook-&gt;do_action()
    #45 /xxx/wp-includes/post.php(5436): do_action()
    #46 /xxx/wp-includes/post.php(4729): wp_after_insert_post()
    #47 /xxx/wp-includes/post.php(4817): wp_insert_post()
    #48 /xxx/wp-admin/includes/post.php(439): wp_update_post()
    #49 /xxx/wp-admin/post.php(227): edit_post()
    #50 {main}
      thrown in <b>/xxx/wp-includes/formatting.php</b> on line  3466

Viewing 1 replies (of 1 total)
  • Plugin Author Mikko Saari

    (@msaari)

    That error is so deep in ACF that it’s hard to say what exactly causes it. There’s some value in your ACF fields that when it’s fed to WP’s convert_smilies() function, there’s a boolean where there should be an array (likely something’s returning false instead of the proper value).

    There are lots of apply_filters there, so this can also be caused by a third-party filter returning an invalid value.

    But the problem seems to be within a WYSIWYG field. Does this happen to all posts, or only a specific post? If this happens to all posts, then I’d go looking for filter functions that can cause this, but if it only happens to a specific post, then it may be something in the WYSIWYG fields of that post.

Viewing 1 replies (of 1 total)
  • The topic ‘Fatal error occurred while saving the article’ is closed to new replies.