Viewing 15 replies - 1 through 15 (of 41 total)
  • Same exact issue here.

    Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic šŸš€

    Since you’ve published private information about your site and your Jetpack connection here, could you please immediately disconnect and reconnect your site to WordPress.com, to make sure no one can use that information.

    Could you let me know if the posts were scheduled before you updated to Jetpack 4.2, or if you wrote and scheduled them very recently, after the update?

    @admindroidturf As I mentioned in the other thread, could you start your own thread?

    Thanks

    Thread Starter godthor

    (@godthor)

    Disconnected and reconnected.

    Those first two articles referenced were scheduled prior to 4.2. The last two articles were scheduled under 4.2.

    Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic šŸš€

    Thanks!

    It appears to be an issue with how your author information is synchronized with WordPress.com upon publication.

    Do you use any plugins to customize the way author roles are assigned, or can you think of anything specific about those posts that was customized with a plugin?

    Thread Starter godthor

    (@godthor)

    I have a plugin I wrote that hooks scheduled to publish posts to send the author an email that their post has been published. I also give contributors the ability to upload media (otherwise disabled), as well as edit their own published posts – also normally disabled. There’s a few other things in there for email notices.

    Here it is to make things clearer.

    <?php
    
    /*
    	Plugin Name: Contributor Upload & Edit
    	Plugin URI: http://creativetwilight.com/
    	Description: Lets contributors upload media, and also edit their own posts once published.
    	Author: Tony Stanley
    	Version: 1.0.0
    	Author URI: http://creativetwilight.com/
    */
    
    add_action('plugins_loaded','allow_contributor_uploads'); # Hook plugins loaded, IE: activated.
    add_action('save_post','ct_check_pending'); # Hook save post.
    
    # Post scheduling hooks.
    add_action('draft_to_future','post_scheduled_notifiction');
    add_action('pending_to_future','post_scheduled_notifiction');
    // add_action('future_to_future','post_scheduled_notifiction');
    
    # Post publishing hooks.
    add_action('draft_to_publish','post_published_notification');
    add_action('pending_to_publish','post_published_notification');
    add_action('future_to_publish', 'post_published_notification');
    
    /**
     * This allows contributors to upload media files on posts, as well as edit their own posts
     * once they have been published.
     * @return void
     */
    function allow_contributor_uploads() {
    	if(current_user_can('contributor')) {
    	     $contributor = get_role('contributor');
    	     $contributor->add_cap('upload_files');
    	     $contributor->add_cap('edit_published_posts');
    	 }
    }
    function ct_check_pending($post_id) {
    	# If this is just a revision, don't send the email.
    	if(wp_is_post_revision($post_id)) return;
    
    	$status = get_post_status($post_id);
    
    	if($status == 'pending') {
    		$admin_url = admin_url('post.php?post=' . $post_id . '&action=edit');
    		$blog_title = get_bloginfo('name');
    		$post_title = html_entity_decode(get_the_title($post_id));
    		$post_url = get_permalink($post_id);
    		$subject = $blog_title . ' Pending "' . $post_title . '"';
    
    		$message = 'A post has been saved as pending: "' . $post_title . '". <a href="' . $admin_url . '">Edit Post</a>';
    
    		# Send email to admin.
    		$admin_email = get_bloginfo('admin_email');
    
    		$headers = array();
    		$headers[] = 'Content-Type: text/html; charset=UTF-8';
    
    		wp_mail($admin_email, $subject, $message, $headers);
    	}
    }
    function post_scheduled_notifiction($post) {
    	if($post) {
    		$blog_title = get_bloginfo('name');
    	    $author = $post->post_author; /* Post author id. */
    	    $name = get_the_author_meta('display_name', $author);
    	    $email = get_the_author_meta('user_email', $author);
    	    $post_title = html_entity_decode($post->post_title);
    	    $permalink = get_permalink($post->ID);
    	    $to[] = $name . ' <' . $email . '>';
    	    $subject = $blog_title . ' Scheduled "' . $post_title . '"';
    	    $message = 'Hello, ' . $name . ':<p>Your article "' . $post_title . '" has been scheduled for ' . date('F jS, Y g:ia', strtotime($post->post_date)) . ' Eastern Standard Time.</p>';
    
    		$headers = array();
    		$headers[] = 'Content-Type: text/html; charset=UTF-8';
    
    		$admin_email = get_bloginfo('admin_email');
    
    		if($email != $admin_email) $headers[] = 'Bcc: ' . $admin_email;
    
    	    wp_mail($to, $subject, $message, $headers);
    	}
    }
    function post_published_notification($post) {
    	if($post) {
    		$blog_title = get_bloginfo('name');
    	    $author = $post->post_author; /* Post author id. */
    	    $name = get_the_author_meta('display_name', $author);
    	    $email = get_the_author_meta('user_email', $author);
    	    $post_title = html_entity_decode($post->post_title);
    	    $permalink = get_permalink($post->ID);
    	    $to[] = $name . ' <' . $email . '>';
    	    $subject = $blog_title . ' Published "' . $post_title . '"';
    	    $message = 'Hello, ' . $name . ':<p>Your article "<a href="' . $permalink . '">' . $post_title . '</a>" has been published.</p><p>Please make sure you subscribe to the Disqus comments for your article.</p>';
    
    		$headers = array();
    		$headers[] = 'Content-Type: text/html; charset=UTF-8';
    
    		$admin_email = get_bloginfo('admin_email');
    
    		if($email != $admin_email) $headers[] = 'Bcc: ' . $admin_email;
    
    	    wp_mail($to, $subject, $message, $headers);
    	}
    }
    
    ?>
    Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic šŸš€

    Thanks! That shouldn’t cause any issues, but would you mind trying to schedule a post and get it published while that plugin is off?

    Let me know how it goes.

    Jeremy/all,

    I wanted to chime in on this because I’ve been working with Cena from Jetpack on an issue that’s similar that has arisen for me as well that involves publicizing my posts including the subscribers. Up until 4.2.1 Jetpack, I operated just fine. Things worked smoothly on all my postings. I usually schedule postings out about seven days ahead. Meaning one per day, usually around 6pm. Lately I’ve been changing that just to see what happens. But regardless, I never had a single issue other than the rare case that my connection to Facebook needed to be refreshed.

    In other words, up until 4.2.1 I did nothing with my blog other than write my articles, schedule them, and they all would post just fine with no issues. I like things simple so I don’t tweak my blog’s functionality EVER. If it’s working I leave it alone. But then after 4.2.1 updated, my Managed Word Press through GoDaddy updated my software automatically to 4.6. I still operated for a single day under 4.2.1 Jetpack and suddenly my blog was posting on the web like usual but none of the social media went out, nor did my subscribers get their email (I’m one of them).

    So I disconnected everything (Jetpack, social media, etc.) and reconnected and checked it again and also updated to 4.2.2 Jetpack and still got the same issue. Blog posts on the web when someone goes to my site, but the social media doesn’t go out nor the subscribers list UNTIL I log into my WordPress dashboard. Then, for some odd reason it goes out.

    I’ve gone through several days now of testing on this and have done everything on my end to figure out it’s not on my end. I do not have any plugins anymore that affect my functionality of my blog postings, other than Jetpack. I deactivated the ones that might have had any affect in other words. What remains for plugins are silly things like search widgets and such that are only for the GUI interface of my blog.

    So the bottom line is that since 4.2.1 and Word Press 4.6 I have not been able to get the scheduled blog postings to work either the way it used to. My work around is either to Publish each day manually my blogs (which does work and does send out the subscribers and the social media just fine) or I have to manually push the scheduled forward once it reaches missed schedule.

    But I want to reiterate, I have not made any changes to my blog’s functionality in a very long time. My blog ran smoothly with no issues (save the occasional FB connection refresh) for the past year. But since WordPress 4.6 and Jetpack 4.2.1 combination came around, schedule postings for social media and subscribers haven’t worked. Only regularly publicize.

    My site is http://www.thetwelfthstep.com.

    Thanks,
    Andrew

    Thread Starter godthor

    (@godthor)

    Jeremy, I’ll give it a shot this morning.

    Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic šŸš€

    @andrew Thanks for chiming in. It might be worth replying to Cena with your findings, as she’ll be in a better position to help since she knows more about your site and has already been helping you though this.

    Thanks!

    @godthor If that doesn’t work, could you check your site settings, and let me know if you use anything that may customize the default behaviour of Cron, WordPress’ scheduling management system? To check that, you can check for Cron related plugins, as well as Cron related constants in your site’s wp-config.php file.

    Thanks!

    Thread Starter godthor

    (@godthor)

    I disabled my plugin, then scheduled my post, and my post published but nothing was publicized.

    I do have WP cron disabled on my wp-config.php

    define('DISABLE_WP_CRON', true);

    I have a cron job setup on my server for it.

    /usr/bin/curl "http://creativetwilight.com/wp-cron.php" >/dev/null 2>&1

    This setup isn’t new for my blog, been that way for a very long time. However, I realize you’re trying to dig through possible causes and conflicts, so let me know if you need anything else. I’d love to figure this out.

    Jeremy, I have, I just wanted a second set of eyes from Jetpack on this because we haven’t discovered anything on my end that could be causing this. And I do not have any plugins that affect Cron either. I did but I deleted it after these problems started to see if that would fix it and of course it didn’t…I know you have s great track record of fixing stuff so I wanted your eyes to see this too… šŸ™‚

    Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic šŸš€

    @gothor That’s most likely what’s causing the issue, and it’s linked to some changes we’ve made in Jetpack 4.2. We’re working on getting this fixed.

    Could you try to add the following to your theme’s functions.php file, or in a functionality plugin, and let me know how it goes?

    add_filter( 'jetpack_sync_listener_should_load', '__return_true' );
    add_filter( 'jetpack_sync_sender_should_load', '__return_true' );

    @andrew could you check the suggestions I posted earlier on this thread, and let me know if it helps?

    Thread Starter godthor

    (@godthor)

    I’ll give it a shot. I have another post setup for Sunday morning, so I’ll give an update then.

    Jeremy, I’m not sure if you mean about the plugins and such. I already have deactivated all the ones that could even affect this. Also disconnected and reconnected as well. None of that made a difference though unfortunately.

    Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic šŸš€

    @godthor Coming back to this, I’d also recommend a small change: instead of /usr/bin/curl "http://creativetwilight.com/wp-cron.php" >/dev/null 2>&1, you should probably use /usr/bin/curl "http://creativetwilight.com/wp-cron.php?doing_wp_cron" >/dev/null 2>&1.

    @andrew The steps starting here should be interesting for you to test:
    https://wordpress.org/support/topic/publicize-does-not-work?replies=15#post-8803405

Viewing 15 replies - 1 through 15 (of 41 total)
  • The topic ‘Publicize Does Not Work’ is closed to new replies.