Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client is experiencing an issue where notifications from WPForms are sent in English, but not in the French version. This problem seems to be related to the Conditional Logic for email notifications in French, which are being rejected according to WPForms logs.

Solution:
We recommended the following steps to troubleshoot the issue:
1. We provided a sandbox environment for the client to replicate the issue.
2. We instructed the client to log in to the sandbox, create a form in English, translate it, and test the notifications in both languages.
3. If the issue persisted, we asked for a step-by-step guide on how they reproduced the issue.
4. We provided a workaround suggested by our developers, which involves editing a specific line of code in the Notifications.php file of the WPForms Multilingual plugin. The client should first ensure they have a complete backup of their database and files. Then, they should comment out line 45 in the file by adding a double slash (

//

).

Please note that this solution might be outdated or not applicable to your case. If the issue persists, we highly recommend checking related known issues, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If necessary, please open a new support ticket in the WPML support forum.

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

Tagged: ,

This topic contains 11 replies, has 3 voices.

Last updated by drissT 1 year, 8 months ago.

Assisted by: Ilyes.

Author Posts
March 30, 2023 at 9:49 am #13365469

drissT

all the forms have been done with WPforms in English.
The translated version (with WPforms Multilingual) are correctly displayed.
Front office English and French: no issue
Back office English and French: all information is recorded within WPforms, no issue.
BUT the English notification are sent when the French version are not.

It seems that the issue is linked with the Conditional Logic for the mail notification in French. WPforms logs record that all condition logic reject the sending in French.

My guess is that there is some translation issue within those French conditional logic.

March 30, 2023 at 10:50 pm #13370847

Ahmed Mohammed
Supporter

Timezone: Africa/Cairo (GMT+02:00)

Hi there,

Thank you for contacting WPML support!

I understand that WPForms on your website don't send notifications in the translated version. And it looks like it has something to do with the conditional logic.

To be able to troubleshoot the issue, I have created a sandbox website for you to replicate that scenario. You can log in to the test website via this quick login URL: hidden link.

Please replicate the issue; we'll be happy to take it from there and see what is happening.

Looking forward to hearing back from you.

March 31, 2023 at 2:40 am #13371595

drissT

Hi Ahmed,
I'm not familiar with using this sandbox, but it looks pretty heavy as i would need to duplicate a lot of my content and redo all the setup. I cannot afford to spend a day on this.
I keep having issue with this wpforms multilingual...
Is there no way to give you access to the website and you guys check it like it use to be the process ?

March 31, 2023 at 10:12 am #13374687

Ilyes
Supporter

Languages: English (English ) French (Français )

Timezone: Pacific/Easter (GMT-05:00)

Hello once again,

Thank you for getting back to us.

In the SandBox, there’s no need to recreate your entire website from scratch. Instead, you can operate it in a minimal environment where only the affected themes/plugins are activated.

Your assistance would be greatly appreciated as this could help expedite a solution.

To simplify matters for you, I have installed WPML, WPForms, and WPForms Multilingual and set up two languages (EN and FR).

Here’s what you can do:

1- Log in to the SandBox.
2- Create a form in English.
3- Translate it as you did with your previous forms.
4- Test the notifications in both languages.

If the issue persists, could you kindly provide us with a step-by-step guide on how you reproduced the issue?

We’re eagerly awaiting your response.

Best regards,

April 4, 2023 at 4:11 am #13395755

drissT

Hi Ilyes,

So i did... Import the form within wpforms, re-translate manually all fields (cannot believe there is not easy "Export" way from WPML btw, I tried everything, none worked).
Results: same...
Data are recorded, whatever if the forms has been filled in EN or in FR.
Notifications are sent in EN and not in FR.
I still believe that the issue is coming from the conditional logic setup in WPforms for the email notification.

April 4, 2023 at 4:18 am #13395785

drissT

