WordPress.org

Ready to get started?Download WordPress

Forums

Convert Post Types
Error converting Post Types (4 posts)

  1. closemarketing
    Member
    Posted 2 years ago #

    I get this error...
    Any idea?

    Fatal error: Cannot redeclare bulk_convert_posts_add_pages() (previously declared in /wp-content/plugins/convert-post-types/convert-post-types.php:15) in /wp-content/plugins/convert-post-types/convert-post-types.php on line 17

    http://wordpress.org/extend/plugins/convert-post-types/

  2. Cliff Seal
    Member
    Posted 2 years ago #

    I believe I've patched it up. Change:

    Line 124 to:
    $q = 'numberposts=-1&post_status=any&post_type='.$_POST['old_post_type'];

    And Line 131 to (Edited 1:49pm):
    $wpdb->update( $wpdb->posts, array( 'post_type' => $_POST['new_post_type']), array( 'ID' => $item->ID, 'post_type' => $_POST['old_post_type']), array( '%s' ), array( '%d', '%s' ) );

    HT to cyberhobo here: http://forum.sillybean.net/forums/topic/fatal-error-since-wp-3-3-upgrade/

    ...but my solution is a bit less involved. :)

  3. Matt
    Member
    Posted 2 years ago #

    Unfortunately that patch doesn't work for me; I still get the same error when converting pages to posts.

  4. Stephanie Leary
    Member
    Plugin Author

    Posted 2 years ago #

    This bug is fixed in 1.2, which I just posted to Extend. Thanks very much for your patience!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic