Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
RE: Liferay forms seem to work wrong when they are localized
Hi,
When a localized form is sent, in any other language than the default one, a validation error "Error: No value is defined for field X" is displayed. Is this a bug or is there some kind of configuration that we have not taken into account?.
Steps to reproduce it:
The error is similar to the one defined in this issue https://issues.liferay.com/browse/LPS-88020. The differences are that it is not necessary to change the default language to reproduce it and the version of Liferay. The one we use is 7.1.2 GA3.
Thanks in advance for your help. Regards.
When a localized form is sent, in any other language than the default one, a validation error "Error: No value is defined for field X" is displayed. Is this a bug or is there some kind of configuration that we have not taken into account?.
Steps to reproduce it:
- Have at least 2 languages configured as available in the instance.
- Create a form with a required field and translations for those languages.
- Add the form to a page.
- Send the form in both languages, for example, changing the url http://localhost:8080/en, http://localhost:8080/es...
The error is similar to the one defined in this issue https://issues.liferay.com/browse/LPS-88020. The differences are that it is not necessary to change the default language to reproduce it and the version of Liferay. The one we use is 7.1.2 GA3.
Thanks in advance for your help. Regards.
Unfortunately, this does seem like a bug. Keep watching the bug ticket and hopefully this will be fixed soon.
Hi Samuel,
Thanks for the reply, we will be watching it!
Regards
Thanks for the reply, we will be watching it!
Regards
If it helps someone...
As a workaround we have made a fragment to override the jsp "/portal-ddm-form-web-fragment/src/main/resources/META-INF/resources/display/view.jsp". In it we have changed the:
Regards.
As a workaround we have made a fragment to override the jsp "/portal-ddm-form-web-fragment/src/main/resources/META-INF/resources/display/view.jsp". In it we have changed the:
String languageId = ddmFormDisplayContext.getDefaultLanguageId();by:String languageId = themeDisplay.getLanguageId();Regards.