• Resolved pipoulito

    (@pipoulito)


    Hello,

    I have checked my taxonomy as TRUE Hierarchical and now i have a fatal error. Thanks for help.
    Fatal error: Uncaught TypeError: array_map(): Argument #2 ($array) must be of type array, string given in /home/villestprivatdes/public_html/wp-admin/includes/post.php:2107 Stack trace: #0 /home/villestprivatdes/public_html/wp-admin/includes/post.php(2107): array_map(‘intval’, ‘Conseil municip…’) #1 /home/villestprivatdes/public_html/wp-admin/includes/post.php(417): taxonomy_meta_box_sanitize_cb_checkboxes(‘categories_cr’, ‘Conseil municip…’) #2 /home/villestprivatdes/public_html/wp-admin/post.php(227): edit_post() #3 {main} thrown in /home/villestprivatdes/public_html/wp-admin/includes/post.php on line 2107

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter pipoulito

    (@pipoulito)

    Fatal error: Uncaught TypeError: array_key_exists(): Argument #2 ($array) must be of type array, string given in /home/villestprivatdes/public_html/wp-content/plugins/custom-post-type-ui/inc/taxonomies.php:1918 Stack trace: #0 /home/villestprivatdes/public_html/wp-includes/class-wp-hook.php(308): cptui_check_existing_taxonomy_slugs(false, ‘annee’, ”) #1 /home/villestprivatdes/public_html/wp-includes/plugin.php(205): WP_Hook->apply_filters(false, Array) #2 /home/villestprivatdes/public_html/wp-content/plugins/custom-post-type-ui/inc/taxonomies.php(1617): apply_filters(‘cptui_taxonomy_…’, false, ‘annee’, ”) #3 /home/villestprivatdes/public_html/wp-content/plugins/custom-post-type-ui/inc/taxonomies.php(1975): cptui_update_taxonomy(Array) #4 /home/villestprivatdes/public_html/wp-includes/class-wp-hook.php(308): cptui_process_taxonomy(”) #5 /home/villestprivatdes/public_html/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(NULL, Array) #6 /home/villestprivatdes/public_html/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #7 /home/villestprivatdes/public_html/wp-settings.php(617): do_action(‘init’) #8 /home/villestprivatdes/public_html/wp-config.php(98): require_once(‘/home/villestpr…’) #9 /home/villestprivatdes/public_html/wp-load.php(50): require_once(‘/home/villestpr…’) #10 /home/villestprivatdes/public_html/wp-admin/admin.php(34): require_once(‘/home/villestpr…’) #11 {main} thrown in /home/villestprivatdes/public_html/wp-content/plugins/custom-post-type-ui/inc/taxonomies.php on line 1918

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Unsure on the array_map portion above, from your first post, as that looks to be related to some metaboxes.

    Regarding the second one though, it seems somehow you have a string being passed as the 3rd parameter from the lines of code highlighted at https://github.com/WebDevStudios/custom-post-type-ui/blob/master/inc/taxonomies.php#L1909-L1911

    The $taxonomies = [] portion.

    Is the entire site fatal erroring right now? Or is it just when you do certain actions? Would you be able to visit CPTUI > Tools and the Taxonomies tab for example? Curious what’s on the righthand side of that screen with the JSON blob.

    Thread Starter pipoulito

    (@pipoulito)

    thanks here it is.
    i had to go to database and remove term values to make my WP works again.

    {“annee”:{“name”:”annee”,”label”:”Ann\u00e9es”,”singular_label”:”Ann\u00e9e”,”description”:””,”public”:”true”,”publicly_queryable”:”true”,”hierarchical”:”true”,”show_ui”:”true”,”show_in_menu”:”true”,”show_in_nav_menus”:”true”,”query_var”:”true”,”query_var_slug”:””,”rewrite”:”true”,”rewrite_slug”:””,”rewrite_withfront”:”1″,”rewrite_hierarchical”:”0″,”show_admin_column”:”false”,”show_in_rest”:”true”,”show_tagcloud”:”false”,”sort”:”false”,”show_in_quick_edit”:””,”rest_base”:””,”rest_controller_class”:””,”rest_namespace”:””,”labels”:{“menu_name”:””,”all_items”:””,”edit_item”:””,”view_item”:””,”update_item”:””,”add_new_item”:””,”new_item_name”:””,”parent_item”:””,”parent_item_colon”:””,”search_items”:””,”popular_items”:””,”separate_items_with_commas”:””,”add_or_remove_items”:””,”choose_from_most_used”:””,”not_found”:””,”no_terms”:””,”items_list_navigation”:””,”items_list”:””,”back_to_items”:””,”name_field_description”:””,”parent_field_description”:””,”slug_field_description”:””,”desc_field_description”:””},”meta_box_cb”:””,”default_term”:””,”object_types”:[“comptes-rendus”]}}

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Hmm, was able to import the settings, and then create parent/child terms, and assign posts and not encountering any issues thus far.

    Out of curiosity, did removal of some of the terms resolve the issue as well? I’m not confident that would be part of a solution, but figured I’ll ask anyway.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘FATAL ERROR taxonomy’ is closed to new replies.