I am not sure I understand what you mean by "step-by-step".
Fill the form, then click "Send" (EN) or "Envoyer" (FR).
The notification email are supposed to be send with WP mail SMTP (nothing wrong there) but are not.
I assume you have full access to the WP back-end so you might as well change the "Send to email address" field into WPFORMS > Quotation (ID #102) > Settings > Notifications.
You will also find there the conditional logic for each notification.

April 4, 2023 at 3:09 pm #13401507

Ilyes
Supporter

Languages: English (English ) French (Français )

Timezone: Pacific/Easter (GMT-05:00)

Hello,

Thank you for your cooperation,

Here is an example of a step-by-step test that we made :

1- I opened and filled out the form in both languages (EN and FR)
2- I do receive both emails, both in English.
3- If I go to WPforms > Entries, I see both registers, but both are made in EN

But before further verification, please confirm that these were the proper steps to replicate the issue and if the issue is indeed about receiving emails in English instead of French for the French form and that the register in WPforms > Entries points to EN.

I’m asking you for confirmation as your original message is a bit different:

Back office English and French: all information is recorded within WPforms, no issue.
BUT the English notification are sent when the French version are not.

Looking forward to your confirmation,

Best,

April 5, 2023 at 7:12 am #13406723

drissT

Hi,
1-Opening form EN
2-Filling form EN
3-Sending form EN
4-Data recorded in WPFORMS DB
5-Notifications sent to the email indicated by the user (all conditional logic working)
6-Notifications sent to info@limajaricargo (all conditional logic working)

==> NO ISSUE

1-Opening form FR
2-Filling form FR
3-Sending form FR
4-Data recorded in WPFORMS DB
5-Notifications NOT sent to the email indicated by the user (conditional logic issue ?)
6-Notifications NOT sent to info@limajaricargo (conditional logic issue ?)

Nothing ever changed regarding the issue reported. It has always been that the notifications email setup through WPForms are NOT SENT when the form has been filled in the FRENCH version (but are SENT in the ENGLISH version).

April 6, 2023 at 7:22 am #13416735

Ilyes
Supporter

Languages: English (English ) French (Français )

Timezone: Pacific/Easter (GMT-05:00)

Hello,

Thank you for your patience,

After further verification, you were correct, It turns out that this is a bug related to the conditional logic in WPForms, and I have escalated it to developers. We apologize for the inconvenience it may have caused.

Basically, the issue happened because the Radio Labels (Conditions Fields) were translated, which messed up the conditional function.

As a workaround, you need to make sure that the Radio Labels (conditions) are matching the English (or do not translate them), here is a screenshot that you can refer to: hidden link

I will update you once it’s resolved, also please feel free to check with me later on to see the status and I will be happy to let you know the status of this fix.

Have a wonderful day,
Thank you

April 6, 2023 at 9:29 am #13418201

drissT

Dear Ilyes,

Thank you for this. indeed, this is what I thought created the issue. I will find an alternative before the patch. Thank you indeed to update me.

April 6, 2023 at 2:26 pm #13420821

Ilyes
Supporter

Languages: English (English ) French (Français )

Timezone: Pacific/Easter (GMT-05:00)

Hello again,

Thank you for your patience,

I have received an update from our developers, we suggest the following workaround:

- Please make sure you have completed a Database and files backup.
- Edit the file wp-content\plugins\wpml-wpforms\classes\Hooks\WpForms\Notifications.php at line 45 and comment it out (by adding a double slash // ) i.e :

from

$field['value'] = $this->getFieldValue( $field, $entry['fields'][ $key ], $formPostFields[ $key ], $translatedFields[ $key ] );

to

// $field['value'] = $this->getFieldValue( $field, $entry['fields'][ $key ], $formPostFields[ $key ], $translatedFields[ $key ] );

After these changes, the email will work but you will see translated choices in the email content.

I will update you once I receive more feedback,

Have a great day,

April 7, 2023 at 12:09 am #13423737

drissT

Thank you Ilyes, I follow your instructions and it seems to work so far.