Skip Navigation

[Resolved] Notifications Stopped Working

This support ticket is created 6 years, 8 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
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 12 replies, has 2 voices.

Last updated by JoelK2744 6 years, 8 months ago.

Assisted by: Christian Cox.

Author
Posts
#674660

I am trying to: Receive notifications when a form is submitted

Link to a page where the issue can be seen: hidden link

I expected to see: A notification

Instead, I got: Nothing

We stopped receiving CRED notifications around 5 April. Up until then they have been working fine. I have sent test emails and they work fine so I don't think they are being blocked. I have tried re-saving the form but that hasn't helped. The only thing that I can think that has changed around this timeframe was a wordpress update to 4.9.5 - are you aware of any conflicts here?

The really strange thing, is that we have a staging site which is an exact replica of the live site, and these notifications work fine, the only difference between the sites that I can think of is that the staging site doesn't have an SSL certificate.

#674935

Okay so you're saying that the notifications ARE working on staging, but ARE NOT working on production, correct? I'm not aware of any conflicts in WP 4.9.5, so there must be something else going on. Are the staging and production environments identical in terms of PHP version, server engines, extensions, etc.? If so, then I can think of a few things to try in production:
- Temporarily activate Maintenance Mode, then deactivate all plugins except Types, Views, and CRED. Activate a default theme like Twenty Seventeen. Test notifications again.
- If the problem is resolved, then reactivate your theme and other plugins one by one until the conflict is revealed. There may be a configuration setting that can be tweaked in that plugin to re-enable notifications. Sometimes simply disabling cache on a file may resolve the problem.
- If the problem was not resolved, then I recommend checking the server logs to see if any errors are triggered by the CRED notification process. If you're not familiar with server logs, I can show you how to activate them. Go in your wp-config.php file and look for define(‘WP_DEBUG’, false);. Change it to:

define('WP_DEBUG', true);

Then add these lines, just before it says 'stop editing here':

ini_set('log_errors',TRUE);
ini_set('error_reporting', E_ALL);
ini_set('error_log', dirname(__FILE__) . '/error_log.txt');

Submit the CRED form again to trigger the notification process. Then check the root folder of your website using FTP and look for a file called "error_log.txt". If any errors were triggered, this file will exist. Send me its contents. Then you can revert the changes in wp-config.php.

#674954

Thanks for getting back, I'll follow this up and get back to you. I'll also check with my host to make sure there's nothing obvious on their end and ask if there are any differences between the staging and production environments.

#675034

Sounds good, I will mark this ticket as pending an update from you and we can pick up when you have more information.

#690540

Hello, just to keep you in the loop. Our host has pinpointed the issue to when their object cache is enabled (the forms work ok when they disable it). That must be the difference between the staging and live environments. They are currently trying to debug the forms to understand why. Is this something you have come across before?

thanks

#693634

Can you tell me what type of object caching system is used in production? I can ask my developers for more information about it.

#715156

They've got back to me and said..."The object cache we use is REDIS and we use a slightly modified version of Author: 34SP.com Original authors (Matthew Boynes, Alley Interactive) PHP redis object-cache file."

Hope it helps.

#718504

Okay thanks, I will pass this information along and see what we can figure out. I'll update you when I have some feedback to share.

#736208

Hello, our host has gone as far as they can with debugging, here's what they suggested I pass on to you in case it helps...

./application/controllers/notification_manager.php:

$notification = isset($data['notification']) ? $data['notification'] : false;
if (
( ! $attached_data && ! $is_user_form )
|| ! $notification
|| ! isset( $notification->enable )
|| ! $notification->enable
|| empty( $notification->notifications )
) {
error_log( print_r($notification, TRUE). "notification called\n", 3, "*URL REMOVED*/keith.log");
return;
}

The above if statement is triggering and it is returning without sending the notification.
Below is the contents of $notification

triggerNotifications called
stdClass Object
(
[enable] => 1
[notifications] => Array
(
[0] => Array
(
[event] => Array
(
[type] => form_submit
[post_status] => publish
[condition] => Array
(
)
[any_all] => ALL
)
[to] => Array
(
[type] => Array
(
[0] => specific_mail
)
[wp_user] => Array
(
[to_type] => to
[user] =>
)
[mail_field] => Array
(
[to_type] => to
[address_field] =>
[name_field] =>
[lastname_field] =>
)
[user_id_field] => Array
(
[to_type] => to
[field_name] =>
)
[specific_mail] => Array
(
[address] => *EMAIL ADDRESS REMOVED*
)
)
[from] => Array
(
[address] =>
[name] =>
)
[mail] => Array
(
[subject] => %%FORM_NAME%%
[body] => <p>%%FORM_NAME%%</p>
<p>%%POST_ADMIN_LINK%%</p>
<p>%%FORM_DATA%%</p>
)
[name] => TIC Notification
)
)
)

#736359

My 2nd tier team hasn't been able to find any known issues related to this, so they have requested a copy of the site. I can log in and install the Duplicator plugin to create a clone of the site, or you can provide a zip archive containing a SQL dump of the database, wp-content/themes and wp-content/plugins folders. Let me know how you would like to proceed.

#766864

Hello, unfortunately I'm not able to give access to our server and duplicator fails with our hosting provider as they use non-default wordpress paths. I would imagine it would be difficult to replicate anyway as it seems to be some combination of the plugin and the hosting environment that's causing the issue.

Sadly it looks like we're going to have to find a different solution for forms as the notifications seem to work fine for another plugin I've tested.

Thanks for looking into it.

#770871

I understand, I would be glad to run some tests on a SQL dump file and a backup of the themes and plugins folders. That would not require access to your server, and I could verify that there's nothing else we have overlooked that could be causing the problem. Let me know if you would like to proceed, or we can close out this ticket.

#802005

Hello, thanks I'll close this ticket for now while we investigate other options. We also need to make sure our forms are GDPR compliant so we can make both changes at the same time.

Thanks