• Resolved nicolas37

    (@nicolas37)


    Hi,
    I wanted to change a taxonomy slag so I extorted the whole list and then make the change in txt file and then Import it back again. The problem is that I Imported it by mistake to the POSTS IMPORT field instead of the TAXONOMY one. This results to the following error 4 times (as many as the taxonomies wanted to import). Tried to Deactivate – Delete and Install – Activate error still exists. Please advice

    Warning: in_array() expects parameter 2 to be array, null given in /home/tastehop/public_html/wp-content/plugins/custom-post-type-ui/custom-post-type-ui.php on line 332

    Warning: Invalid argument supplied for foreach() in /home/tastehop/public_html/wp-includes/class-wp-post-type.php on line 634

    Nicolas

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter nicolas37

    (@nicolas37)

    Hi again,
    I went to Edit Post Types and deleted one by one. The last one returns an error and doesn’t allow me to delete it. Is it saved in the Database? Can I delete it from there?
    Please Advice
    Nicolas

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    The warnings are going to be because you have taxonomy-based data stored in the slot meant for post types, so the possible values for the registration aren’t matching up like they should be. Until they are again, the errors are likely to persist.

    What error are you getting?

    All of the CPTUI settings are saved in some options in the wp_options table

    Post types options key: cptui_post_types
    Taxonomies options key: cptui_taxonomies

    If you have a backup of the database available, the easiest thing to do is probably going to be plucking those two rows out of the backup, and re-inserting them into the current database state.

    The post types/terms already created should not be affected at all, as those are all in other tables.

    Thread Starter nicolas37

    (@nicolas37)

    Hi Michael,

    Thank you for your immediate response. I don’t have a db backup because site is under construction so it doesn’t matter if we loose something at the moment. I don’t want any Post types to be configured at the moment. Only Taxonomies that are working ok (Entered them manually). Following is the entry in the DB for cptui_post_types

    Could I erase the value of it?

    a:1:{s:6:”people”;a:21:{s:4:”name”;s:3:”peo”;s:5:”label”;s:6:”People”;s:14:”singular_label”;s:6:”People”;s:11:”description”;s:0:””;s:6:”public”;s:4:”true”;s:12:”hierarchical”;s:5:”false”;s:7:”show_ui”;s:4:”true”;s:12:”show_in_menu”;s:4:”true”;s:17:”show_in_nav_menus”;s:4:”true”;s:9:”query_var”;s:4:”true”;s:14:”query_var_slug”;s:0:””;s:7:”rewrite”;s:4:”true”;s:12:”rewrite_slug”;s:0:””;s:17:”rewrite_withfront”;s:1:”1″;s:20:”rewrite_hierarchical”;s:1:”0″;s:17:”show_admin_column”;s:5:”false”;s:12:”show_in_rest”;s:5:”false”;s:18:”show_in_quick_edit”;s:0:””;s:9:”rest_base”;s:0:””;s:6:”labels”;a:18:{s:9:”menu_name”;s:0:””;s:9:”all_items”;s:0:””;s:9:”edit_item”;s:0:””;s:9:”view_item”;s:0:””;s:11:”update_item”;s:0:””;s:12:”add_new_item”;s:0:””;s:13:”new_item_name”;s:0:””;s:11:”parent_item”;s:0:””;s:17:”parent_item_colon”;s:0:””;s:12:”search_items”;s:0:””;s:13:”popular_items”;s:0:””;s:26:”separate_items_with_commas”;s:0:””;s:19:”add_or_remove_items”;s:0:””;s:21:”choose_from_most_used”;s:0:””;s:9:”not_found”;s:0:””;s:8:”no_terms”;s:0:””;s:21:”items_list_navigation”;s:0:””;s:10:”items_list”;s:0:””;}s:12:”object_types”;a:1:{i:0;s:4:”post”;}}}

    Best Regards
    Nicolas

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Yes, you can delete the database row for the cptui_post_types option, and have nothing to worry about. I’d move the option value over to the cptui_taxonomies option, before deleting that row completely. Save on having to re-set the taxonomy values.

    Good to know this is only on a dev site at the moment, and nothing on prod/live/mission critical.

    Thread Starter nicolas37

    (@nicolas37)

    Deleted it and the warning disappeared.
    Digging more into your great plugin…
    Thanks for all Michael
    Nicolas

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Awesome, thanks Nicolas

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Warning after Importing’ is closed to new replies.