• Resolved vee

    (@okvee)


    WordPress version: latest including WordPress dev version (6.5 alpha).
    PHP version: 8.1
    Plugin version: 1.5.1

    Go to plugin’s settings page and click on Send Test button to test notification email.
    There is no email sent. View debug.log and found errors.

    Error on debug.log

    thrown in wp-content\plugins\fatal-error-notify\includes\admin\class-admin.php on line 64
    PHP Fatal error: Uncaught Error: Call to undefined function function_that_does_not_exist() in wp-content\plugins\fatal-error-notify\includes\admin\class-admin.php:64

    All other plugins are disabled.

    • This topic was modified 10 months, 3 weeks ago by vee.
Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author verygoodplugins

    (@verygoodplugins)

    Hey @okvee ,

    The error in the debug log is the right error ??. We trigger an error to test the email notifications.

    Are you using any kind of 3rd party SMTP plugin on your site? It’s possible that this has not loaded fully by the time the error is being sent.

    You can also test with a mail logging plugin like WP Mail Logging (https://www.ads-software.com/plugins/wp-mail-logging/) to see if it’s actually being sent.

    Finally— because the error notifications contain both code and links, they look *really* suspicious to spam filters (more than usual). Check your spam folder, and also try sending to another email address to see if there’s something specific with your domain name. For example we have our mail hosted at @verygoodplugins.com, and the spam filter on that server was blocking the notifications before it could even get forwarded to our GMail.

    Please let us know if any of those tips work for you, as it helps other users who might be searching ??

    Best
    Jack

    Thread Starter vee

    (@okvee)

    Hi,

    You maybe missed something. I’ve said that All other plugins are disabled that means no any 3rd party SMTP plugin running. And no, it is not in spam folder because it did not even send out.

    However, I’ve tested again and see that the problem is from NEVER save any setting in the plugin’s settings page.

    I have to go to settings page and must click on save button then click test button.
    Otherwise there will be no options/settings in DB and it will not gonna work.

    Tested with PHP 8.1, 8.2. WordPress 6.4.x, 6.5 dev. All works.

    One more problem, please remove all your plugin’s options in DB on uninstall the plugin. (This is mentioned in the document here).

    When your plugin is uninstalled, you’ll want to clear out any plugin options and/or settings specific to the plugin, and/or other database entities such as tables.

    • This reply was modified 10 months, 3 weeks ago by vee.
    Thread Starter vee

    (@okvee)

    For anyone who would like to test sending out emails from ANY software, I recomment using Papercut. It’s free and very good to capture outgoing emails on your PC with one or zero (no) configure. ????

    Plugin Author verygoodplugins

    (@verygoodplugins)

    @okvee Gotcha, sorry, was copying from a template. No active plugins ?

    Since the settings aren’t saving that probably explains why the emails aren’t sending. The destination email can’t be read out of the database.

    Are you using object caching (i.e. Redis) or memcached? Can you try flushing or disabling it temporarily to see if it allows the settings to save?

    Removing the settings— in most cases you would not want to delete all the settings just because the plugin is deactivated (we deactivate plugins all the time during testing). But yes, we can add an option like “Delete all settings when this plugin is next deactivated”. We’ll work on that for the next update. Thanks!

    Thread Starter vee

    (@okvee)

    NO, please read WordPress document. They mention about delete options on uninstall not deactivate!

    https://developer.www.ads-software.com/plugins/plugin-basics/uninstall-methods/

    Copied from doc page. When your plugin is uninstalled, you’ll want to clear out any plugin options and/or settings specific to the plugin, and/or other database entities such as tables.

    Less experienced developers sometimes make the mistake of using the deactivation hook for this purpose.

    • This reply was modified 10 months, 3 weeks ago by vee.
    Plugin Author verygoodplugins

    (@verygoodplugins)

    Yes I understand. It still makes sense to add it as an option, not default.

    For example if you purchase Fatal Error Notify Pro, you will need to delete Fatal Error Notify. We don’t want you to lose all your settings.

    Waiting to hear back from you on the object caching.

    Thread Starter vee

    (@okvee)

    I don’t use any of those cache. No Redis, Memcache(d), APC(u) None.

    Plugin Author verygoodplugins

    (@verygoodplugins)

    Ok. But the settings never save? i.e. you add an email address to the “Notification – Email” field, and click Save Changes (https://i.wpfusion.com/tC2ZcyfF), and when you reload the page nothing is saved?

    If it’s not a plugin conflict, and there’s no caching, then I’m not sure.

    You can easily spin up a test site on Instawp (https://instawp.io/) and install the plugin, and see that the settings save, and the test emails send.

    So we need to think about what might be special about your server.

    Do you have any other customizations or anything you can think of that might be special? i.e. multisite, separate database server…?

    Do you have any issues with other plugins’ settings not saving?

    Are there any errors recorded in the PHP error logs?

    Thread Starter vee

    (@okvee)

    I may have miscommunicated. I means I’ve just new/fresh install this plugin (no plugin’s options on DB). Then go to plugin’s settings page and never click on save button before.
    The recipient email is already there and default option is ticked.
    So, I just click on test button. Result is no email is out going.

    Next, I try again by clicked on save settings then click on test button -> everything work as expect.

    Plugin Author verygoodplugins

    (@verygoodplugins)

    Ahhh ok. So everything is working (the notification is sending), and the settings are saving, but you are saying the notification email is not sent until the settings are saved one time?

    Yes this is how it works currently. The notification email needs to actually be saved before it can be used. But I can see how that would be confusing. We can update that so that when the Test button is clicked, the settings are also saved. Thanks for the feedback! ??

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Can’t get notification. (Not working)’ is closed to new replies.