Type: Regression Bug
Affects Version/s: 7.0.0 DXP FP53, 7.0.X, Master
Branch Version/s:7.1.x, 7.0.x
Backported to Branch:Committed
Last Working Version:
Git Pull Request:
Steps to reproduce:
1. Create a module with two portlets
2. For each portlet, create a different Language.properties on different paths
3. Configure them each so that they read the different properties file
4. Deploy the module
5. Place both portlets on a page
Expected result: The "Hello" message that they output are specific to the portlet that was just placed
Actual result: Both portlets show the value of the language key from the resource bundle that was referenced by one of the portlets.
- Multiple portlets per module seems perfectly fine
- There's no indication that we couldn't use multiple resource bundles
- Reproduced with de-54
- Reproduced with 7.0.x (ea1ba50eec17aaf5c0f62e000a2421571fa8d151)
- Reproduced on master (1bf78e4b6a189cb376a4c95cf62a7bee6714c9f3)
Related Liferay source code:
The resource bundle lookup is set up in TagResourceBundleUtil, which gets a ResourceBundleLoader using:
Only the servlet context name is taken into account for resource bundle lookup.
After investigation, we found that the portal should be able to handle a module with 2 separate portlets that use 2 separate Language.properties files, because this used to work in Liferay 6.2 due to the way we implemented the lookup in LanguageImpl.