Uncaught TypeError: Cannot read property 'i18n' of null
Uncaught TypeError: Cannot read property 'i18n' of null
Hi,
When I load the "Buttons" extension ("vendor/DataTables/Buttons-1.5.2/js/dataTables.buttons.js") I get the following error:
Uncaught TypeError: Cannot read property 'i18n' of null
at text (dataTables.editor.js:7401)
at text (dataTables.buttons.js:523)
at Buttons._buildButton (dataTables.buttons.js:583)
at Buttons._expandButton (dataTables.buttons.js:475)
at Buttons.add (dataTables.buttons.js:160)
at Buttons._constructor (dataTables.buttons.js:379)
at new Buttons (dataTables.buttons.js:85)
at Object.fnInit (dataTables.buttons.js:1893)
at _fnAddOptionsHtml (jquery.dataTables.js:3681)
at _fnInitialise (jquery.dataTables.js:4703)
I have used the "Download" facility to download all the scripts, and have used the suggested code to load the CSS and JS. I am avoiding the CDN approach because my internet connection is dodgy. (Hello from Africa!)
I have pasted the relevant code here: https://pastebin.com/1Dg24zTj
This discussion has been closed.
Answers
What are the
reset
andreload
buttons? Do you define them somewhere? Those aren't part of the built in button types so they would need to be added by plug-ins, but I don't see that in your code.Beyond that, can you use JSFiddle, CodePen or http://live.datatables.net to create a test case showing the issue please so I can help further debug it?
Allan
Hi Allan,
Thanks. I did remove the "reload" and "reset" buttons, but the miraculous recovery I was hoping for didn't occur.
I am working around the problem for now due to deadline pressures, but I will revisit it in a bit, and create a test case.
Sounds great. Just bump this post if you get a chance to show the issue and I'll take a look.
Allan
I have the sam issue, did you resolve it?