• Resolved arathra

    (@arathra)


    I have used Publicize successfully for a long time now: to Facebook and Twitter.

    However, after a recent update it posts to FB & Twitter even if the post is saved as a draft (usually by guest contributors). Yesterday someone wrote an inappropriate post and even though it was unpublished it was advertised on FB & Twitter.

    Is there some way of preventing this?

    Many thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic ??

    I can’t seem to be able to reproduce the issue on my end. Could you walk me through the process your contributors usually follow to submit a new post? Do you use a specific plugin to alter user roles, or to allow guests to contribute to your site?

    Thread Starter arathra

    (@arathra)

    Thanks for your help (and sorry for the late reply!).

    What happens is that anyone can post a kind of classified ad on the site as a post. It’s then checked and manipulated in functions.php (adjusting the title, setting tags, etc).

    In that function there is this:

    		// change status if admin is user
    		if ( um_user( "role" ) == 'admin' ) { 
    			$pStatus = "publish";
    		} else {
    			$pStatus = "draft";
    		}

    This sets the post to ‘draft’ for guests and works fine. However, Jetpack still publicizes it to Facebook and Twitter where (unfortunately) the link given leads to a page which has not yet been published.

    In the same function, I also have this code to add hashtags to the post:

    		// before updating the main post, update the meta jetpack publicize string with hashtags
    		$custom_message = '#' . $pTitle . ' #castingcall #actor #audition #actress #casting';
    		update_post_meta( $post_id, '_wpas_mess', $custom_message );

    Any help gratefully received! ??

    Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic ??

    Could you send the full code, so I can run some tests and try to understand what’s happening?

    Thanks!

    Thread Starter arathra

    (@arathra)

    Hi Jeremy,

    After a lot of searching I found the problem and it wasn’t to do with Jetpack!

    When posts were made from the front end via ACF they were set by default to be published, only to be checked and then made draft if needed. This used to be fine but ACF was updated and this caused the problem I had above.

    Now I’ve set them to be draft by default and only set them to publish them after checking.

    Thanks for your time and help on this.

    Cheers.

    Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic ??

    I’m glad you could figure it out! Thanks for letting me know!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Publicize posting Draft posts’ is closed to new replies.