• Resolved Carlo

    (@ccozzi)


    First of all: I apologise if I am missing a thread about the following question (I can’t figure out how to search here properly):

    My Weekly Digest E-mail does’t include my most recent post. I had 3 new posts this week but only he first two were included. I didn’t exclude any categories as far as I can see. Am I doing something wrong?

    https://wordpress.org/plugins/subscribe2/

Viewing 15 replies - 1 through 15 (of 18 total)
  • I had the same problem as Carlo, after I updated to the latest WordPress and Subscribe2 version yesterday, my weekly digest E-mail just sent the latest post today but not all four of them. How can I be sure that this won’t happen again next week? It had been working properly since I installed it over a year ago.

    @carlo

    Is the ‘missing’ post published? Is it in the correct date range for the digest email? Is the override checkbox ticked so that sending is suppressed?

    Thread Starter Carlo

    (@ccozzi)

    Yes, the post is published, the override box is not checked (I checked that…) and I have no categories excluded.

    I am not sure as to what you mean by date range. I published 3 posts between the one-before-last digest mail (1-1-2015) and the last one (8-1-2015), all fall within a week (3, 5 and 6-1-2015), the last post of 6-1 was not included.

    Might it be a one-time hick-up?

    @carlo

    The digest email is triggered at a set time, posts made after the trigger will be included in the next email.

    I guess this could be a hick-up, if you want to check have a look in the postmeta table (using PHPMyAdmin or similar) and see of the ‘_s2_digest_post_status’ meta value is set as ‘pending’. If it is, the post will be included in your next email.

    If not, then cycle the post to draft and back to published again to set that value to ‘pending’ so that it will be included in the next email.

    Thread Starter Carlo

    (@ccozzi)

    I checked the relevant DB-table and saw that the status was “done” and not “pending”. I re-concepted and re-published and the status changed to “pending”. The post will show up in the next digest.

    How the status was set to “done” remains a mystery. Can that be done by sending a mail-preview? Another question: where can I see the “set” time for the digest mails?

    Thanks for the pointer, in any case.

    @carlo

    Great spot – you are absolutely right, the post status does get changed on previews. I’ll get a fix into Subscribe2 HTML but cannot commit change to the free version anymore. To apply the fix look for this code in the classes/class-s2-core.php file:

    foreach ( $ids as $id ) {
    	if ( ! empty( $sticky_ids ) && ! in_array( $id, $sticky_ids ) ) {
    		update_post_meta( $id, '_s2_digest_post_status', 'done' );
    	} else {
    		update_post_meta( $id, '_s2_digest_post_status', 'done' );
    	}
    }
    $this->subscribe2_options['last_s2cron'] = implode( ',', $digest_post_ids );
    update_option( 'subscribe2_options', $this->subscribe2_options );

    And change it to:

    if ( '' !== $preview ) {
    	foreach ( $ids as $id ) {
    		if ( ! empty( $sticky_ids ) && ! in_array( $id, $sticky_ids ) ) {
    			update_post_meta( $id, '_s2_digest_post_status', 'done' );
    		} else {
    			update_post_meta( $id, '_s2_digest_post_status', 'done' );
    		}
    	}
    	$this->subscribe2_options['last_s2cron'] = implode( ',', $digest_post_ids );
    	update_option( 'subscribe2_options', $this->subscribe2_options );
    }

    The time for each post is shown in the Subscribe2->Settings page under the Email Notifications tab.

    Thread Starter Carlo

    (@ccozzi)

    Wow, thanks for the code. I will hack it in shortly. Is the free version not maintained at all any more?

    @carlo

    Yes, the free version is still maintained, but I no longer play any part in that. It’s done by the owners of ReadyGraph.

    Thread Starter Carlo

    (@ccozzi)

    Ah, I see. I trust you just gave them your code in exchange for a case of beer, right? Otherwise I must hold on to your contribution above, just in case I have to use it in the next update…. 🙂

    Thanks again…

    @carlo

    Slightly more than a case of beer but yes, I handed the code over in an exchange 😉

    I’ll happily share code fixes like the above for free but sadly I have no control or influence over getting them into future versions.

    @mattyrob

    I’m still trying to figure out why my last weekly digest mail only showed my latest post and not the other three I posted in the same week. Could you give me some pointers as to why that might be? Thanks!

    @eatinmykitchen

    I suspect the pending status has been transitioned for some reason – maybe by sending some preview emails that week and running into the bug identified in this thread.

    Thank you for getting back to me but I didn’t send any preview emails. I just updated WordPress and Subscribe2.

    @eatinmykitchen

    It may well be due to the plugin update then – depending on the previous version. The way Subscribe2 sends digest emails was changed recently.

    Thanks, I’ll see how the next one goes.

Viewing 15 replies - 1 through 15 (of 18 total)

The topic ‘Weekly Digest mail not including last post’ is closed to new replies.