getLocaleSettings js error in core.js
Posted: 22 Jun 2016, 20:22
I was in the process of upgrading from 5.3 to 6.0 today and I noticed that I get 'Cannot read property 'split' of undefined' javascript error whenever the page loads.
I noticed that the getLocaleSettings function in the core.js is new to Primefaces 6.0. In the following snippet b.settings.locale is empty, then it fails on the c.split
I noticed this seems to happen when I add a dataTable to the page, when I remove it the js error goes away. The data table is completely empty too
Is there a config element or something different from 5.3 that I'm missing? Any help is much appreciated!
I noticed that the getLocaleSettings function in the core.js is new to Primefaces 6.0. In the following snippet b.settings.locale is empty, then it fails on the c.split
Code: Select all
getLocaleSettings: function() {
if (!this.localeSettings) {
var c = b.settings.locale;
this.localeSettings = b.locales[c];
if (!this.localeSettings) {
this.localeSettings = b.locales[c.split("_")[0]];
if (!this.localeSettings) {
this.localeSettings = b.locales.en_US
}
}
}
return this.localeSettings
Code: Select all
<p:dataTable />