Remove the "Subject: " without editing your files
-
Hi
I had been using an old version of Posite which had been working fine and the only reason I was using the old version was down to
-out of memory errors last time I complained
-posts not going online
-the XSS/SQL injection hacks I worked on.However recently I have been seeing lots of tmpTitle and tmpPost posts being created. The real emailed in posts do not appear.
I thought maybe a WP upgrade or security issue e.g me not being logged into my site on a PC as admin when the posts go in was causing this. So I have upgraded this morning.
It seems to have worked for today at least the only issue was that all my posts had “Subject: Blah Blah” prefixed in front of all my posts.
This did not happen before.
Therefore I added in this code to the GetSubject function in postie_functions.php
$subject = preg_replace("@^Subject:\s+@i","",$subject); return $subject
This seems to have fixed it but I don’t know why it has changed.
THe format of the emails going in have never changed so it can only be Postie/WP code.
Is there a better solution to this issue?
Also I see there is an option
Force User Login.
Should I set this to yes to ensure I am always logged in in case the tmp posts are down to me NOT being logged in to the site somewhere as admin as Postie runs its email processing?
By the way I only ever post as myself (e.g admin) and never let anyone else post to the site by email.
Thanks
Rob
-
>It seems to have worked for today at least the only issue was that all my
>posts had “Subject: Blah Blah” prefixed in front of all my posts.I don’t see this on my test system. Please send a sample message to [email protected] and I will take a look.
>Force User Login
This is only necessary if you are trying to use a custom taxonomy with Postie.
I will send one in when I get a chance but today no emails were automatically processed by the system and I had dozens of posts with just tmpPost and tmpTitle in my list.
However when I manually ran the postie job it all seemed to run fine and the posts were processed.
I have an automatic cron job set up which your systems fails to spot as I call the wp_cron.php job with my own cron job every 10 mins to prevent it being called on every page call and overloading the server.
I don’t know if this is a problem or not e.g not finding a cron job???
But automatic = no posts
Manual = posts ok.This is more of a severe issue than the Subject: being in the post.
Thanks
Rob
>I have an automatic cron job set up which your systems fails to spot
Postie just responds to WordPress. If there is some other job which is killing the wp cron run that could keep Postie from running.
You could try kicking off Postie directly with your cron. See https://postieplugin.com/faq/postie-checking-email/
Hi
I already have an automatic cron job set up as that article suggest.
When I run your debug I get this output.
Postie Configuration Test
Postie is in /home/mysite/public_html/wp-content/plugins/postie/
WordPress cron is disabled. Postie will not run unless you have an external cron set up.
Cron: Of (missing f?)
Alternate Cron: Off
iconv: installed
Warning! Postie requires that imap be enabled if you are using IMAP, IMAP-SSL or POP3-SSL. (I do have IMAP installed)
mbstring: installed
Clock Tests
This shows what time it would be if you posted right nowPost time: 2015-04-09 20:47:28 (hour behind my real time – php shows the real time, WP doesn’t)
Connect to Mail Host
Sucessful POP3 connection on port 110
No waiting messagesQuestions
1. I do use an alternate cron, it’s just a WGET job I set up to call the WP Cron job as it’s been disabled, however because I am callingwget -U StrictlyCron -q -O /dev/null https://www.mysite.com/wp-cron.php?doing_wp_cron
and not the example you suggest which says to call postie-get-mail direct
*/5 * * * * /usr/bin/wget -O /dev/null https://mysite.com/?postie=get-mail >/dev/null 2>&1
Will that cause issues?
I would have thought not as the standard CRON job I am calling myself is still running and should call Posite anyway (I would have thought it would) as it used to.
2. It says I do not use IMAP. However I use IMAP to get my emails and SMTP to send them in. Both my Postfix and Dovecot IMAP / POP3 Server are running on the site. Do I need to change settings? I always get back emails from wordpress saying a post has gone on when it has.
Can you see something wrong with this debug output?
Also I post as “admin” so I turned that setting off as you suggested. I will wait and see what happens tomorrow but I didn’t get anything but tmpPost / tmpTitle draft posts today.
The last version that worked was pretty old at least 1+ years old. But at least it worked.
What has changed in the last year that could cause these issues?
I don’t want to really roll back but these tmpPosts are causing a lot of missed posts people pay for and I usually end up doing them by hand which takes time.
There has to be a reason a draft post doesn’t get converted each time it is processed UNLESS by admin manually.
Surely all the settings behind the scenes are the same so the only difference is that it’s the WP Cron job calling it rather than a button clicked by a logged in admin or am I missing something?
Any help would be great.
Thanks
Rob
Hi
Today just another huge batch of draft emails with just tmpPost and tmpTitle in them. However I did have one email that managed to put in the correct title & categories but had no body. This caused problems with mails to my clients as the email was basically blank.
I even added a GET request to my command n control app to fire the get_postie.php command every 5 minutes just to be sure it was being run if any other CRON job wasn’t running it just like I have jobs to ensure the page is
a) in the DB
b) on the website
So I don’t keep sending in emails and log when the job was completed.I can see from my own log files the emails were sent off correctly and if I manually run postie from my PC it loads in the email and sends me confirmation correctly.
I had to add all the emails in by hand today so will be reverting back to the earlier version of the plugin which was 1.4.4 (when I helped with the XSS/SQL injection).
If you can think of what has changed recently or since that version then please let me know.
My process once again
-Runs on a LINUX box, behind cloudflare, all post checks done with my “bypass” cloudflare subdomain to prevent caching.
-My app at certain points of the day generates content on the DB (SQL Server), then a C# process on another machine sends in an email to my site after checking with an API I built it’s not already on there.
-Postie should be fired by my own CRON job to wp-cron run every 10 minutes. Although I think I will keep my postie CRON fire job in just for double safety.
-The emails are processed and published to paying customers (behind paid for categories)
-Some are emailed out once the system knows there is a post on the site.I know updating Jetpack or other WP built plugins (or core code) usually causes problems which is why I loathe to do it. However this old version of Postie has been working for ages now without a problem. I tried upgrading on the same day (coincidence?) that I upgraded some other plugins including Akismet, Cloudflares plugin and Jetpack.
I sent you in an email to that test account by the way. I think the subject issue was to do with some regular expression problems there used to be detecting categories that may have been fixed >> https://blog.strictly-software.com/2012/03/fixing-postie-plugin-for-wordpress-to.html
Hi Rob,
Lots of information and questions.
>I do use an alternate cron, it’s just a WGET job I set up to call the WP Cron job
That should work just fine as long as all the cron tasks play nice.
>Will calling https://mysite.com/?postie=get-mail cause issues
Use one or the other. Postie currently does not check to see if it is already checking for emails.
>It says I do not use IMAP.
Actually is says you don’t have IMAP installed. Postie specifically looks to see if the function imap_mime_header_decode() is defined. This function is part of the IMAP extension. https://php.net/manual/en/book.imap.php If Postie can’t find the function it assumes that the IMAP extension is not installed. This has nothing to do with your email server or email client capacity.
In fact later on your can see that Postie is connecting to you email server via POP3.
>Also I post as “admin” so I turned that setting off as you suggested.
I assume you are talking about the “Force User Login” setting. Leaving this off is recommended unless you are using custom taxonomies.
>What has changed in the last year that could cause these issues?
There have been about 20 releases in the last 12 months. See https://www.ads-software.com/plugins/postie/changelog/ The tmpPost issue has largely gone away for most people so there must be something unique about your site.
>I even added a GET request to my command n control app to fire the get_postie.php
This will not work with current versions of Postie. You need to use https://mysite.com/?postie=get-mail
>reverting back to the earlier version of the plugin which was 1.4.4
1.4.4 was released in 2012 and has not been tested against WordPress 4.x
>There has to be a reason a draft post doesn’t get converted each time it is processed UNLESS by admin manually.
>I tried upgrading on the same day (coincidence?) that I upgraded some other plugins including Akismet, Cloudflares plugin and Jetpack.My guess is that your theme or one of your plugins doesn’t play nice with Postie without an interactively logged in user. The only way to find out is to set up a duplicate system with all plugins disabled except Postie. Test to make sure things are working as expected using wget to kick things off not the debug button. Then add one plugin at at time back testing in between.
I know the old turn them off and turn them on again debug, I can just feel it’s going to be Jetpack for some reason!
I will give it a try over the weekend.
I know it’s an old plugin version but it was the last one that worked for me so I kept with it. Maybe Jetpack came out then?
I wouldn’t be at all surprised by your sentence that it’s to do with an interactive login as I leave my PC open with my website logged in all the time just to be sure. I need a solution as I cannot carry on doing that.
Thanks for all your help
Rob
Hi
Just to let you know
a) I reverted back to the old plugin version which worked perfectly for me
b) I didn’t remove or de-activate any plugins
c) This morning I ensured no PC/Laptop was logged in as admin to my site – all cookies cleared and windows shut.
d) All posts went on correctly.
e) No draft posts existed with tmpTitle or tmpPost at all.
So whilst I don’t want to stick with old code – if it aint broke then don’t fix it they say and it was working fine until I upgraded.
Obviously I want an easy life so I don’t want more trouble n strife by upgrading again without knowing whether I will have days of debugging etc.
Any ideas let me know.
Thanks
Rob
I don’t really have any ideas. Something about your setup is unique. I don’t have any other reports of this issue.
Hi
Today, after upgrading Jetpack (what a surprise!) and trying to add a mobile theme to my site I didn’t have ANY articles emailed onto my system. They had been working fine all week and I am seriously thinking about removing Jetpack, the only real thing I would miss is the automatic sharing of articles to LinkedIn, Facebook, Tumblr and Google+ etc.
I checked my error log file for this morning when an article was going on and I got a whole load of error messages that dom’t actually say what he error is.
I have copied the code below so you can see the error log. And also (interestingly) once I had gone and “re-saved” settings on Posties and some other plugins like my Tweetbot the articles came flooding on. I am going to edit my TweetBot so if the words TmpTitle or TmpPost are in the article then no tweets are sent out. I might have a minimum length option e.g the article must be over 100 characters. This would stop these tmpTitle/Post articles being posted as they are too small in content.
The errors are below – I have changed the domainas and URLs but “error” is real (whatever it actually is)
I thought you could upload files but obviously not.
62.253.141.247 is my application that sends emails IN to the system. I also have a five minute job to run https://www.mywebsite.com/wp-admin/admin.php?page=postie-settings (old version to ensure postie runs whether my CRON job is down or I have just posted some info and want Postie to run ASAP)
Any clues to why these would be appearing in the error log and what they mean?
[Fri Apr 10 11:31:24 2015] [error] [client 62.253.141.247] Postie: tag_Date: Gothic Empire, referer: https://www.mywebsite.com/wp-admin/admin.php?page=postie-settings
[Fri Apr 10 11:31:24 2015] [error] [client 62.253.141.247] Postie: tag_Date: Wolverhampton, referer: https://www.mywebsite.com/wp-admin/admin.php?page=postie-settings
[Fri Apr 10 11:31:24 2015] [error] [client 62.253.141.247] Postie: tag_Date: 20:50, referer: https://www.mywebsite.com/wp-admin/admin.php?page=postie-settings
[Fri Apr 10 11:31:24 2015] [error] [client 62.253.141.247] Postie: tag_Date: 55.56%, referer: https://www.mywebsite.com/wp-admin/admin.php?page=postie-settings
[Fri Apr 10 11:31:24 2015] [error] [client 62.253.141.247] Postie: tag_Date: Glasgow Evening Times (Jeffrey Ross), referer: https://www.mywebsite.com/wp-admin/admin.php?page=postie-settings
[Fri Apr 10 11:31:24 2015] [error] [client 62.253.141.247] Postie: tag_Date: Gothic Empire, referer: https://www.mywebsite.com/wp-admin/admin.php?page=postie-settings
[Fri Apr 10 11:31:24 2015] [error] [client 62.253.141.247] Postie: tag_Date: Wolverhampton, referer: https://www.mywebsite.com/wp-admin/admin.php?page=postie-settings
[Fri Apr 10 11:31:24 2015] [error] [client 62.253.141.247] Postie: tag_Date: 20:50, referer: https://www.mywebsite.com/wp-admin/admin.php?page=postie-settings
[Fri Apr 10 11:31:24 2015] [error] [client 62.253.141.247] Postie: tag_Date: 0.00%, referer: https://www.mywebsite.com/wp-admin/admin.php?page=postie-settings
[Fri Apr 10 11:31:24 2015] [error] [client 62.253.141.247] Postie: tag_Date: Dan King, referer: https://www.mywebsite.com/wp-admin/admin.php?page=postie-settings
[Fri Apr 10 11:31:24 2015] [error] [client 62.253.141.247] Postie: tag_Date: Happydoingnothing, referer: https://www.mywebsite.com/wp-admin/admin.php?page=postie-settings
[Fri Apr 10 11:31:24 2015] [error] [client 62.253.141.247] Postie: tag_Date: Wolverhampton, referer: https://www.mywebsite.com/wp-admin/admin.php?page=postie-settings
[Fri Apr 10 11:31:24 2015] [error] [client 62.253.141.247] Postie: tag_Date: 21:20, referer: https://www.mywebsite.com/wp-admin/admin.php?page=postie-settings
[Fri Apr 10 11:31:24 2015] [error] [client 62.253.141.247] Postie: tag_Date: 50.00%, referer: https://www.mywebsite.com/wp-admin/admin.php?page=postie-settings
[Fri Apr 10 11:31:24 2015] [error] [client 62.253.141.247] Postie: tag_Date: By the My Name, referer: https://www.mywebsite.com/wp-admin/admin.php?page=postie-settings
[Fri Apr 10 11:31:24 2015] [error] [client 62.253.141.247] Postie: tag_Date: , referer: https://www.mywebsite.com/wp-admin/admin.php?page=postie-settings
[Fri Apr 10 11:31:24 2015] [error] [client 62.253.141.247] Postie: post date: 2015-04-10 10:30:58 / 2015-04-10 10:30:58, referer: https://www.mywebsite.com/wp-admin/admin.php?page=postie-settings
[Fri Apr 10 11:31:24 2015] [error] [client 62.253.141.247] Postie: post date: <h4>An HTML Post</h4><p>Test Text</p>
[Fri Apr 10 11:31:24 2015] [error] [client 62.253.141.247] Postie: post type: found format ‘standard’, referer: https://www.mywebsite.com/wp-admin/admin.php?page=postie-settings
[Fri Apr 10 11:31:24 2015] [error] [client 62.253.141.247] Postie: post type: <h4>An HTML Post</h4><p>Test Text</p>
[Fri Apr 10 11:31:24 2015] [error] [client 62.253.141.247] Postie: tag_Categories: found categories, referer: https://www.mywebsite.com/wp-admin/admin.php?page=postie-settings
[Fri Apr 10 11:31:24 2015] [error] [client 62.253.141.247] Postie: Array\n(\n [0] => Array\n (\n [0] => Array\n (\n [0] => [Horse Racing Tips]\n [1] => [Members Tips]\n [2] => [Members NAPS]\n )\n\n [1] => Array\n (\n [0] => Horse Racing Tips\n [1] => Members Tips\n [2] => Members NAPS\n )\n\n )\n\n)\n, referer: https://www.mywebsite.com/wp-admin/admin.php?page=postie-settings
[Fri Apr 10 11:31:24 2015] [error] [client 62.253.141.247] Postie: lookup_category: Horse Racing Tips, referer: https://www.mywebsite.com/wp-admin/admin.php?page=postie-settings
[Fri Apr 10 11:31:24 2015] [error] [client 62.253.141.247] Postie: category: found by name Horse Racing Tips, referer: https://www.mywebsite.com/wp-admin/admin.php?page=postie-settings
[Fri Apr 10 11:31:24 2015] [error] [client 62.253.141.247] Postie: stdClass Object\n(\n [term_id] => 5\n [name] => Horse Racing Tips\n [slug] => horse-racing-tips\n [term_group] => 0\n [term_taxonomy_id] => 5\n [taxonomy] => category\n [description] => Get all your horse racing tips here – Members and Free Tips!\n [parent] => 0\n [count] => 5411\n [filter] => raw\n)\n, referer: https://www.mywebsite.com/wp-admin/admin.php?page=postie-settings
[Fri Apr 10 11:31:24 2015] [error] [client 62.253.141.247] Postie: tag_Categories: subject: [Members Tips] [Members NAPS] Members Horse Racing NAPS for the 10th of April 2015, referer: https://www.mywebsite.com/wp-admin/admin.php?page=postie-settings
[Fri Apr 10 11:31:24 2015] [error] [client 62.253.141.247] Postie: lookup_taxonomy: 5 is in taxonomy category, referer: https://www.mywebsite.com/wp-admin/admin.php?page=postie-settings
[Fri Apr 10 11:31:24 2015] [error] [client 62.253.141.247] Postie: lookup_category: Members Tips, referer: https://www.mywebsite.com/wp-admin/admin.php?page=postie-settings
[Fri Apr 10 11:31:24 2015] [error] [client 62.253.141.247] Postie: category: found by name Members Tips, referer: https://www.mywebsite.com/wp-admin/admin.php?page=postie-settings
[Fri Apr 10 11:31:24 2015] [error] [client 62.253.141.247] Postie: stdClass Object\n(\n [term_id] => 3071\n [name] => Members Tips\n [slug] => members-tips\n [term_group] => 0\n [term_taxonomy_id] => 3076\n [taxonomy] => category\n [description] => Members view your daily high ROI tips here!\n [parent] => 5\n [count] => 2838\n [filter] => raw\n)\n, referer: https://www.mywebsite.com/wp-admin/admin.php?page=postie-settings
[Fri Apr 10 11:31:24 2015] [error] [client 62.253.141.247] Postie: tag_Categories: subject: [Members NAPS] Members Horse Racing NAPS for the 10th of April 2015, referer: https://www.mywebsite.com/wp-admin/admin.php?page=postie-settings
[Fri Apr 10 11:31:24 2015] [error] [client 62.253.141.247] Postie: lookup_taxonomy: 3071 is in taxonomy category, referer: https://www.mywebsite.com/wp-admin/admin.php?page=postie-settings
[Fri Apr 10 11:31:24 2015] [error] [client 62.253.141.247] Postie: lookup_category: Members NAPS, referer: https://www.mywebsite.com/wp-admin/admin.php?page=postie-settings
[Fri Apr 10 11:31:24 2015] [error] [client 62.253.141.247] Postie: category: found by name Members NAPS, referer: https://www.mywebsite.com/wp-admin/admin.php?page=postie-settings
[Fri Apr 10 11:31:24 2015] [error] [client 62.253.141.247] Postie: stdClass Object\n(\n [term_id] => 24596\n [name] => Members NAPS\n [slug] => members-naps\n [term_group] => 0\n [term_taxonomy_id] => 24618\n [taxonomy] => category\n [description] => NAPS from over 62 top tipsters that can be viewed by Members\n [parent] => 5\n [count] => 316\n [filter] => raw\n)\n, referer: https://www.mywebsite.com/wp-admin/admin.php?page=postie-settings
[Fri Apr 10 11:31:24 2015] [error] [client 62.253.141.247] Postie: tag_Categories: subject: Members Horse Racing NAPS for the 10th of April 2015, referer: https://www.mywebsite.com/wp-admin/admin.php?page=postie-settings
[Fri Apr 10 11:31:24 2015] [error] [client 62.253.141.247] Postie: lookup_taxonomy: 24596 is in taxonomy category, referer: https://www.mywebsite.com/wp-admin/admin.php?page=postie-settings
[Fri Apr 10 11:31:24 2015] [error] [client 62.253.141.247] Postie: post category: <h4>An HTML Post</h4><p>Test Text</p>
[Fri Apr 10 11:31:24 2015] [error] [client 62.253.141.247] Postie: post comment: <h4>An HTML Post</h4><p>Test Text</p>
[Fri Apr 10 11:31:24 2015] [error] [client 62.253.141.247] Postie: post custom: <h4>An HTML Post</h4><p>Test Text</p>
[Fri Apr 10 11:31:24 2015] [error] [client 62.253.141.247] Postie: GetParentPostForReply: Looking for parent ‘Members Horse Racing NAPS for the 10th of April 2015’, referer: https://www.mywebsite.com/wp-admin/admin.php?page=postie-settings
[Fri Apr 10 11:31:24 2015] [error] [client 62.253.141.247] Postie: GetParentPostForReply: No parent found, referer: https://www.mywebsite.com/wp-admin/admin.php?page=postie-settings
[Fri Apr 10 11:31:24 2015] [error] [client 62.253.141.247] Postie: Not a reply, referer: https://www.mywebsite.com/wp-admin/admin.php?page=postie-settings
[Fri Apr 10 11:31:24 2015] [error] [client 62.253.141.247] Postie: filter_Newlines: filternewlines, referer: https://www.mywebsite.com/wp-admin/admin.php?page=postie-settings
[Fri Apr 10 11:31:24 2015] [error] [client 62.253.141.247] Postie: filter_Newlines: convertnewline: 0, referer: https://www.mywebsite.com/wp-admin/admin.php?page=postie-settings
[Fri Apr 10 11:31:24 2015] [error] [client 62.253.141.247] Postie: post newline: <h4>An HTML Post</h4><p>Test Text</p>
[Fri Apr 10 11:31:24 2015] [error] [client 62.253.141.247] Postie: images in post: 0, referer: https://www.mywebsite.com/wp-admin/admin.php?page=postie-settings
[Fri Apr 10 11:31:24 2015] [error] [client 62.253.141.247] Postie: Array\n(\n)\n, referer: https://www.mywebsite.com/wp-admin/admin.php?page=postie-settings
[Fri Apr 10 11:31:24 2015] [error] [client 62.253.141.247] Postie: Auto gallery: none, referer: https://www.mywebsite.com/wp-admin/admin.php?page=postie-settings
[Fri Apr 10 11:31:24 2015] [error] [client 62.253.141.247] Postie: auto adding images to end, referer: https://www.mywebsite.com/wp-admin/admin.php?page=postie-settings
[Fri Apr 10 11:31:24 2015] [error] [client 62.253.141.247] Postie: post body ReplaceImagePlaceHolders: <h4>An HTML Post</h4><p>Test Text</p>
[Fri Apr 10 11:31:24 2015] [error] [client 62.253.141.247] Postie: Post Author: 1, referer: https://www.mywebsite.com/wp-admin/admin.php?page=postie-settings
[Fri Apr 10 11:31:24 2015] [error] [client 62.253.141.247] Postie: Date: 2015-04-10 10:30:58, referer: https://www.mywebsite.com/wp-admin/admin.php?page=postie-settings
[Fri Apr 10 11:31:24 2015] [error] [client 62.253.141.247] Postie: Category: 5, referer: https://www.mywebsite.com/wp-admin/admin.php?page=postie-settings
[Fri Apr 10 11:31:24 2015] [error] [client 62.253.141.247] Postie: Category: 3071, referer: https://www.mywebsite.com/wp-admin/admin.php?page=postie-settings
[Fri Apr 10 11:31:24 2015] [error] [client 62.253.141.247] Postie: Category: 24596, referer: https://www.mywebsite.com/wp-admin/admin.php?page=postie-settings
[Fri Apr 10 11:31:24 2015] [error] [client 62.253.141.247] Postie: Ping Status: open, referer: https://www.mywebsite.com/wp-admin/admin.php?page=postie-settings
[Fri Apr 10 11:31:24 2015] [error] [client 62.253.141.247] Postie: Comment Status: open, referer: https://www.mywebsite.com/wp-admin/admin.php?page=postie-settings
[Fri Apr 10 11:31:24 2015] [error] [client 62.253.141.247] Postie: Subject: Members Horse Racing NAPS for the 10th of April 2015, referer: https://www.mywebsite.com/wp-admin/admin.php?page=postie-settings
[Fri Apr 10 11:31:24 2015] [error] [client 62.253.141.247] Postie: Postname: members-horse-racing-naps-for-the-10th-of-april-2015, referer: https://www.mywebsite.com/wp-admin/admin.php?page=postie-settings
[Fri Apr 10 11:31:24 2015] [error] [client 62.253.141.247] Postie: Post Id: 33436, referer: https://www.mywebsite.com/wp-admin/admin.php?page=postie-settings
[Fri Apr 10 11:31:24 2015] [error] [client 62.253.141.247] Postie: Post Type: post, referer: https://www.mywebsite.com/wp-admin/admin.php?page=postie-settings
[Fri Apr 10 11:35:30 2015] [error] [client 62.253.141.247] Postie: MailToRecipients: send mail, referer: https://www.mywebsite.com/wp-admin/admin.php?page=postie-settings
[Fri Apr 10 11:35:30 2015] [error] [client 62.253.141.247] Postie: To: [email protected], referer: https://www.mywebsite.com/wp-admin/admin.php?page=postie-settings
[Fri Apr 10 11:35:30 2015] [error] [client 62.253.141.247] Postie: From: WordPress <[email protected]>\r\n, referer: https://www.mywebsite.com/wp-admin/admin.php?page=postie-settings
[Fri Apr 10 11:35:30 2015] [error] [client 62.253.141.247] Postie: MailToRecipients: Successfully posted to My Name\nYour post ‘Subject: [Horse Racing Tips] [Members Tips] [Members NAPS] Members Horse Racing NAPS for the 10th of April 2015’ has been successfully published to My Name <https://www.mywebsite.com/2015/04/members-horse-racing-naps-for-the-10th-of-april-2015/>.\n, referer: https://www.mywebsite.com/wp-admin/admin.php?page=postie-settings
[Fri Apr 10 11:35:42 2015] [error] [client 62.253.141.247] Postie: Done, referer: https://www.mywebsite.com/wp-admin/admin.php?page=postie-settings
[Fri Apr 10 11:35:42 2015] [error] [client 62.253.141.247] Postie: Mail fetch complete, 1 emails, referer: https://www.mywebsite.com/wp-admin/admin.php?page=postie-settings
[Fri Apr 10 11:35:42 2015] [error] [client 62.253.141.247] Postie: memory at end of email processing:113040672, referer: https://www.mywebsite.com/wp-admin/admin.php?page=postie-settingsThanks for all your help on this by the way!
These aren’t really errors. Unfortunately PHP doesn’t have a good way to log information so I have to use the error logging mechanism.
I knew it,
It was Jetpack!
I turned Jetpack off and now it’s all working fine again.
Why I have no idea.
It’s just a shame as it was good for getting my content into LinkedIn, Tumblr and Google+ now I will have to find a new way of doing it.
Twitter and Facebook is easy as I just use my TweetBOT to sent to multiple Twitter accounts that are easily linked to Facebook pages.
Shame!
Thanks for your help! Just shows that even WordPress core developers are not always brilliant!
Thanks
Rob
Hi
I was just wondering if you could help me out as Jetpack (WP) have replied to me with the following email. It seems if I turn off their Publicize (Social Media Sharing) option I don’t get ANY problems with your Postie plugin. All emails go in, get posted, tagged and tweets go out. There are no long lists of draft posts with tmpTitle etc.
Why this effects your plugin I am not sure but the proof is in the pudding as they say.
The email I got back from Jetpack support after I explained what I was doing and the problems their plugin caused is below.
Hi Rob!
> Therefore I am thinking your plugin and others like it are doing calls on the
> publish_post hook and this is causing no tagging to be done or tweets to go out
> even if your social media posts go out.Here’s what I suggest: have a look at the Publicize code (at least, what’s in the plugin, since a lot of Publicize happens on the WordPress.com side of things).
https://github.com/Automattic/jetpack/blob/master/modules/publicize/publicize.php#L68
We hook into the transition_post_status hook; when a post goes from draft or unsaved to Published, that’s when we start saving the related Post-meta as you mentioned.
If you don’t find an adequate place in the plugin that you can hook into for what you’re doing with your own plugins, then please open up an enhancement request here:
https://github.com/Automattic/jetpack/issues/new
and specify that you’d like a hook added to the plugin, and where exactly.
Does that help?
So as I know Jetpack is the problem I am wondering if you have any ideas about new hooks that I could request.
Turning off the Jetpack Publicize option has totally fixed the tmpTitle tmpPost issue and all posts are going on to the site fine now.
However this means I am missing out on content going to numerous social media outlets.
As I link my Twitter account to Facebook I still have those two working due to my plugin Strictly TweetBot however I think the issue is how my plugins, yours and Jetpacks Publicize interact. What and Why I have no clue. All I can give you is details of how my own plugins interact and run once your Postie plugin makes them live from the emails I send in.
I have an AutoTagger Plugin (Strictly AutoTags) that the save_post action fires (draft/publicize) to tag the post.
Then after the tagging is complete I want Jetpacks Publicize event to fire sending out the messages to Google+, Tumblr, LinkedIn etc.
Due to the high number of tags I have on my site 25,000+ just changing the priority order doesn’t work to ensure tweets are sent out AFTER the tagging is done. On small sites it might. However I have to re-save the newly tagged and reformatted post back into the DB before calling my other plugin Strictly TweetBOT (that fires tweets using tags as #hashtags to numerous accounts).
So what happens is that after the post is saved I
-Open the post and do the tagging, re-save using SQL only
-Set a finished_doing_tagging action/event with the post_id so other plugins can run off it e.g my TweetBot// fire my custom event so any plugin wanting to run when tagging is completed can now do so pass in the post ID as the parameter so others can use it do_action('finished_doing_tagging', $object->ID);
-The Strictly TweetBOT plugin uses the publish_post action to call a function
add_action( 'publish_post', array($this, 'CheckAndPostTweets') , 999);
CheckAndPostTweets, which works out whether AutoTags is also installed. If not it just runs and sends the tweets. If it is then it adds our PostTweets function to the finished_doing_tagging hook/event
if($strictly_auto_tags_active ){ // AutoTags is active - have we tweeted already? $tweeted_already = get_post_meta($post_id, 'strictlytweetbot_posted_tweet', true); if(!$tweeted_already){ // Strictly AutoTags is loaded so wait until the finished_doing_tagging event fires for $post_id // hook post_tweets into our finished_doing_tagging HOOK/EVENT add_action('finished_doing_tagging',array($this, 'PostTweets'),99,1); }else{ // Strictly AutoTags is loaded but we have already tweeted! so RETURN FALSE! return; } }else{ // no Strictly AutoTags and no tags/categories so just post tweets now for $post_id // just run normal tweet code $this->PostTweets($post_id); }
Once Tweeting is complete I set some post meta to tell me that this post has had the tweetbot code run against it.
// after tweeting we set the event strictlytweetbot_posted_tweet so we know we have posted tweets for this post id add_post_meta($post_id, 'strictlytweetbot_posted_tweet', '1', true);
So somewhere I need to ask JetPack to get their Publicize code to run on the same hook I have finished_doing_tagging. Or (as I doubt they will change their code to fit in with MY plugins) arrange the order of events in such a way that I can fire their publicize function once my tagging is complete.
As for why their Publicize action is effecting the change of your posts from temp posts to real ones I have no idea unless it’s my tagging plugin effecting it in someway.
Ideas?
Thanks – and anyone can pipe in if they want!!
I think the next step is to set the following constants in your wp-config.php
define('WP_DEBUG', true); define('WP_DEBUG_LOG', true); define('POSTIE_DEBUG', true);
Turn Publicize back on and run a couple of emails through then send the log file to [email protected]. You can find the error log location by clicking “Test Config” on the Postie admin page.
- The topic ‘Remove the "Subject: " without editing your files’ is closed to new replies.