Type: Technical Task
Affects Version/s: None
NOTE: this behavior affects master, so we should change it in master and make a backport. In ee-7.0.x it is not even executable due to a bunch of bugs in the way to the fix.
Right now, the language id associated with a form and a record are the ones from the user. We need it to be the language id of the site.
- Log in as "Test test."
- In "Instance settings", change the default language to Spanish.
- Change Test test's default language to Portuguese.
- Go to Liferay > "Conteúdo" (content) > "Formas" (Forms).
- The title should be "Novo Formulário"
- Give the new form a title, a subtitle, a page title, a page subtitle and a field. Save it.
- Go to the new form's kebab menu > "Permissões."
- Give Guest role permission to add records ("Adicionar Registro"). Save it.
#Go to /web/guest/home. Add a Form portlet (appears as "Formulário" in the list of applications.)
- In an anonymous window, access http://localhost:8080/en/web/guest/home as an unauthenticated user.
- Connect to Liferay's database using your preferred client.
- Check the value of "defaultLanguageId" JSON field in the definition column of the last row of the DDMStructure table.
- Check the value of "defaultLanguageId" JSON field in the data_ column of the last two rows of the DDMContent table.
- In step 10, the value of defaultLanguageId would be es_ES.
- In step 11, the value of defaultLanguageId would be es_ES for each row.
- In step 10, the value of defaultLanguageId will be es_ES as expected.
- In step 11, the value of defaultLanguageId will be pt_BR and en_US for each row.