Fix for Posts with a Featured Image not being sent in MailPress

There's a bug somewhere in MailPress 5.3 that prevents posts from being sent in your newsletter if they contain a featured image. I'm not exactly sure why this happens, but it appears to be related to MailPress's attempt to reproduce the TwentyTen theme's evil habit of changing your site header according to a post's featured image.

Something seems to go wrong in the process; but given that you probably don't want the image in the header of your emails to change according to a post's featured image either, the simplest solution is to disable this buggy behaviour entirely. To do this, you need to edit the file mailpress/mp-includes/class/MP_theme_html_.class.php.

In the function header_image, delete or comment out these 3 lines:

//    case ( $post_id && function_exists('has_post_thumbnail') && function_exists('get_post_thumbnail_id') && function_exists('wp_get_attachment_image_src') && $post_id && has_post_thumbnail( $post_id ) && ($image = wp_get_attachment_image_src( get_post_thumbnail_id( $post_id ), 'post-thumbnail')) && ($image[1] >= self::HEADER_IMAGE_WIDTH) ) :
//        echo $image[0];
//    break;

Liked this post? Subscribe to get more like it via email.

About Graham

I'm the creator of BuildYourBlog.net.
This entry was posted in MailPress and tagged , , . Bookmark the permalink.

2 Responses to Fix for Posts with a Featured Image not being sent in MailPress

  1. Lancer Kind says:

    Nice! I'll see if this is my problem.

    As an advocate of MailPress, I'm reminding everyone that this software tasks someone's time to maintain, so if you've never donated to the MailPress author (it's not me btw), give a little so we keep this software going.

    PayPal donation links are here: http://blog.mailpress.org/

  2. kasynarenomowane.pl says:

    I was looking for this fix, this stupid bug annoys me a lot 🙂 Thanks dude

Comments are closed.