Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected behaivor when more than one language provider is defined. #49

Open
frank-systopia opened this issue Jun 17, 2024 · 0 comments

Comments

@frank-systopia
Copy link

frank-systopia commented Jun 17, 2024

If you select more than one language provider, unexpected behavior may occur because the sources are processed differently than expected.
Currently, the sources are not applied to all rules one after the other in the specified order, but one after the other for each rule.

Here is an example.
Setup:
First add a language provider compatible custom field to participant to save the chosen language on registering for an event.
Second select "participant" followed by "contact" in the language provider select.
Third define two rules involving the "Preferred Language" filter option. The first rule filter is set to "German" the second to "English".

Case:
The participant sets the language on registration to "English" and is send to CiviCRM on submitting the registration form. Eventmessages now checks the first rule which filters for "German". It goes now through all provided sources of languages for this rule. So there will be no match for the language that comes with the registration which is "English". But as contact is also select in the language providers now the preferred language of the contact is checked and if that is set to "German" than the rule is met an the first email is send.
The deliberate selection of the language during registration is therefore not taken into account.

Expected behavior:
The expected behavior would be that with the language provided by the first selected option of the language providers select all rules will be checked and the email send accordingly. In the case that no match is made, the second option language is used to check all rules with it and send email accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants