• Hello.

    I want to import posts from my old single wordpress site to a new wp multisite.

    Also, the posts get a new custom post type which I have changed in the xml. So this shouln’t be a problem.

    But after the import I get these error message a hundred times in the backend:

    Warning: call_user_func_array() expects parameter 1 to be a valid callback, function ‘get_archives_events_link’ not found or invalid function name in /xxxx/wp-includes/plugin.php on line 192

    Could you help?

    Thank you

Viewing 5 replies - 1 through 5 (of 5 total)
  • What happens if you try importing an unchanged copy of the export file into the site?

    Thread Starter mattmatt88

    (@mattmatt88)

    Thanks for your response.

    Then it works without errors.

    I just changed:
    <wp:post_type>post</wp:post_type>
    to
    <wp:post_type>books</wp:post_type>

    and:
    <category domain=”category” nicename=”fiction”><![CDATA[General Fiction]]></category>
    to
    <category domain=”books_category” nicename=”fiction”><![CDATA[General Fiction]]></category>

    The taxonomys are correct.
    The posts are all imported but the error messages appear on every backend page.

    Tried it on another single wordpress site where I have the same custom post type, and there it worked. Tried to deactivate all plugins on the multisite, but still doesn’t work

    Thread Starter mattmatt88

    (@mattmatt88)

    Noticed that it isn’t an import problem.

    It also exists if I create a new post manually, but only with multisite. I typed the code for cusstom post type in the theme’s functions.php, that is used by every blog in the multisite (also tried it with only one blog that uses this theme).

    Is there anything different I have to do for custom post types when using multisite?

    My custom post type code:

    // Register Custom Post Type
    function custom_post_type() {
    	$labels = array(
    		'name'                => _x( 'Books', 'Post Type General Name' ),
    		'singular_name'       => _x( 'Book', 'Post Type Singular Name' ),
    		'add_new_item'        => __( 'Add New Book', 'text_domain' ),
    		'add_new'             => __( 'Add New', 'text_domain' ),
    		'edit_item'           => __( 'Edit Book', 'text_domain' ),
    		'update_item'         => __( 'Update Book', 'text_domain' ),
    		'search_items'        => __( 'Search Books', 'text_domain' ),
    		'not_found'           => __( 'No Books found', 'text_domain' ),
    		'not_found_in_trash'  => __( 'No Books found in Trash', 'text_domain' ),
    		'parent_item_colon'   => ''
    	);
    	$args = array(
    		'labels'              => $labels,
    		'supports' 			  => array('title','editor','thumbnail','categories','custom-fields','comments','author'),
    		'hierarchical'        => false,
    		'public'              => true,
    		'show_ui'             => true,
    		'show_in_menu'        => true,
    		'show_in_nav_menus'   => true,
    		'show_in_admin_bar'   => true,
    		'menu_position'       => 5,
    		'menu_icon'           => '',
    		'query_var' 		  => true,
    		'can_export'          => true,
    		'has_archive'         => true,
    		'exclude_from_search' => false,
    		'publicly_queryable'  => true,
    		'capability_type'     => 'post',
    	);
    	register_post_type( 'books', $args );
    
    	register_taxonomy(__( 'books_category' ),
    		array('books'),
    		array('hierarchical' => true,
    		'label' => 'Books Categories',
    		'rewrite' => true,
    		'query_var' => true
    	));
    	register_taxonomy(__( 'books_tag' ),
    		array('books'),
    		array('hierarchical' => false,
    		'label' => 'Books Tags',
    		'rewrite' => true,
    		'query_var' => true
    	));
    }
    add_action( 'init', 'custom_post_type', 0 );
    Thread Starter mattmatt88

    (@mattmatt88)

    Any ideas please?
    Do I anything have to change for Multisite when importing custom post type data. because it works with single site?

    Thread Starter mattmatt88

    (@mattmatt88)

    Got it.
    There was a wrong code for custom posts archives in my functions.php.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Error after importing xml posts’ is closed to new replies.