• Resolved rbmg-wp

    (@rbmg-wp)


    Hello,

    Been doing a lot of testing. Can’t get the message {POST} content to get sent in the body of the email. It does get sent in the 4 test emails when you click the preview button in settings.

    Settings in use:

    Subscriber set to HTML-FULL
    Message body gets posted to the blog fine and is present there.
    Using per post notifications.

    Any clues please?
    Many thanks
    Liz

    https://www.ads-software.com/plugins/subscribe2/

Viewing 15 replies - 16 through 30 (of 33 total)
  • @rbmg-wp,

    Postie is not my code so I’m not totally sure that this is the issue or that this fix will work but I think it’s worth a try.

    In the postie-functions.php you’ll find a function called PostEmail().

    Near the top of that function there are a few lines that create an empty post to act as a placeholder:

    $tmpPost = array('post_title' => 'tmptitle', 'post_content' => 'tmpPost');
    $post_id = wp_insert_post($tmpPost);

    Try changing that first line to this:
    $tmpPost = array('post_title' => 'tmptitle', 'post_content' => 'tmpPost', 'post_status' => 'draft');

    Thread Starter rbmg-wp

    (@rbmg-wp)

    Hello and thank you for that attempt. Unfortunately it didn’t work.
    I got the same result with no message body.

    Postie still worked on its end though.

    @rbmg-wp,

    There seems to be a way in Postie to delay the post going live and that seems to make it a future post as discussed here:
    https://www.ads-software.com/plugins/postie/other_notes/

    Can you try using this feature and delaying by 3 to 5 minutes? That might be a good workaround if it populates that post for future publication.

    Thread Starter rbmg-wp

    (@rbmg-wp)

    Hi Mattyrob,
    Ok I will test that. Unfortunately though, I can’t see it being a solution unless I can set by default for all messages. I can’t expect my users to enter the delay code…

    1m test failed sorry. Will test with a longer delay tomorrow. (nearly midnight here…)
    thank you once again!

    @rbmg-wp,

    I’ll keep looking at the Postie code then. If I can get it working on my own test sites it might help but RAM is very limited on my test hosting provider. ??

    @rbmg-wp,

    I have just installed Postie on my local development machine and tried posts both with and without my edit above. Both times it worked perfectly for me.

    So, I think we have been looking for a conflict where perhaps none exists.

    Please can you post your Subscribe2 template here or link to it and also the same for the email template you use to trigger Postie.

    Thread Starter rbmg-wp

    (@rbmg-wp)

    Hi @mattryrob,

    Well I am rather red faced here. I assumed it must be Postie but i have just tried deactivating some other plugins and it turns out to be Groups https://www.itthinx.com/plugins/groups

    I had assumed it would work since all the relevant woo roles were showing up and I was always testing as an admin sender anyway.

    Thank you sooo much for your efforts in trying to help me. I feel soo bad that I have made a $20 donation to Subscribe2 anyway.

    Wishing you good karma!
    Liz

    Thread Starter rbmg-wp

    (@rbmg-wp)

    Actually, for clarification for anyone else with this issue, I was test posting as a ‘Customer’ role – which, it might appear does not also have Contributor or Author rights. Over to Groups support…

    @liz,

    I’m very glad we have identified the issue at least and thank you for donating and showing your appreciation of my time. I hope you find a good fix in the Groups plugin.

    Thread Starter rbmg-wp

    (@rbmg-wp)

    Author posts have an empty content too so there’s definitely some conflict going on with Groups…

    @liz,

    The issue is coming from this file in Groups:
    https://plugins.svn.www.ads-software.com/groups/tags/1.4.3/lib/access/class-groups-post-access.php and in particular the the_content() function.

    It basically checks to see if the user (in this case the account used for sending the email I suspect) can read the content of the post and if not an empty string is returned.

    I think you may need to configure Groups to ensure that the Subscribe2 user is identified as being able to read the post or maybe relax the readability settings in Groups.

    Thread Starter rbmg-wp

    (@rbmg-wp)

    @mattyrob,

    Thanks for keeping on this. Problem is, the Subscribe2 user is already a member of my ‘member’ group with full access.

    I have switched my test user to an Author role to ensure posting rights.
    In Groups I found some other candidate capabilities and added them to that ‘member’ group too (eg. publish_posts and post via postie) just to be sure. List cababilities now :
    groups_read_post
    upload_files
    edit_posts
    publish_posts
    read
    groups_access
    Groups_Buy_All_Products
    groups_edit_own_account_details
    post_via_postie

    Still not working! Going back and testing as admin now. But mail is going into a black hole so I might have to wait until morning for it to show up…

    Thread Starter rbmg-wp

    (@rbmg-wp)

    Hmmm. Nope, even as admin, can’t post via postie with Groups activated and see message content in Subscribe2 email.

    Admin has full rights everywhere does it not?

    Thank you for any further thoughts you may have!

    @liz,

    And the default poster set in Postie has all of those capabilities also?

    Thread Starter rbmg-wp

    (@rbmg-wp)

    Hi yes, default poster is admin. But I am posting as a registered user who is also an admin so default poster shouldn’t come into it.

Viewing 15 replies - 16 through 30 (of 33 total)
  • The topic ‘{POST} is empty in live email, but present in preview tests’ is closed to new replies.