Skip Navigation

[Resolved] Expired post email notifications not populated correctly with post-specific data

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

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 27 replies, has 3 voices.

Last updated by simonM-5 2 years, 6 months ago.

Assisted by: Luo Yang.

Author
Posts
#2164397

Hi Luo

Here's a summary of two further rounds of tests:

Round 1:

NANNY ADS:
Test NAD EN 20210906 1335
- 7 day expiry notification went out correctly in English with user first name and post title included.
- 3 day expiry notification went out correctly in English with user first name and post title included.

Test NAD DE 20210906 1337
- 7 day expiry notification went out in German, included correct post title, but user first name was missing
- 3 day expiry notification went out in German, included correct post title, but user first name was missing

JOB ADS:
Test JAD EN 20210906 1416
- 7 day expiry notification went out correctly in English with user first name and post title included.
- 3 day expiry notification went out correctly in English with user first name and post title included.

Test NAD DE 20210906 1417
- 7 day expiry notifcation went out in German, included correct post title, but user first name was missing
- 3 day expiry notifcation went out in German, included correct post title, but user first name was missing

So in summary, in this round of tests:
- it worked correctly for Nanny Ads and Job Ads in English, but user name still missing in German.
- in this round of testing no repeat Ads were sent out.

Round 2:

NANNY ADS:
NAD EN 20210908 1659
- 7 day expiry notification went out correctly in English with user first name and post title included.
- 3 day expiry notification went out correctly in English with user first name and post title included.

NAD DE 20210908 1700
- 7 day expiry notification went out in German, but sent incorrectly using the text from the Job Ad notifications instead of Nanny Ad notifications!!
- 3 day expiry notification went out in German, but sent incorrectly using the text from the Job Ad notifications instead of Nanny Ad notifications!!

JOB ADS:
JAD EN 20210908 1701
- 7 day expiry notification went out correctly in English with user first name and post title included.
- 3 day expiry notification went out correctly in English with user first name and post title included.

JAD DE 20210908 1702
- 7 day expiry notifcation went out in German, included correct post title, but user first name was missing
- 3 day expiry notifcation went out in German, included correct post title, but user first name was missing

So in summary, in this round of tests:
- it worked correctly for Nanny Ads and Job Ads in English
- in this round of testing no repeat Ads were sent out
- user name still missing in all German notifications
- !! Nanny Ads in German sent out notification texts from Job Ads !!

Kind regards
Simon

#2169607

I have tried again in my localhost with a fresh WP installation + the latest version of Toolset plugins + WPML plugins, it works fine.

The shortcode works in both main language and second language:
[wpv-post-author format="meta" meta="first_name" item="%%POST_ID%%"]

See my video capture:
hidden link

So the problem is abnormal, same as your another thread, it requires to debug in your website, please update here when your staging site is ready for debug.

#2170611

HI Luo

Today would be a good day to test this. I usually work on this project Mon Wed and Fri, so Tue and Thu are good days for Toolset to work on the site if necessary.

Kind regards
Simon

#2174585

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Just wanted to update you that Luo is on vacation and will be back tomorrow.

He'll follow up on this ticket, as soon as he is back.

Thank you for your patience.

regards,
Waqar

#2187463

Hi Luo

Can I please have an update here too ? It's been 2 weeks since I heard anything.

Kind regards
Simon

#2194807

Since it is Wednesday, you are working in your staging website, so I have exported the duplicator package from your website to my localhost, but there are lots of MYSQL errors when import the database, some forms data are broken, so I tried these:
1) Deactivate all other plugins, switch to 2021 theme,
2) Create a new post form in "De" language:
- Create the new "Nanny Ad"
- Enable the option "Set expiration date for post created or edited by this form"
- Add an email notifications using option "before the automatic expiration date"
- In the email content, display the same shortcode:
[wpv-post-author format="meta" meta="first_name" item="%%POST_ID%%"]

Test above form in frontend, fill and submit this form, check the email logs, I can see the email works fine, it does display the author's first name correctly.

So there should be some other compatibility issue in your website, please update here if your staging website is ready for debug in Thursday.

#2194835

Hi Luo

Yes our site is available tomorrow for you to test on.

What do you mean with "some forms data are broken"?

Kind regards
Simon

#2195745

I have tried these in your website:
1) Create a post form for creating new "Nanny Ads" post in German language:
hidden link
- Enable the option "Set expiration date for post created or edited by this form"
- Add an email notifications using option "before the automatic expiration date"
- In the email content, display the same shortcode:
[wpv-post-author format="meta" meta="first_name" item="%%POST_ID%%"]

2) Test above form here:
hidden link

I can get the email with correct post author's first name

Can you test it? or reproduce the same problem in above post form, and provide detail steps to reproduce the same problem.

If it works fine for you, you might consider to setup the post form for creating new "Nanny Ads" again

#2199803

Hi Luo

First of all, I wasn't able to test your form right away as a Nanny, since the form was only allowed to be seen by Admins.

I used Toolset Access to set the form to Verified Nannies Group and then used user nativenanny2 to create a Nanny Ad.

When I created a Nanny Ad with it (.../de/nanny-ad/new-nanny-ad-with-luos-post-form/) it was immediately expired, depsite me having set the date to 31 Dec 2021.

I didn't receive any emails from it.

Our Nanny Ads are set to have automatic expriation in the future, so I don't think this test case is fully valid in that it doesn't reflect our real-world situation.

Kind regards
Simon

#2200335
author-first-name.png

I got the emails, see my screenshot author-first-name.JPG

I can see the author first name correctly.

And you can try these:
Edit the post form:
hidden link
Setup the expiration date to what you want
Change the email recipient to what you want, and test again

#2204755
Screenshot 2021-10-25 at 13.09.41.png

Hi Luo

I changed the form to Expert Mode to comment out the expiry date as a required field.

Then I set auto-expiry to 3 hours to account for the time difference of 2h caused by daylight saving and resubmitted a test form. So I expect to get an automated reply in about 2 hour's time.

I also tried submitting a test email but it was not showing the first name (see screenshot), but that may be just because it's a test email. So I will update you later when we get a "real" auto-expiry mail to the user nativenanny2 in approximately 2 hours.

Kind regards
Simon

#2205571
post-author-email.jpg

I have got anther new email from your website, I can see the post author name correctly, see my screenshot

#2206787

Hi Luo

I think I have identified the problem - the string translation in the WPML looks like it was still containing old code which didn't work.

Have updated the Strings in German using [wpv-post-author format="meta" meta="first_name" item="%%POST_ID%%"] and have created a couple of new Ads, will update you in a few hours once the notifications come through.

Kind regards
Simon

#2207315

My issue is resolved

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.