Support Forum

Errors when posting on forum with Post by Email plugin enabled

DH Dave Hughes
Dave Hughes
Member

I installed and activated the Post by Email plugin, created the necessary email accounts, configured the Options > Email Settings and gave my users permission to create new topics and reply by email. I was able to create a new topic by sending an email to one of my new forum email addresses. I was also able to reply to an email received as a result of a  subscription to a forum, and the reply was successfully posted to the forum.

However, I discovered a nasty side effect of having the Post by Email plugin running. When I try to create a new forum topic directly on the website, the web page goes blank and the following list of errors appears:

Warning: Missing argument 2 for sp_emailpost_replyto() in /problem-with-post-edit-buttonome/problem-with-post-edit-buttonmacwrks/public_html/crescentcitycyclists.org/wp-content/sp-resources/forum-plugins/post-by-email/sp-email-post-plugin.php on line 197

…… this line repeated 14 times ……

Warning: Missing argument 2 for sp_emailpost_replyto() in /problem-with-post-edit-buttonome/problem-with-post-edit-buttonmacwrks/public_html/crescentcitycyclists.org/wp-content/sp-resources/forum-plugins/post-by-email/sp-email-post-plugin.php on line 197

Warning: Cannot modify header information – headers already sent by (output started at /problem-with-post-edit-buttonome/problem-with-post-edit-buttonmacwrks/public_html/crescentcitycyclists.org/wp-content/sp-resources/forum-plugins/post-by-email/sp-email-post-plugin.php:197) in /problem-with-post-edit-buttonome/problem-with-post-edit-buttonmacwrks/public_html/crescentcitycyclists.org/wp-includes/pluggable.php on line 876

This happened several times. If I click the browser back button, the site reappears and everything is fine. It even posted my new topic to the forum. This would obviously freak out my users so I disabled the Post by Email plugin. How can I fix this issue?

 

 

22 Answers

New Answer

YS Yellow Swordfish
Yellow Swordfish
Member

That doesn’t really make a lot of sense! Can you try something for me as a quick test? Could you activate the Post By Email plugin but deactivate the Subscriptions plugin and then see if you get the same result?

As a general rule, php recommends that production – i.e. live – sites do not display ‘Warnings’ (as per the above) and ‘Notices’ to the screen. Firstly it frightens people! and secondly it reveals the path of your site on your server.

I would seriously consider asking your host why you are seeing these and if they can be turned off – it is an edit to the php ini file in the server. And the same warning/notice information is available in the error log after all.

DH Dave Hughes
Dave Hughes
Member

Your suspicion was correct. It seems to be an interaction between Post by Email and Subscriptions. I activated PbE and deactivated Subs and the errors did not appear when I posted a new topic to the forum. However, when I reactivated Subs and posted a new topic I got the same error messages.

My site is hosted on HostGator. They have a PHP QuickConfig in cPanel. I looked there and found a setting for “display_errors” which was on. I turned this off and tried posting a topic with both plugins enabled and did not see the warning messages.

 

MP Mr Papa
Mr Papa
Member

thanks for the update – not sure why many sites default to those errors displayed – should only be on dev sites not production…

will let Andy follow up where he was going with the order tomorrow…

DH Dave Hughes
Dave Hughes
Member

I had posted this comment by accident on another thread regarding issues with the Template Tags plugin.

I have a new development related to this issue. Since I deactivated Subscriptions to do the test you requested and turned it back on, now the Forum Subscriptions button is not appearing in the user Profile under the Subscriptions tab. How do I get this back?

However, I have now resolved this by turning off users ability to subscribe to forums, then turning it back on.

 

 

DH Dave Hughes
Dave Hughes
Member

I am still having problems getting Post by Email working. I posted a message directly on one of my forums asking members to test the PbE function. Below is how the message looked on my test user account, which is subscribed to the forum. The instruction lines at the beginning and end are repeated 17 times.

Also, the reply to address of the email is my site admin address, not the address I set up for PbE replies to the forum. So the replies are coming directly to me, not the forum!

I thought I had carefully followed all the instructions for configuring PbE, but if it’s working for others, I must have missed something.

 

Crescent City Cyclists <cxxxxxs@xxxxx.com>
To: Dave Hughes <axxxxxe@xxxxx.com>
Forum Post – Crescent City Cyclists: [Need help testing Post by Email feature]

[– To reply by email insert your text above this line – instructions below –]

[– To reply by email insert your text above this line – instructions below –]

*
*
*

(repeated a total of 17 times)

*
*
*

[– To reply by email insert your text above this line – instructions below –]

New post on a forum or topic you are subscribed to at Crescent City Cyclists:

From: Webmaster
Group: Forum Categories
Forum: CCC Website
Topic: Need help testing Post by Email feature
URL: http://crescentcitycyclists.org/forum/website-forum/need-help-testing-post-by-email-feature/#p153

Post:
OK, I have the Post by Email plugin installed and configured. It seems to be working, but I need some other members to test it to be sure. If you are subscribed to this forum you should receive an email notification of this post. Try posting a reply by following the instructions in the notification email. The website only checks for incoming email every ten minutes so it may take that long before your reply appears on the forum.

