WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: WordPress MU Sitewide Tags Pages] Error with Prologue (3 posts)

  1. dnorman
    Member
    Posted 5 years ago #

    I'm trying to get the Prologue theme working with WPMU (also running WPMU Sitewide Tags) and keep getting this error when posting an entry from the Prologue-themed blog:

    PHP Fatal error: Call to undefined function wp_insert_category() in /path/to/wpmu/wp-content/mu-plugins/sitewide-tags.php on line 120, referer: http://myprologueblog.com/

    That error corresponds with this line in sitewide-tags.php

    wp_insert_category( array('cat_name' => $d, 'category_parent' => '') );

    That line appears to run as expected (or at least without throwing errors) on other blogs. If I disable sitewide-tags.php the posts are published without error.

    Any ideas?

    http://wordpress.org/extend/plugins/wordpress-mu-sitewide-tags/

  2. dnorman
    Member
    Posted 5 years ago #

    Found it. The Prologue theme doesn't try to set a category for a post using its embedded post form. I modified the post code like this, and it works fine now:

    $post_id = wp_insert_post( array(
                    'post_author'   => $user_id,
                    'post_title'    => $post_title,
                    'post_content'  => $post_content,
                    'tags_input'    => $tags,
                    'post_status'   => 'publish',
    		'post_category'	=> array(0)
            ) );

    I'll post another entry on the Prologue theme page as well. Easy fix.

  3. Donncha O Caoimh
    Member
    Posted 5 years ago #

    Fixed in trunk, see other thread on this tag.

Topic Closed

This topic has been closed to new replies.

About this Topic