Skip to:

Publish forum via php but it’s only visible after additional manual publish

  • vcb


    Dear Dev-Team,

    I’m having a strange problem.
    Our script creates a new forum if another post_type gets published.
    The script has been up running and tested without issues a couple of days ago.
    All WP + DB entries get set; even all bbpress post meta information (incl. ping_status, etc)
    The created forum DB-entry does look 1:1 the same as a manually published forum.
    There is no visible difference within the DB-entries. Also ‘publish’ status is set.

    The only way to ‘publish’ the script-forum is entering the forum and hit/click publish again (WP backend). No additional settings need to change, only pressing ‘publish’ does the trick.
    After doing this I’ve checked the DB/Debug again; still looks 1:1 the same.

    Have you ever encountered such a problem?

    I’ve tried resetting user-roles; changing bbpress user to super-admin privileges; deactivating plugins and scripts without any positive outcome.
    Before re-installing the entire site I was hoping that you guys know what this could be?

    We use “wp_insert_post( $my_forum );” for saving the private forum into the DB. Could this be a DB error? How to overcome such weirdness?

    Wordpress Version: 2.4.3
    bbpress Version: 2.5.8 & 2.5.7 tested
    Tested as SuperAdmin, Admin, and Moderator.
    Website isn’t live to the public at the moment.
    Please let me know if you need any credentials (private).

    Any help, trick or workaround is very much appreciated.

    Many thanks in advance.
    Kindest regards,

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

  • vcb


    Why does the forum only show up when I update it manually via backend?
    Anyone any idea what this could be?

    I’ve tried different roles; Moderator + Keymaster. Still getting the same result, everything does work – beside showing it in the frontend.Tho, after updating the forum within the backend it shows up in the frontend.


    // Create FORUM Entry object
    	  $my_forum = array(
    		'post_title'    => 'title',
    		'post_content'  => 'test',
    		'post_status'   => 'private',
    		'post_author'   => $_POST['post_author'], //also tried admin '1',
    		'post_type' => 'forum',
    		'post_parent' => '123'	// parent forum
    	  // Insert the post into the database
    	  $page_id = wp_insert_post( $my_forum );



    You may need to run some repair tools like Lynq did in this plugin.

    Test Data for bbPress – Plugin

    Running more than one repair tool can be resource intensive so be careful.



    Hi Robkk,

    thanks for pointing this out.
    I’ve just installed the entire WP + bbpress from scratch, without success.
    Everything does work – beside “publishing” the forum to frontend. within backend the forum gets published, also publishing as admin (via script) doesn’t change a thing.

    Thanks, I’ll keep on searching. There is no need to spam my DB. Everything works.
    This is an Publish/Update issue. bbpress itself runs perfect without issues at all.

    Any further suggestion is very welcome, thanks.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Skip to toolbar