giros/liferay-portal — pull request #14 by peterborkuti (2014-10-27 08:47:38+00:00)
Title: [TECHNICAL REQUEST] LPS-51101 Storing localized preferences with un-localized key for default language causes issues

Hi Giros,

Here is the fix. I named one of the commits badly:
LPS-51101 getPreferencesKey -> getLocalizedName: adapt to some tests

May I ask you to rename it to "LPS-51101 getPreferencesKey -> getLocalizedName", because I had to modify the messageboards's ConfigurationActionImpl also, not just some tests.

Moreover, I was not able to run BaseSubscriptionLocalizedContentTestCase, because I could not find out how to do this, its in portal-test internal directory.

An additional info:
I rewrote all the getPreferences... methods, to use getPreferencesKey. I noticed, that our code does not check the values in SiteDefaultLocale, and I strongly believe, that this is also a bug and I could test it with web form portlet. I think, that when we search for a preferences value with "useDefault==true", first the code should check the value for the actual language. If it is empty, it should check the language of sitedefault. If it is empty, than falling back to the default language (WCM do this, I tested it, but I did not check WCM's code yet), so I am opening a new LPS for this (I created the fix already, but it depends on this LPS).

Thank you in advance
Péter