Home › Toolset Professional Support › [Closed] Bug with email notifications (multiple copies sent)
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 |
---|---|---|---|---|---|---|
- | 7:00 – 14:00 | 7:00 – 14:00 | 7:00 – 14:00 | 7:00 – 14:00 | 7:00 – 14:00 | - |
- | 15:00 – 16:00 | 15:00 – 16:00 | 15:00 – 16:00 | 15:00 – 16:00 | 15:00 – 16:00 | - |
Supporter timezone: Europe/London (GMT+00:00)
This topic contains 25 replies, has 2 voices.
Last updated by Nigel 1 year, 1 month ago.
Assisted by: Nigel.
Good morning 🙂
I've set-up email notifications to notify users when their housing add is about to expire. These notifications are sent 30 and 15 days prior expiration. My problem is that notifications are sent in many copies.
This Monday, one notification was sent twice at 18:33 and then twice again at 21:54. All to the same email.
2 things :
- Posts are bilingual, so maybe that explains the "twice"thing. But still it was sent at 2 different time in the same day.
- Post also have an expiration date, auto-enabled when the user first submits the form.
What is the link to your site?
hidden link
Thanks 🙂
Languages: English (English ) Spanish (Español )
Timezone: Europe/London (GMT+00:00)
Hi Catherine
Can you confirm the workflow?
A user submits a listing via a Toolset Form.
That listing will automatically have an expiration date/time (which is stored as a hidden custom field, with post meta key of _cred_post_expiration_time).
The form adds notifications to be sent 30 days and 15 days prior to that expiration time (details of the notifications are also stored in a hidden custom field, with post meta key of _cred_post_expiration_notifications).
Q: At some point after the post is submitted and published it gets translated to the second language?
Q: Is the above form only available in one language, or the form has been translated and users can submit adverts in either language (and they then get translated to the other language)?
It would be helpful to check the database to see what entries there are for those hidden custom fields for the adverts in the original language as well as for their translations. (Unless you explicitly set those hidden custom fields as translatable then I would not expect the translated advert to have entries for them, in which case getting 4 notifications—spread over a few hours—for a single advert would be difficult to explain.)
If that's okay let me mark your next reply as private so that I can get log-in credentials from you—you may want to create a temporary admin user for me to use that you can later delete. And be sure to have a current backup of your site.
Can you also confirm which is the advert that sent these erroneous notifications as well as its history, thanks.
Languages: English (English ) Spanish (Español )
Timezone: Europe/London (GMT+00:00)
Thanks for that Catherine
From your screenshots the notifications are all to the same email address, but they don't show which posts they refer to.
The email address comes from a field in the form ("courriel"), so I added a plugin where I could query the database directly and I searched wp_postmeta for meta values with that email address.
And it returned 40 results.
So there are 40 logement posts from the same user. Is it not possible that the email notifications that were sent out (4 to that user) were correct, i.e that they did have 2 then another 2 logement posts that would expire in 30 days?
Have you seen the same problem with other notifications for users that don't have so many logement posts?
Good morning Nigel,
We have another file that is on the listing right now : hidden link
The system sent 4 notifications too. (yesterday). And I'm pretty sure they don't have such many add than the other email-user.
- 2 at 6:11
- 2 at 18:13
But the third add (hidden link), received only once at 01:17 this morning
Also, the notifications are supposed to show the post link, but it doesn't
I first add the [wpv-post-url] shortcode in the email text, but the link woulnd't show. So I changed for %%POST_LINK%%, but still, nothing. Now I wrote both ([wpv-post-url] %%POST_LINK%%), to see if anything will appears next time.
Catherine 🙂
Languages: English (English ) Spanish (Español )
Timezone: Europe/London (GMT+00:00)
Hi Catherine
When I check the hidden fields in the database which are responsible for the notifications I see multiple entries for the latest problem post you shared, when the entries should be unique.
So I'm not surprised there are multiple notifications being sent that shouldn't be, but I can't explain why there are multiple entries in the database in the first place.
Do you have a staging server available for testing? I'd like to go through the process of using the forms to add and to edit the posts, and do so in a minimal environment (e.g. with the non-essential plugins all deactivated) so I can track what happens.
(I'll set another private reply in case you have some credentials to share for such a test server.)
Languages: English (English ) Spanish (Español )
Timezone: Europe/London (GMT+00:00)
Thanks for that.
I've been testing on the staging server and submitting and editing logement posts from the front end, and I've been checking the database to double-check the data stored about the notifications as I go.
I've tried with various combinations of plugins active or inactive, and I haven't been able to reproduce what I see on your production site, where there are multiple entries in wp_postmeta for details about the notifications where I would expect to see only single entries.
So I'm not any closer to understanding what is triggering that.
Would it be possible to install an activity logging plugin on your site to be able to see all the actions taken on the site, which may help identify what causes the unexpected multiple entries in the database.
And, would it be possible to quickly publish a test post on the production site (which I would delete after a couple of minutes once I'd checked the entries in the database for it)?
Yes, go ahead 😀
I forgot to mention.
Registered user filling the form is a new option. Up to now, they were filling the form as unregisterd user
So if you want to make tests, you may want to do so as unregistered.
I've removed the form page from the Access group (logged user only). So you should be able to add a form without being registered
Here is the form page: hidden link
Catherine 🙂
Languages: English (English ) Spanish (Español )
Timezone: Europe/London (GMT+00:00)
I tried adding logement posts on your production site, and everything in the database looks normal.
I've added an activity logging plugin to be able to keep track of changes on the site.
I'll keep an eye on it to see if it throws up any clues.
Languages: English (English ) Spanish (Español )
Timezone: Europe/London (GMT+00:00)
Just to note, I see that there are only a few published such posts (quite a few test posts in the trash, which I have emptied).
So I went in to wp_postmeta and manually fixed the duplicate entries relating to notifications for these few posts, so at the moment everything should be okay for the existing posts.
Let's keep an eye on if it breaks going forward, and use the activity log to try and isolate why.
Languages: English (English ) Spanish (Español )
Timezone: Europe/London (GMT+00:00)
I just checked and things still look normal.
Hi Nigel,
I just submitted a form for a test. Let me know if you see any bug in the database
hidden link
Catherine 🙂
Languages: English (English ) Spanish (Español )
Timezone: Europe/London (GMT+00:00)
Yep, that all looks good.
I also re-checked the existing posts, and there is no change there, they all have the expected entries in the database, so at the moment I wouldn't expect you to get any erroneous notifications.
Yeah 😀
I think I'll go with that for now.
Do you have a sample / picture of what a multiple-entry database looks like? I may be able to update the database myself if I see any further troubles with the notifications
Catherine 🙂
Hi Nigel
I thought that it was solved, but I just received 4 alerts (15 days) sent to one email (selection@station-1.org)
But this time, all 4 were sent at 18:33
Do you see any change in the data on your side?
The topic ‘[Closed] Bug with email notifications (multiple copies sent)’ is closed to new replies.