Skip Navigation

[Resolved] Email notification not being sent from From created via Toolset

This support ticket is created 4 years, 6 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+01:00)

Tagged: 

This topic contains 49 replies, has 2 voices.

Last updated by simonM-5 4 years, 4 months ago.

Assisted by: Nigel.

Author
Posts
#1400825

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+01:00)

Thanks Simon, I've passed that on to the developer.

#1404581

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+01:00)

Hi Simon

The developer can see why it is not working on the problem site—the normal shutdown actions are not firing, which are ordinarily used to trigger the notifications—but cannot identify why they are not. Something to do with some other 3rd party code, caching, the server, who knows.

But he has produced a code snippet that you can use on that particular problem server so that the notifications are triggered earlier.

Here is the code that you should add to the site:

add_action( 'cred_submit_complete', 'prefix_send_toolset_forms_notifications' );

function prefix_send_toolset_forms_notifications() {
  $queue = CRED_Notification_Manager_Queue::get_instance();
  $queue->send();
}

You will only need to use that snippet (which you can add to Toolset > Settings > Custom Code) on the server that is failing to send the notifications.

Can you verify it works?

#1405357

HI Nigel

Thanks for that - I have added the code to the Toolset > Settings > Custom Code.

However it is producing the following fatal error when we try to navigate to any page:

Fatal error: Cannot redeclare prefix_send_toolset_forms_notifications() (previously declared in /var/www/kle1116-204/apps/dev/wp-content/toolset-customizations/send-toolset-forms-notifications.php:14) in /var/www/kle1116-204/apps/dev/wp-content/toolset-customizations/pretrigger-email-notifications.php on line 13
There has been a critical error on your website.

I have left the code in there but deactivated it.

Kind regards
Simon

#1405589

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+01:00)

Sorry, it looks like the developer left active a snippet with the same code.

You can't declare the same function twice.

The snippet they added is "send-toolset-forms-notifications".

You can forget adding it a second time, or if you are managing your custom code some other way you can disable and delete that snippet added by the developer.

Sorry for that.

#1405907

Hi Nigel

Quick feedback for you. We are testing this in various scenarios and are receiving notifications.

We have received some from the English version of our site (default) and also from the German version, which is great news.

I'd appreciate it if we can keep this ticket open for a couple more days while we test all the scenarios (post forms, user forms, contact forms) thoroughly, but it looks like the fix has worked.

Kind regards
Simon

#1408041

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+01:00)

Let me just mark this as awaiting your feedback so it's not sitting in my queue, and you can update me next week...

#1411299

My issue is resolved now. Thank you!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.