Forums

security question multi-lingual problem

bstrydom 06 Dec, 2015
Hi,

So my site is multi-lingual. I created a locale variable for the security question error result.

In other words, if the user enters the wrong value, it must show the respective locale value.

However, this just doesn't seem to work. It just throws the following results:

Please provide the answer to the following calculation: _ERROR



Is there a way to make it multi-lingual as well?

Thanks
Brett
bstrydom 06 Dec, 2015
I also noticed that after the security question goes in to error state, it loads the wrong page entirely. See below:

This is private content

GreyHead 06 Dec, 2015
Hi Brett,

I don't currently have a multi-language site to test on but in a single language using the Locales for both the element label and the error message appear to work correctly.

What do you have in the Error message box and in the Locale?

There is no obvious reason to me why an error in language strings would change the place that the form submits to. What are the two URLs you see?

Bob
bstrydom 07 Dec, 2015
Hi Bob,

You still have access to my site. You are welcome to test this yourself.

[attachment=0]error.PNG[/attachment]

In the error message box I have the following: SECURITY_QUESTION_ERROR

In the locale I have the following:
SECURITY_QUESTION_ERROR=You have entered an incorrect answer to the security question. Please try again.

This exact same locale is added in the second language:
SECURITY_QUESTION_ERROR=Jy het 'n verkeerde antwoord op die sekuriteits vraag ingegaan. Probeer asseblief weer.

The two URL's are:
This is the url that originally loads: https://www.nuwelewetygerberg.org.za/en/contact-us
If you cause the form to Error then this is the URL: https://www.nuwelewetygerberg.org.za/en/component/chronoforms5/?chronoform=Contact_Us&event=submit

Regards
Brett
GreyHead 07 Dec, 2015
Hi Brett,

This error Please provide the answer to the following calculation: _ERROR is because the Locales work using a simple search and replace. You have the following local entries:
SECURITY_QUESTION=Please provide the answer to the following calculation:
SECURITY_QUESTION_ERROR=You have entered an incorrect answer to the security question. Please try again.
When the search and replace runs, the first part of SECURITY_QUESTION_ERROR is replaced to give the message above.

To avoid these mismatched replaces I use ##xxx## to identify strings to be replaced. In this case it would be enough to change the second string to say SECURITYQUESTION_ERROR=...

Note: there is also a Strict Match option in the locales but that requires all the strings to be in square brackets.

The URL changes because the original one is an SEF URL from a menu but the form Show HTML action has Relative URL set to no so the form submits to the ChronoForms URL - which Joomla! then semi-SEFs. If this is a problem then you can use a Hidden Menu item to set a fixed action URL for the form.

Bob

PS You have both a Captcha and a HoneyPot on the form IMHO just the HoneyPot is probably enough.
This topic is locked and no more replies can be posted.