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.
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.
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.
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?
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...
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?
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.
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.
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 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.
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.