• Resolved keengamer

    (@keengamer)


    Hello, I have no idea why but we are now testing the plugin and the reminders that someone was signed up is sent every hour. Not just once or twice, but every hour.

    Is there a way how to fix it or where to look for the problem?

    Thank you.

Viewing 15 replies - 1 through 15 (of 16 total)
  • Plugin Author DBAR Productions

    (@dbar-productions)

    Check the pta_sus_signups database table (will be prefixed by wp_ or whatever you have your WordPress database prefix set to), and look at the corresponding reminder1_sent and reminder2_sent fields. If they are still not set, or set to 0 (zero), then somehow those fields are not getting updated correctly after the reminder is sent. You may want to check your error logs, or enable debug to log, to see if there are any errors being thrown. The only time my plugin will NOT update those fields after attempting to send a reminder is if the WordPress send mail (wp_mail) function is returning a false value when it attempts to send the email. If you have some other plugin that’s replacing the WordPress mail function (such as an SMTP mailer plugin), it may not be returning a true/false value after sending the email.

    The only other thing I can think of is that there was a similar type problem several years back with a very specific server configuration where the boolean values (true/false or 1/0) were not being saved properly with that specific database system. At this time, I can’t remember what the database configuration was or how we worked it out, but that was solved for that particular case.

    Thread Starter keengamer

    (@keengamer)

    Hello, it seems like an issue of SendInBlue. If I disable it, core email client works fine. If not, the value in the database table does not change.

    Thanks anyway, I wrote to their support.

    Plugin Author DBAR Productions

    (@dbar-productions)

    If their plugin is replacing the wp_mail function, which it must be, then they need to return the same values that wp_mail does, which is true or false depending on if the email was successfully sent or not.

    Thread Starter keengamer

    (@keengamer)

    Hi again. SendInBlue support is trying to find and fix the bug but they need more information. Here is their last answer.

    Please inform the client our wp plugin re-declare the wp_mail() function of wordpress to use our SMTP. So if other plugin declare the wp_mail() function, then there maybe conflict issue and our smtp module can’t be working.

    Fact is that in the database the value is not filled with true value when the email is sent so the issue is directly connected to it.

    Can you please check the text above and send me some answer? Or, if I would give you a contact to their team, could you please talk to them to find the solution? Or can you send me an email on which they can contact you? It is hard to solve it via myself as I am not a programmer…

    Thank you.
    Karel

    Plugin Author DBAR Productions

    (@dbar-productions)

    I already gave you the answer in my last reply:

    If their plugin is replacing the wp_mail function, which it must be, then they need to return the same values that wp_mail does, which is true or false depending on if the email was successfully sent or not.

    My plugin does NOT re-declare the wp_mail function, but it calls the wp_mail function to send the emails. So, if their plugin is re-declaring (replacing) the wp_mail function (which it is), then they need to return the same values as the function they are replacing, which should be a true or false boolean value, depending on if the email was successfully sent. My plugin is counting on seeing a true or false return value to know if the reminder was sent or not by the wp_mail function. SendInBlue needs to follow the format of the function they are replacing and return the same type of values.

    I don’t know how much more clear I can make it than that. Copy and paste all of that in an email to them. If they claim that they are already returning true or false, then there is an issue with your server or database that is not allowing the database values to be updated correctly. Anything else is beyond the scope of free support for this free plugin.

    Thread Starter keengamer

    (@keengamer)

    Hello again,

    they were able to fix it, now in the database table it is visible both reminders as 1, sent. But I am receiving maybe once per 3 hours second reminders. In the cron functions it shows the one which was sent correctly but then I am still receiving the second reminder again and again. Now it seems like a possible but in your plugin, I don’t know.

    I can see also in the database that there exist:
    …pta_sus_sheets
    …pta_sus_signups
    …pta_sus_tasks

    AND also

    …dls_sus_sheets
    …dls_sus_signups
    …dls_sus_tasks

    Should both of these tables be present or is this the possible bug? However in dls there are no visible signups so it shouldn’t matter. In sus for that particular tasks it seems ok. reminder1_sent=1, reminder2_sent=1, item_qty=1.

    Last reminders sent:
    Date: 2019-04-25
    Time: 12:24 am
    1 reminder sent

    Last reminder check:
    Date: 2019-04-25
    Time: 5:24 pm

    Thank you.

    Best,
    Karel

    Plugin Author DBAR Productions

    (@dbar-productions)

    Looks like you previously installed, or maybe even still have installed, the other Sign Up Sheets plugin from DLS Software, which you can see here:
    https://www.ads-software.com/plugins/sign-up-sheets/

    Quite a few years ago, as explained in my plugin description/documentation, I started with their plugin and then modified it for my son’s school’s PTA web site. Later, after my son moved on to middle school and that PTA moved onto another system, I released it here for free to help out the community, and also sold a few extensions through my own site.

    So, the original database structure is the same, with the same tables (although theirs is now prefixed by dls, whereas mine are pta), although I have also added additional fields and quite a lot of new functionality to my plugin. I can’t remember if their original plugin I started with had email reminders or not, but they may have “borrowed” back some of the features of my free version to put into theirs (it’s open source, and I have no problems with that at all, especially since my plugin started from their original code). I know I spent a lot of time working on those reminders.

    Make sure you actually have my plugin active and not theirs. Only one of them should be active. There have been problems in the past when people have tried to switch from the DLS software version to my version. They are no longer compatible with each other, and that’s beyond the scope of my free support for a free plugin. Nobody else is reporting issues with reminders getting sent multiple times, and if you fixed the problem with the plugin/service that is actually taking over the wp_mail plugin, then they only thing I can guess at this point is that there is some remaining conflict with the two versions of the Sign Up Sheets.

    All I can offer as way of suggestion is to completely remove all of the DLS code from your site (not just deactivate, but completely delete all the files from your server), and then drop/delete the dls database tables, and then you may need to try to reset the options in my plugin by deactivating and then reactivating my plugin.

    Beyond that, if you want my help, I would need to charge you for my time, and I would need to clone your site so that I can thoroughly test and troubleshoot in my dev environment with all my debug tools to try to figure out what is happening. Troubleshooting things that run from a CRON function can be more difficult, but you can manually trigger the CRON functions from my plugin for testing or to force reminders to be sent if they are not getting sent through normal CRON triggers.

    Thread Starter keengamer

    (@keengamer)

    Hi, well, it’s strange. DLS is removed both files (which were none) and tables. And I got 3 second reminders now again in the last 15 minutes… I will contact SendInBlue if they can find the bug but it’s just hard to guess right now…

    Plugin Author DBAR Productions

    (@dbar-productions)

    Are you getting 3 reminders for the same specific signup? Or each one is different? Or, is it the admin notification that reminders were checked/sent?

    If it’s the same specific signup that you keep getting the same reminder for, maybe double check the signups database table again to see if those reminder 1 and 2 values are getting properly set to 1. If those are getting set right, then SendInBlue is probably doing it’s job and returning the correct true/false value after sending the email (otherwise, my plugin wouldn’t update the reminder values in the table).

    The only other thing I can think of, which I may have mentioned before, is that there was one specific case several years back with a certain server & database structure where boolean values (true/false, usually saved as 1/0), were not evaluating correct to a “true” value. I don’t think that particular case was related to reminders, but to some other boolean value I was saving in the database somewhere. But, that’s a very rare and specific thing that I only vaguely remember as that was the only time it has ever come up.

    The only other way I could even attempt to figure out what is happening, would be to clone your site/database to as close as possible of a similar system here, so I can turn on my debug tools and set breakpoints at certain places in the code to see what values the database query functions are returning and how they are being set/saved in the PHP variables.

    Thread Starter keengamer

    (@keengamer)

    Yeah, same group, same task, same user. Database is set to 1 also correctly. The fact is that we are switching our whole site to WP tomorrow. This is one of our remaining issues right now. We can either fix it, or just live without notifications. It’s just strange, because the cron should work once in an hour, not 3 times in ten minutes. So either there is some other job or crone which is not taking into account the reminders in the database or something else. But, why is it sent so often?

    Cloning the database etc. would be quite a workload now which we don’t have time right now preparing for the big switch of our site.

    Maybe if you can know how we can track it, or some logs to find or set up, that could help.

    Plugin Author DBAR Productions

    (@dbar-productions)

    WordPress doesn’t have a “true” CRON function, as it depends on you site getting visited and WordPress loaded to check the time since the last CRON job.

    My plugin adds the reminders function to the “hourly” CRON tasks, so, if it’s getting triggered every 15 minutes, then maybe some other plugin has altered the CRON times and somehow changed the hourly tasks to be triggered every 15 minutes. That’s the only explanation I have for that.

    You’d have to modify my code or tap into one of my filter/action hooks if you wanted to create a log you could check. I don’t have anything built-in that creates any kind of logs. But, you could always check your server logs to see if there are any PHP warnings or notices or errors being generated around the time that those reminders are being sent. If so, those could give you an idea of where to start looking.

    If you wanted to pay me for my time to clone your site to see if I can reproduce the issue here, it’s not that difficult or time consuming to do. I would only need a zip archive of your wp-contents folder, and an .sql format backup of your site’s database, and I could create a clone in a few minutes locally. You should contact me privately if you want to do that.

    Otherwise, I suggest you create a fresh “test” install of WordPress, maybe in a subdirectory on the same server, without any leftovers from the DLS version. Install my plugin, and your theme, and any other bare minimum plugins you need just to test. Then set up a sheet with reminders enabled, and signup, and see if the same thing happens there. That shouldn’t take you more than 30 minutes to do. Or, if you already have access to your new server, you could also do the same thing there, separate test WP install, just to see if everything works as expected there without any leftovers from DLS or other plugins to possibly cause conflicts.

    Thread Starter keengamer

    (@keengamer)

    Yeah, thanks. We’ll try to figure it out when we have time to focus on this particular issue…

    Thread Starter keengamer

    (@keengamer)

    Well now it’s becoming interesting. I have disabled all emails in your plugin and oops, new reminder just came to my email. It seems that SendInBlue made a mistake somewhere and it is sending the emails again and again, don’t know. Will write them.

    Thread Starter keengamer

    (@keengamer)

    Jesus Christe I think I’ve got it. We have two or three instances right now for heavy testing and the programmer had to copy the database but there isn’t the plugin updated manually. So I am getting the emails from another instance…

    Oh my boy.

    Thanks for your time in every case!

    Plugin Author DBAR Productions

    (@dbar-productions)

    Feel free to make a donation or write a review! =)

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘Reminders sent every hour’ is closed to new replies.