Viewing 14 replies - 1 through 14 (of 14 total)
  • Plugin Author Tobias Schutter

    (@tschutter)

    Which version of Magic Fields are you using?

    Thread Starter Kyle Burnett

    (@idstm)

    WP Version 3.4.2
    Magic Fields Version 2.0.1
    CPAC Version 1.4.6.4

    Strangely I have the exact same version of all of it on another few sites and there’s no issue there. Though, those sites all started on older versions and were upgraded as time went on. This set up was from scratch with the most recent versions.

    Thread Starter Kyle Burnett

    (@idstm)

    Wow, the timing! 20 minutes after posting i was working in the site and got a notification of a CPAC plugin update. I updated to Version 1.4.7 and problem is solved. Looks like your updates got it all solved. Great work. Thanks for a great plugin.

    Plugin Author Tobias Schutter

    (@tschutter)

    Your welcome πŸ™‚

    Thread Starter Kyle Burnett

    (@idstm)

    Well, sadly I take back the part about it working. It’s not. And the update has broken the site it was working on previously as well. That one is worse as the settings screen is just totally blank. I’ll do some digging and see what I can find.

    Thread Starter Kyle Burnett

    (@idstm)

    ah, the blank… i forgot that i had error reporting turned off.

    Catal error: Call to undefined method stdClass::add_help_tab() in /home/content/…/wp-content/plugins/bbpress/includes/admin/forums.php on line 118

    bbpress problem? hmmm. why in the world bbpress would be getting called when i’m on the CPAC admin page… well, that’s gonna take some searching.

    Thread Starter Kyle Burnett

    (@idstm)

    sort of found it. linke 1086 on codepress-admin-columns.php:

    do_action(‘load-edit.php’)

    that loads all the other plugins to get columns they might have. and that triggers the bbpress error.

    bbpress issue? should i post that to them?

    Thread Starter Kyle Burnett

    (@idstm)

    i worked my way back through bbpress and it looks like this: bbpress, when loaded, will call a bail() function on some of the functions when loaded. basically it appears as though it’s trying to no load unnecessary functions. like why load a help page function if the user is not actually on the page that would display it.

    but, the fail is not working. the check it performs is this:

    private function bail() {
    if ( !isset( get_current_screen()->post_type ) || ( $this->post_type != get_current_screen()->post_type ) )
    return true;

    return false;
    }

    doing some testing i print out get_current_screen()->post_type and for whatever reason wordpress thinks that the post type on is “forumn” on this page:

    /wp-admin/options-general.php?page=codepress-admin-columns

    hmm. why in the world would it think that? i’m guessing there is some sort of naming conflict? just a wild guess.

    Thread Starter Kyle Burnett

    (@idstm)

    i rolled back to cpac vs 1.4.4 and all of the issues went away.

    i will update my core and do more testing on a dev site later.

    Plugin Author Tobias Schutter

    (@tschutter)

    Yeah about this issue here. The problem is I want to support as many columns from thirdparty plugins as possible. That’s why I needed to use:

    do_action('load-edit.php')

    Unfortunately that means that occasionally you get a bug like this.

    But I have a quick fix for this. You can just remove the bbPress posttypes from admin columns. I will apply this fix as well in a next release. For now add this to your functions.php:

    function remove_bbpress_from_cpac_post_types( $post_types )
    {
    	if ( class_exists('bbPress') ) {
    		unset( $post_types['topic'] );
    		unset( $post_types['reply'] );
    		unset( $post_types['forum'] );
    	}
    
    	return $post_types;
    }
    add_filter( 'cpac-get-post-types', 'remove_bbpress_from_cpac_post_types' );
    Thread Starter Kyle Burnett

    (@idstm)

    i totally agree with your goals. great stuff. thanks for the fix.

    Tobias,

    But what about people like that have 10 different custom post types? I obviously dont want to have to do a filter for every single one. Would love to see a quick fix. =)

    Plugin Author Tobias Schutter

    (@tschutter)

    In the next major update ( 1.5 and up ) I will address the issue, and use another method for supporting other plugins.

    Earthman Media

    (@earthman100)

    Would definitely love to see your awesome plugin support BBpress too. Your plugin has become a staple in all sites i build now. Keep up the great work, let me know if you need any help.

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Adding custom post "Type" to the entry list – but I don't want it to’ is closed to new replies.