Support Forum
Ah, that makes more sense. I was already headed down that same path, in fact.
Seems to do the trick! Here's the header from and reply-to:
From: Phit-N-Phat <tech.support.issues@phit-n-phat.mailgun.org>
Reply-To: tech.support.issues@phit-n-phat.mailgun.org I wonder whether sp_emailpost_replyto() should call sp_emailpost_newpost() to grab the forum e-mail address, or whether we can count on it being populated already in all cases? It certainly is populated in this case, so that's good definitely. And still something is not right with the filters because the reply instructions get doubled somewhere along the line (e.g.): [-- To reply by email insert your text above this line - instructions below --] [-- To reply by email insert your text above this line - instructions below --] New post on a forum or topic you are subscribed to at Phit-N-Phat: From: The King Group: Tech Support Forum: Issues Topic: Testing #5621 URL: http://www.phit-n-phat.com/forum/issues/testing-5621/#p3859 Post: asdf To unsubscribe, please visit your profile: http://www.phit-n-phat.com/forum/profile/?ptab=subscriptions&pmenu=topic-subscriptions * To post a reply by email * - please remove all old text from ABOVE the insert line at the top and enter your plain text reply above it. Do not remove ANY of this email text. Please remember that your reply may not appear immediately in the forum * To start a new topic in this forum * - send your email to mailto:tech.support.issues@phit-n-phat.mailgun.org. The subject name will become the new topic title [--id=#testing-5621#--] * To post a reply by email * - please remove all old text from ABOVE the insert line at the top and enter your plain text reply above it. Do not remove ANY of this email text. Please remember that your reply may not appear immediately in the forum * To start a new topic in this forum * - send your email to mailto:tech.support.issues@phit-n-phat.mailgun.org. The subject name will become the new topic title [--id=#testing-5621#--]
I think I see why it's doubling.
In sp-email-post-plugin.php, it has 'sp_emailpost_add_email_link' being called on two different filter tags:
add_filter('sph_admin_email', 'sp_emailpost_add_email_link', 10, 3);
add_filter('sph_subscriptions_notification_email', 'sp_emailpost_add_email_link', 10, 3);
So if you're subscribed and an admin, you get the double "To reply by email insert your text above this line - instructions below" message.
Thinking it would be more foolproof to teach sp_emailpost_do_add_email_link() to test that it hasn't already done its job before adding the top and bottom text again than to troubleshoot multiple paths through multiple filters for users in multiple roles.
Maybe it's as easy as testing the top of the message for the exact match? Not sure.
thanks!
if you are an admin receiving new post notifications, why would you subscribe to topics?? sorry, dont understand that logic..
if you just want to watch a topic and not subscribe, then use the watches plugin and watch it...
Visit Cruise Talk Central and Mr Papa's World
As an admin, I actually only subscribe to the tech support forum and so I don't get admin new post notifications. But because I am an admin and a subscriber, the filter is doubling the insertion points in the message (even though I don't actually get admin notifications of new posts).
In any case, I would think it would be a good safeguard to have just in case a user ever ended up in a dual role where he might receive a notification in either role and will see this same doubling behavior.
But I suppose I can live with it if you guys don't think it worth fixing. Thanks!
OH my... that's an awful lot to read through and make sense of before the caffeine kicks in!
Can I recap? As far as I can see there seem to be two issues. A filter in the subscriptions plugin that seems to have been knocked off course recently is that correct? You and Steve appear to have a fix in place for that so we need to investigate why it changed here and correct it for the next update.
And multiple 'headers' in the email because you are an 'Admin', a 'Moderator' and a 'Subscriber'. Yes? Well Steve is right in asking why would you subscribe if you also get Admin notifications. And I actually DO think this is a hole worth plugging and believe the is actually a ticket opened in our system for this. If not I will open one.
It is the 'Moderator' part that I am curious about. Does this mean that you, as a forum 'Admin' have become a member of a 'moderators' user group? If we allow that then again - I suspect something has been knocked we need to fix as well.
YELLOW
SWORDFISH
|
Yes, I think this recap is accurate.
To clarify the roles of my test account that is getting the double headers, here is the situation. I muddied the waters on this for sure, as I was confused as well.
The user is a WP Admin and a SP Moderator. The user is NOT a SPF Admin.
I made that user a SP Moderator so that I could test Moderators-only being able to Reply via email as part of testing PBE. Eventually it won't matter, as every user will have PBE capabilities, but I didn't want to turn it on for them until I had it all working.
So I'm not sure that part of it is really an issue or not. The main thing seems to be that a check for pre-existing PBE tags is in order before inserting more of them.
Thanks!
1 Guest(s)