Skip Navigation

[Resolved] CRED form emails – with expiry dates

This support ticket is created 6 years, 3 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
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Tagged: 

This topic contains 22 replies, has 3 voices.

Last updated by lindsayH 6 years, 2 months ago.

Assisted by: Beda.

Author
Posts
#1112429

Updating ticket status.

#1114884

I've just read thru here and checked the site, from the first sight I just saw in the Form you link, towards the bottom of the form, there is a hidden HTML section with a broken ShortCode in it.
Please remove or adjust that, as it may break the entire form or site, since the Syntax is broken:

<div style="display: none;">  
  NOT SEEN - JUST USED FOR AUTOMATIC EMAILS

       [cred_field field='listing-payment' post='wedding-supplier' value='[types field="listing-payment"][/types]'] 
     
     
		[cred_field field="package-selected" post="wedding-supplier" value="[types usermeta="package" output="raw" user_current="true" ][/types]"]

  </div> 

See the nested Types field it will throw red characters which indicate a wrong syntax.
You can in WordPress generally not nest triple nested quotes, as there are just 2 kinds of:
" and '
In a ShortCode like yours above you need to alternate those and cannot use attributes, as it will break the syntax.
It may work, but may not.
It's not supported, as soon the red syntax appears you know you need to adjust the code

However, I took a duplicate of the site and will test the notification of wp-admin/post.php?post=576&action=edit (Email to Supplier - Expiry date - 1st Renewal free account), so to be sent just once and not several times.
It should be sent only once, 10 minutes before the post expires, and that is it.

I'll feedback here soon.

#1114895

1. Your theme (which is outdated) throws errors:

( ! ) Deprecated: Function create_function() is deprecated in .../themes/dynamik-gen/lib/functions/navbars.php on line 363

This forced me to remove it and use Theme Twenty Seventeen

2. I updated all Toolset Plugins to the latest versions.

3. I updated the expiration and CRON of the duplicate so to test quickly locally.

4. I notice you have a plugin installed:
Disable Emails
Deactivate
Stop WordPress from sending any emails. ANY!
I am not sure it should be there since you want to send emails...

5. However, I left all as is, inclusive Plugins which I fear will block Toolset Forms and submitted the form

I got these emails:
- 1st GoldPlat with Banking Your listing for test is expiring SOON. Please renew (I got this email to the email I set in the problematic notification, but sent was the DISABLED Email to Supplier - Expiry date - 1st RENEWAL)
- That form is set to 30 minutes before the automatic expiration date.... so it CANNOT be sent if I set it to 15 minutes or on the other hand, is triggered IMMEDIATELY as it's "too late".¨
- However, it's a disabled notification and should NOT get fired.
- I got then the final expected email of the expiration at the point where I expected to the email I expected.

So the problem here seems that DISABLED notifications do not disable, they still send.
I can confirm that the second email you receive is not the same, it's another, but it should not be sent, as disabled.
It seems to happen only with that one notification:

I deleted and re-created that notification, which seems to have solved the issue.

To fix this issue I would suggest saving the notification which makes problems to a safe location and then re-add it (new).

That immediately resolved the problem, locally, as well, when I disable the very notification now, this is again respected

I think the form may have been corrupted somehow.

#1117569

I have been busy working on another open issue with Toolset and don't want the bot to close this ticket. I will look at this Wednesday next week when I have time.

The Disable emails plugin stops the emails from sending externally, (this is copy of a live website so I don't want to accidently send any to existing clients). Emails are still logged though so we can review easily.

I've had to do this before, re-save email notifications. This whole area, especially when combined with expiry dates just feels like it's currently on beta and not yet robust enough to use on a live site. I know it's complicated and I'm not criticising (Toolset is a wonderful product and the support is especially fantastic) but it's just how I feel after raising numerous tickets in this particular area for well over a year.

#1117613

Yes, I agree with that.

Recently, our Forms develop team changed. Especially notifications (and many other areas of Forms) have not only massively changed but also improved.
So, for example, notifications became stable (but may need to be saved as such "new versions" first)
ShortCodes in Forms and what you can get/do (as well notification body and subject) where totally reviewed and work now, however, also here, there may be "lost" settings, wrong settings, etc, that once re-saved usually then work properly and as expected

Note that many times this may result in things not working anymore as they did before because before they worked "by accident" (or lets say, due to bugs) like they run, and due to fixes that might have changed, or elsehow, "adjustments" done in past to actually "fix" issues or workaround them are not necessary or even possible anymore

I would suggest reviewing (staging site, start with re.save the forms only) the current forms and re-iterate after all forms with issues where re-saved using the latest plugins, and eventually, their setting revisited.

I think the issue here is one such issue, solved by deleting and re-creating that/those notification(s)

#1119073

I disabled my theme and enabled Twenty Seventeen.

Set expiration date for post created or edited by this form - set at 6hrs

Re-ran a test, but the Post didn't expire - so of course no notifications set. Not sure why this happened.

I will re-enable theme and re-do the notification and test again. I'm leaning to just leaving this and not using notifications with 'time' before the automatic expiration date set on my live site for now.

#1119730

I would suggest this on a test site and start with the steps recommended which are to re-save the forms/notifications

Please let me know if you need an online server to test this

#1119773

I've decided just not to use the Notifications\Expiry Date settings. As I mentioned I've had a lot of trouble with this over an extended time and it takes so much of my time to do the testing. Unfortunately I've other priorities now really. I'm just going to avoid using the Notifications when linked to Expiry Dates. Thanks for all your help in this though. Much appreciated and apologies for not having the time to continue.