Skip Navigation

[Resolved] cred notifications for custom field change stopped working after upgrade

This support ticket is created 4 years 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
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 29 replies, has 4 voices.

Last updated by Martin 3 years, 7 months ago.

Assisted by: Shane.

Author
Posts
#2277721

I have upgraded CRED forms from 2.6.9 to the latest version(2.6.12). notifications for changed custom fields are not triggered any more. WP version and other plugins remained the same.

I sequentially downgraded from latest version back again and ended making it work with 2.6.9. It seems that with version 2.6.10 the issue started. In the change-log I see a fix for notifications of custom field changes in version.2.6.10 but it breaks this part of notifications for me.

This was working before for couple of years now.

I have a staging environment - this is the form.
hidden link

Let me know what information I can provide to you.

Many thanks
Martin

#2277943

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Martin,

Thank you for getting in touch.

Can you provide me with access to the staging environment so that I can perform some tests?

Also please let me know the link for the form on the frontend as well.

Thanks,
Shane

#2278555

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Martin,

Thank you for the information, however i'm not sure how I can get the form to submit successfully.

Each time I try i get the message "The request function is only available after publication and if you are not logged in as a host."

Secondly when I do send some test notifications using the form "Send a Test Mail" button the test notification comes through. However the notifications are sent to my spam.

Can you check your spam inbox to see if the notifications are there for you as well.

Thanks,
Shane

#2278567

Hi Shane,

yes you are right - I forgot to mention you need to open the form page in a private/incognito window (when you are not logged in).

I receive the test notifications - do not really have a spam folder. But the sending domain (staging) is not authorised on my mail system - probably therefore marked as spam then on your email providers server.

Let me know if that hels,

many thanks
Martin

#2278771

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Martin,

Whatever is causing the issue is related to the condition below
It is called "Booking reply". this is triggered when a custom field value of "wpcf-booking-reply-state" is set to 2.

When the email is sent to send once the form is submitted then it works fine. So there isn't any issue with the form itself per say but rather the condition that is required for the notification.

How is the Book reply state being set? Is it being set before the form is being submitted with your code?

Please let me know.
Thanks,
Shane

#2278819

Hi Shane,

Yes the second notification "Booking reply" is triggered when a custom field value of "wpcf-booking-reply-state" is set to 2 but the reply processed must still be 0.

The value for the reply is set programmatically and not via form (post update).

This is happening when a link in the first email is clicked (red button"Automatisierte Absage" - which means booking decline). The link contains some url parameters to set the state of the right booking to a value of 2.

The notification should send an automated reply to the email address of the requester which was entered on the form. So to answer your question: the custom field it is set after the first form submission.

As mentioned in my first email, this was working for a couple of years now, but upgrading cred form was creating this issue.

The notification were also triggered in the past when I set the value using Admin columns pro, or on the post edit screen. Both is not working any more...

Let me know if I can assist you any further.

Many thanks
Martin

#2280131

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Martin,

This seem to be related to the changes made to the notification options.

However without details on what was changed for the notifications I cannot provide any additional information. I do know that in order for the notifications to be triggered the value must be set on the form because this value on the form is what is being used to trigger the notification.

Given that the notification works when the condition is removed it leads me to believe that the notification is dependent on the value being set on the form itself.

Is there any way for you to be able to modify your code to set the value before the form is submitted?

Please let me know.
Thanks,
Shane

#2280553

Hi Shane,

Not sure if I understand you right. When you say "related to the changes made to the notification options" - I did not change any options. Things stopped working after plugin upgrade.

After Cred Forms 2.6.9 notifications are not triggered any more for custom field value changes, done programmatically or set in the backend . This was working, and also was confirmed by support a couple of years ago.

So there never was a form in use for the booking reply (second notification), only for the post creation (first submission).

My information for notification system was:
- that the first submission, when the post is created also sets all conditions, for this post.
- So a change in the notification options does not change notification conditions for past posts.
- But the notification system does not need a form to change values (update form) for the notification system to work and send an email.

Please could you confirm that this is still the expected behaviour or how notifications are intended to work.

Many thanks for you efforts,
Best
Martin

#2281835

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Martin,

Not sure if I understand you right. When you say "related to the changes made to the notification options" - I did not change any options. Things stopped working after plugin upgrade.

What I meant here is that i'm not aware of exactly what changes that our development team made to how the notifications were being triggered.

After Cred Forms 2.6.9 notifications are not triggered any more for custom field value changes, done programmatically or set in the backend . This was working, and also was confirmed by support a couple of years ago.

What i know happens is that if the Post was created by a Frontend Form and then edited on the backend then the notification will trigger. This would mean that the post will need to be first created by the frontend form. I will need to perform some further tests to confirm this.

My information for notification system was:
- that the first submission, when the post is created also sets all conditions, for this post.
- So a change in the notification options does not change notification conditions for past posts.
- But the notification system does not need a form to change values (update form) for the notification system to work and send an email.

You are indeed correct here as this is how it should work.

Once I perform the tests on the notifications I will let you know my findings and if we will need to escalate this issue.

Thanks,
Shane

#2285861

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Martin,

My information for notification system was:
- that the first submission, when the post is created also sets all conditions, for this post.
- So a change in the notification options does not change notification conditions for past posts.
- But the notification system does not need a form to change values (update form) for the notification system to work and send an email.

I can confirm through independent testing on a fresh install that the email notifications still function as you've depicted above. Once the post was created with a form that has notifications. All future changes to that post even on the backend will trigger the notification once the specific condition is met.

However you're setting the specific form value with code correct so then the post update function is triggered in the code which should still fire an email.

Thanks,
Shane

#2286733

Hi Shane,

thanks for doing your tests on this topic, and confirming that notifications should still work like I have depicted.

What post updates did you test on the backend? Also custom field changes - since this is what's not working from my side.

It's a litte weird, because there are no other changes on my site. Everything is up to date (WP, and plugins) except Toolset Forms Plugin (v 2.6.9) and is working. Upgrading also Toolset Forms to 2.6.12 is breaking notification functionality when doing the custom field update.

Many thanks
Martin

#2286885

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Martin,

I went ahead and perform some additional tests and was able to replicate the issue with the custom fields and the notification triggers.

It is indeed broken and i've gone ahead and created an escalated ticket for further debugging to be done.

Given the case it might take some time to craft a solution but for now I recommend remaining on version 2.6.9 since that works for the custom field notifications.

Thanks,
Shane

#2286887

Hi Shane,

thanks for your effort and doing your additional testing.

I'm happy you could reproduce my issue.

So i will keep my current version.

Is there a chance to get updated when you have a fix, or do I need to ask or monitor the changelog?

Best
Martin

#2286905

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Martin,

I will provide an update on this ticket once our 2nd tier team has looked at it.

From there any updates on the escalated thread I will provide here as well.

Thanks,
Shane

#2342079

Hi Shane,

I wanted to ask if the dev team has already fixed the issue?

Best
Martin