Home › Forums › Newsletter Plugin Support › Feed by mail: Testmail with $last_run allways -1
- This topic has 7 replies, 2 voices, and was last updated 9 years, 10 months ago by Stefano.
May 22, 2013 at 10:34 pm #8318
is it possible to make the testmail of the feed by mail module use the true $last_run? The problem is that I cannot preview and test it correctly with new and old posts, but only with a run of a real feed by mail newsletter.
I did some tricks like setting $last_run to date() minus some days, but I allways have to edit this in the theme.php and disable it again before I send a real email-newsletter.
Would be great to get a solution for $last_run being the real last run instead of “-1”. Of course I know that the preview does not know if there will be another new post being published before the cron runs, but that doesn’t matter.
Thanks!May 22, 2013 at 11:41 pm #8321
Yes, probably it’s a better idea than using -1. But -1 should produce half posts as new and half posts as old, which is good to test a theme.
Stefano.May 23, 2013 at 5:38 pm #8325
In my case the half/half does not work. Don’t know why. All posts are allways shown as new.
But the real problem is: My customer is very irritated if the preview does not look like the final feed by mail.
So is it possible to use the real $last_run in preview and testmail or is there any issue?May 23, 2013 at 9:35 pm #8331
Hi, I found out and it’s an error on the post list split. The test is called from the index.php file passing zero instead of -1. -1 has been introduced to solve the problem for the first run.
So the code on index.php should be changed on line 73.
The is the theme, actually, that detect a -1 on last run and splits the post in half and half, but this behaviour will be moved to the general split function of WordPress.
Note that the test feature as described is recent so not all theme are doing the right thing.
I’ll load a new version of feed extension tonight.
More, apart this issue, advise your customer that email will have always a different layout than tested since the new posts can be from 1 to max.
Stefano.May 23, 2013 at 9:43 pm #8332
Thank you, with -1 it works now correct with the split.
But I don’t understand why you can’t use the real $last_run date also in test-mode. Sure there can come some more new posts after testing, but the customer of course knows, when he publishs new posts, so that is not a real issue.
Or where is the problem to use the real $last_run?May 23, 2013 at 9:45 pm #8333
Yes, it’s reasonable to use the last run, even if on first installation the test is used to see “how generally the email will look like”.
Once a test looks correct with a mix of new and old posts, you’ll know the emails will be composed correctly.
Stefano.May 23, 2013 at 9:47 pm #8334
Hm, I think you are right. It’s only important if it generally looks correct. OK, so with -1 it is fine I think.
Thanks!May 23, 2013 at 9:53 pm #8335
Actually on old feed by mail there was an option to select the “last run”: 1 day, 2 days, 5 days, 10 days ago just to make test… bu it was a confusing options so I decided to remove it…
- You must be logged in to reply to this topic.