TypeError: Cannot set properties of undefined (setting 'emptyTable')
TypeError: Cannot set properties of undefined (setting 'emptyTable')
prajwalraj
Posts: 3Questions: 1Answers: 0
My project was earlier was using 1.10.1 which due to vulnerable we have decided to move at least up to 1.10.11. but facing this error when page loading:
jQuery v2.1.1 used here.
Anything to be updated here. Any help would be appreciated.
This question has an accepted answers - jump to answer
Answers
Even 1.10.11 is over 8 years old and no longer supported. 2.1.6 is the current release.
You are using an internal property there. Anything inside the DataTables settings object is liable to change, even between minor versions. You should use
i18n()
to look up language tokens.Allan
@allan
Thanks for quick response. This is like legacy code and migration to latest version is result in functionality break.
It would be great if you help me in understanding how i18n() will help me in solving the current issue.
Oh - I misread the code. You are attempting to change an internal language property, which is not supported in any version of DataTables. I had thought you were getting the value before.
Try
oSettings.oLanguage.sInfoEmpty = ...
. Again, it might break between versions since what you are doing is not supported, but I expect that to work.Allan
Thanks for the help @allan .
setting Settings.oLanguage instead of Settings.language solved the issue.