You can also try posting a new topic to this forum category by sending an email message to:

wxxxxxm@crescentcitycyclists.org

To unsubscribe, please visit your profile: http://crescentcitycyclists.org/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:wxxxxxm@crescentcitycyclists.org. The subject name will become the new topic title

[–id=#need-help-testing-post-by-email-feature#–]

* 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:wxxxxxm@crescentcitycyclists.org. The subject name will become the new topic title

[–id=#need-help-testing-post-by-email-feature#–]

*
*
*

(repeated a total of 17 times)

*
*
*

* 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:wxxxxxm@crescentcitycyclists.org. The subject name will become the new topic title

[–id=#need-help-testing-post-by-email-feature#–]

 

 

YS Yellow Swordfish
Yellow Swordfish
Member

I am going to skip over this last post for a bit and go back to where we were.

There is actually a small bug in the Subscriptions plugin (which was the cause of the screen errors) which requires a small code edit to bot that and to the Post By Email plugin.

I can give you details of these small changes if you are happy to make then – or – we will hopefully be getting an official update out of the door pretty soon. Which would you prefer?

 

DH Dave Hughes
Dave Hughes
Member

It seems to me the repeating lines in the emails might be related to the repeating errors I was seeing before turning off the display errors flag in php.

Please send the changes to the plugin files as I would like to get this working ASAP since my membership is waiting for it. But what about the fact that the reply to address in the subscription emails is NOT the forum’s PbyE address? Will this  also be fixed by the patches?

 

MP Mr Papa
Mr Papa
Member

see this post for quick fix:  https://simple-press.com/support-forum/sp5-plugin-topics/post-by-email-fromreply-to-address/page-2/#p120923

and look at post #18 too (20 was an update)…

DH Dave Hughes
Dave Hughes
Member

I read that entire thread to help me understand the context of the changes, but I was unable to follow your instructions.

leave it me to type it in a rush as I had to run… what I wanted you to enter is
add_filter(‘sph_subscriptions_email_replyto’,                                        ‘sp_emailpost_replyto’, 1, 2);

When I looked in the sp-email-post-plugin.php file, that line was already there.

but that wont be enough since it expects two args…   you would need to also edit subscriptions… find
            $replyto = apply_filters(‘sph_subscriptions_email_replyto’, ”);
and change to
            $replyto = apply_filters(‘sph_subscriptions_email_replyto’, ”, $newpost);

I was unable to find that line in sp-subscriptions-plugin.php. If that’s not the correct file, where should I be looking?

 

YS Yellow Swordfish
Yellow Swordfish
Member

Sorry we missed that off.

It is in the file sp-subscriptions-components.php which is in the /library folder.
The line of code is near the bottom of the function called sp_subscriptions_do_post_notification()

Also – be careful to note that the middle argument there is two single quotes with no spaces NOT a double quote character.

DH Dave Hughes
Dave Hughes
Member

Thanks, Andy. I made that change in sp-subscriptions-components.php and it does seem to have fixed the problems. No multiple instruction lines in the outgoing emails and the from address is the address of the forum, so replies are correctly posting to the forum.

However, I noticed that single carriage returns are being stripped out of the reply emails when posted to the forum. I sent the following email message to create a new topic in the forum describing a bike ride. When it appeared in the forum all the text was run together except where there were two consecutive carriage returns (just above the name and phone number).

Screen-Shot-2013-02-10-at-12.02.54-PM.pngScreen-Shot-2013-02-10-at-12.09.09-PM.png

This is not really acceptable since it makes the post much harder to read and extract the important information. I hope that you will address this in a future release of the plugin.

 

YS Yellow Swordfish
Yellow Swordfish
Member

It is not quite that simple, The main problem we have here is that every email client seems to do it’s own thing as far as internal codings go. We try and work and iron them out as they become apparent. This one of yours is totally new. What client is being used here?

DH Dave Hughes
Dave Hughes
Member

Well, it looks like I still have a major problem. Starting and replying to topics by email is working properly. However, I still have a problem with topics actually started ON the forum. Everyone looks like the one below. Any idea what is causing this?

 

Begin forwarded message:

From: Crescent City Cyclists <country-forum@crescentcitycyclists.org>
Subject: Forum Post – Crescent City Cyclists: [Nice to see you all on your Fishy Ride!]
Date: February 10, 2013 1:51:03 PM CST
To: abitadave@gmail.com
Reply-To: country-forum@crescentcitycyclists.org

[– To reply by email insert your text above this line – instructions below –]

[– To reply by email insert your text above this line – instructions below –]

[– To reply by email insert your text above this line – instructions below –]

[– To reply by email insert your text above this line – instructions below –]

[– To reply by email insert your text above this line – instructions below –]

[– To reply by email insert your text above this line – instructions below –]

[– To reply by email insert your text above this line – instructions below –]

[– To reply by email insert your text above this line – instructions below –]

[– To reply by email insert your text above this line – instructions below –]

[– To reply by email insert your text above this line – instructions below –]

[– To reply by email insert your text above this line – instructions below –]

[– To reply by email insert your text above this line – instructions below –]

[– To reply by email insert your text above this line – instructions below –]

[– To reply by email insert your text above this line – instructions below –]

[– To reply by email insert your text above this line – instructions below –]

[– To reply by email insert your text above this line – instructions below –]

[– To reply by email insert your text above this line – instructions below –]

[– To reply by email insert your text above this line – instructions below –]

[– To reply by email insert your text above this line – instructions below –]

[– 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 Crescent City Cyclists:

From: Robert Monahan
Group: Forum Categories
Forum: Country Rides
Topic: Nice to see you all on your Fishy Ride!
URL: http://crescentcitycyclists.org/forum/country-forum/nice-to-see-you-all-on-your-fishy-ride/#p186

Post:
Good to see Babs, Art, Janis, and the rest this morning including the tandem with a disc brake!

Braving the rain…

Lots of nice white arrows also!  However the rangers were spray painting black paint over the arrows on the trace…no painting arrows on the trace! May want to try chalk….works good washes off…

And yes trace is really closed even though the surface is fine…to Neslo…as I was turned around by a ranger…

Hope the weateher holds for Tuesday…

To unsubscribe, please visit your profile: http://crescentcitycyclists.org/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:country-forum@crescentcitycyclists.org. The subject name will become the new topic title

[–id=#nice-to-see-you-all-on-your-fishy-ride#–]

* 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:country-forum@crescentcitycyclists.org. The subject name will become the new topic title

[–id=#nice-to-see-you-all-on-your-fishy-ride#–]

* 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:country-forum@crescentcitycyclists.org. The subject name will become the new topic title

[–id=#nice-to-see-you-all-on-your-fishy-ride#–]

* 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:country-forum@crescentcitycyclists.org. The subject name will become the new topic title

[–id=#nice-to-see-you-all-on-your-fishy-ride#–]

* 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:country-forum@crescentcitycyclists.org. The subject name will become the new topic title

[–id=#nice-to-see-you-all-on-your-fishy-ride#–]

* 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:country-forum@crescentcitycyclists.org. The subject name will become the new topic title

[–id=#nice-to-see-you-all-on-your-fishy-ride#–]

* 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:country-forum@crescentcitycyclists.org. The subject name will become the new topic title

[–id=#nice-to-see-you-all-on-your-fishy-ride#–]

* 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:country-forum@crescentcitycyclists.org. The subject name will become the new topic title

[–id=#nice-to-see-you-all-on-your-fishy-ride#–]

* 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:country-forum@crescentcitycyclists.org. The subject name will become the new topic title

[–id=#nice-to-see-you-all-on-your-fishy-ride#–]

* 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:country-forum@crescentcitycyclists.org. The subject name will become the new topic title

[–id=#nice-to-see-you-all-on-your-fishy-ride#–]

* 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:country-forum@crescentcitycyclists.org. The subject name will become the new topic title

[–id=#nice-to-see-you-all-on-your-fishy-ride#–]

* 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:country-forum@crescentcitycyclists.org. The subject name will become the new topic title

[–id=#nice-to-see-you-all-on-your-fishy-ride#–]

* 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:country-forum@crescentcitycyclists.org. The subject name will become the new topic title

[–id=#nice-to-see-you-all-on-your-fishy-ride#–]

* 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:country-forum@crescentcitycyclists.org. The subject name will become the new topic title

[–id=#nice-to-see-you-all-on-your-fishy-ride#–]

* 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:country-forum@crescentcitycyclists.org. The subject name will become the new topic title

[–id=#nice-to-see-you-all-on-your-fishy-ride#–]

* 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:country-forum@crescentcitycyclists.org. The subject name will become the new topic title

[–id=#nice-to-see-you-all-on-your-fishy-ride#–]

* 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:country-forum@crescentcitycyclists.org. The subject name will become the new topic title

[–id=#nice-to-see-you-all-on-your-fishy-ride#–]

* 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:country-forum@crescentcitycyclists.org. The subject name will become the new topic title

[–id=#nice-to-see-you-all-on-your-fishy-ride#–]

* 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:country-forum@crescentcitycyclists.org. The subject name will become the new topic title

[–id=#nice-to-see-you-all-on-your-fishy-ride#–]

* 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:country-forum@crescentcitycyclists.org. The subject name will become the new topic title

[–id=#nice-to-see-you-all-on-your-fishy-ride#–]

* 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:country-forum@crescentcitycyclists.org. The subject name will become the new topic title

[–id=#nice-to-see-you-all-on-your-fishy-ride#–]

DH Dave Hughes
Dave Hughes
Member

Sorry I posted the previous message before seeing your last reply.

It is not quite that simple, The main problem we have here is that every email client seems to do it’s own thing as far as internal codings go. We try and work and iron them out as they become apparent. This one of yours is totally new. What client is being used here?

I was using Apple Mail under Mac OS X Mountain Lion.