I am trying to: help a client who has their own Toolset license and has many CRED forms. When a form is submitted, more than one notification is being sent. The notification is set to trigger when a field changes value (0 sends one notice, 1 or more sends a different notice very much like a featured ad in the Toolset examples for classifieds).
In trying to troubleshoot this, I noticed there are more than one form with field conditions for this post type as notification triggers. I am unable to determine from the documentation if these are all checked whenever ANY form is submitted or if only the field conditions specific to the form being submitted are checked. It would help my troubleshooting to know how CRED processes these.
Link to a page where the issue can be seen: requires a premium account on client site
I expected to see:
Form A's notification #1 if Form A is submitted and the featured field value > 1
Form B's notification #1 if Form B is submitted
Instead, I got:
Form B was submitted and I seem to have gotten both form B and Form A's notifications.
I may need to get you access to the site and ask you to look at the forms but first I'd just like to understand how and WHEN the notification field conditions are processed.
The problem you mentioned above is abnormal, when user submits a CRED form, it should trigger only the notifications of this CRED form, it should not be able to trigger notification of other CRED forms.
In case it is a compatibility problem, please try this:
1) deactivate other plugins and switch to wordpress default theme, and test again
2) If the problem still persists, please provide a database dump file (ZIP file) of your website in below private detail box, also point out the problem page URL and CRED form URL, I need to test and debug it in my localhost, thanks
For the new question:
Are there any known circumstances where a form might fire its own triggers more than once on form submission?
It might be triggered by some custom codes, as I suggest you above, pleas check the compatibility problem.
If the problem still persists, please provide a database dump file (ZIP file) of your website, and describe detail steps to duplicate the same problem.
I have done some additional testing. The CRED form notification process is being triggered even if I edit the post from WordPress admin back-end without using any CRED forms. Is it supposed to work this way?
It seems like the CRED form's notification triggers are being processed whenever the post type is edited regardless of whether it is edited by admin backend, this CRED form or another CRED form.
I added some debug code to the CRED post notification that proved it tested 4 different field conditions when I saved a change from the backend and it sent one notification as a result.
If it is, then it is expected result, the post expiration email notification is triggered by WordPress CRON job, so it will be triggered even if I edit the post from WordPress admin back-end.
This isn't an expiring post. It is a book review site and the post is a book. The book does not expire. Some custom fields in the book post type handle starting and ending it being featured in a sidebar on the site but that is different than CRED's automatic post expiration feature.
I think I figured out that the double notifications were happening because two forms had the same notification settings for this post type (one was an Industry centric variation of the other). On the front-end they act independently but a backend change of the feature-type field triggered both notifications. I disabled them in the other form and that seems to have stopped the duplicate notifications but now the second form doesn't have its own frontend notifications anymore so I need to work on that.
Something worse is also happening. The notifications in the primary CRED form are set to send a "Your feature is live" notification if the feature-type field is set to > 1. It is set to send a "Your featured has expired" notification if the feature-type = 1. When I set the feature-type to 1 with the CRED form, I'm getting BOTH notifications which should be impossible since feature-type cannot be both 1 and greater than 1 at the same time. Any ideas?
In order to debug the problem, please provide a database dump file of your website, also point out the problem page URL and CRED form URL, I need to test and debug it in my localhost.
Thanks for the details, it is a known problem, and has already been put into our to-do list, our developers are working on it.
I have escalated this so that it can be addressed by the developers, and I'll let you know when I have news.
There is an imminent update of all plugins, including Toolset Forms (as CRED will now be known), but there won't be time to include a fix for this in that update.
If it is a known issue, are there any recommended workaround, patches or temporary fixes we can apply while waiting for an official fix in an updated version?
I will let you know as soon as I have additional information to share. At this time, I do not know when a fix will be available with the solution to this problem.
Any news on this? Also, if it is only fixed in the latest Toolset Forms, will it work with Types and Views versions from before the new relationship features? This site has a lot of parent child relationships, a lot of forms and a lot of views and we're not ready to upgrade it to the newest versions with the new relationship capabilities yet.
Thanks for letting us know this is fixed in the latest CRED/Forms.
Any idea if I can use this new version of Forms with older versions of the other plugins? This site has so many parent child relationships, forms, views, custom fields and taxonomies that we're not able to move to the new Types and Views just yet due to worries about some customizations breaking with the new relationship features.
We're on Types 2.2.23, Views 2.5.2, Access 2.4.3.5 and CRED 1.9.6.1 right now.