• Resolved Dave Bergschneider

    (@dave-bergschneider)


    Hi,

    This plugin works fine however I recently learned that if a host like Hostgator and a few others strip priveleges from wp-cron.php, this plugin will cease to work. I have since resolved my issue but would ask that a manual cron method be built for this plugin as well so that one doesn’t need to rely on wp-cron if hosting provider is being a douche.

    http://wordpress.org/extend/plugins/subscribe2/

Viewing 11 replies - 1 through 11 (of 11 total)
  • @dave,

    HostGator seem to do that quite a lot – not sure why this seems to affect them so much but not other providers but there you go.

    You could consider disabling wp-cron.php yourself and calling it from a real cron event. How to do that is described here.

    Thread Starter Dave Bergschneider

    (@dave-bergschneider)

    @mattyrob,

    Thank you, I have already disabled wp-cron and configured a real cron. This was easy to figure out once I diagnosed the cause which took many hours. The primary issue I have with the plugin is it didn’t even hint that there was a problem with its dependency of wp-cron. Emails simply weren’t going out suddenly. When I did manually send or sent preview emails, it said email sent successfully however one was never sent.

    I think notifying the user on the settings page that wp-cron.php is configured incorrectly or lacks privileges and a link like the one you just provided would go a long way.

    @dave,

    With wp-cron disabled and a real cron configured does the digest email still not work?

    I accept what you say about not making it clear that this feature requires wp-cron but I think that is something better placed in the FAQs rather than in the admin pages. I’ll get that sorted.

    Thread Starter Dave Bergschneider

    (@dave-bergschneider)

    @MattyTob,

    Yes, it works with a real cron setup. My issue is more along the lines of usability.

    The plugin throws no error when wp-cron fails. In fact it does the opposite and says “Emails Successfully Sent” in a yellow notification. This makes it really difficult to troubleshoot because one does not know why emails are not being sent or received.

    I was only able to figure it out after troubleshooting because I am a developer. I can only assume most WordPress users are not developers and have very little server management knowledge and will simply remove the plugin, give poor ratings and complain that it doesn’t work.

    I think the plugin is awesome and don’t think it should receive undeserved backlash from ignorant users.

    I am one of those “ignorant” users and has been using this plug in without a problem the past 6 months, now all of a sudden the emails have stopped going out.

    I am a quick learner, but have no idea what wp-cron is and how to set up a real cron.

    I would appreciate any help. Not at all computer challenged 🙂

    @dave,

    It’s difficult to get the plugin to throw an error on the cron event though because it’s an event that’s supposed to fire without specific user intervention and as such the should not be an expectation of direct user feedback.

    In the current code there are 3 messages that a user may see in respect of the cron event. If digest is enable and Preview is clicked it will report ‘Preview message(s) sent to logged in user’. If an attempt is made to resend a digest it will either report ‘The Digest Notification email contained no post information. No email was sent’ if there was no data to send or ‘Attempt made to resend the Digest Notification email’.

    How would you suggest that the usability is improved above this?

    @franktrew,

    Try installing WP-Crontrol to see if cron events are scheduled and working. Also ask your host if they have disabled it.

    If you want to use a ‘real’ cron task to get these working see my first reply in this thread.

    Also, please not for future reference, it is considered good practice to open a new thread on a forum if you are asking a new question. Only reply to threads if you are adding information in the exact same scenario or have suggestions on a fix.

    Thread Starter Dave Bergschneider

    (@dave-bergschneider)

    @mattyrob,

    Perhaps before executing the email function run a check on wp-cron.php to see if it is readable & writable? I think this is only necessary on manual sends because they will likely be used for troubleshooting. Not exact code below but I think you get the point.

    $filename = ‘wp-cron.php’;
    if (is_readable($filename) && is_writable($filename)) {
    //Run mail function
    } else {
    echo ‘WP-Cron is disabled or configured incorrectly. Visit plugin FAQ for more information.’;
    }

    @dave,

    My copies of the file on my server and local installs are readable but not writeable to all so the second part comes back false even though wp-cron works.

    Would the is_readable() be enough of a check? I’ve look at file perms() too but got some weird results.

    It seems that a file must be readable to all (so a minimum of 444) for is_readable to evaluate as true too. Might that cause issues of false negatives?

    Thread Starter Dave Bergschneider

    (@dave-bergschneider)

    @mattyrob,

    Yes, I believe that to be sufficient. If the host disables it, the permissions will be 000.

    @dave,

    I’ve just committed a change to the development version of the code. Download it and give it a try if you like.

    Thread Starter Dave Bergschneider

    (@dave-bergschneider)

    @mattyrob,

    Yes that is working for me. My apologies for the day, I’ve been on a short vacation these past few days.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘[Plugin: Subscribe2] host blocks wp-cron causing subscribe2 to not send emails’ is closed to new replies.