0

I see a few threads (here and here) on this error, but none of which seem to solve my issue. What is weird is that I'm receiving the TypeError: c is undefined error on my website, but if I copy/paste my table into a fiddle then it works fine without giving me the error.

Because I'm using Squarespace Version 5, I have the following code injection after the "content" element:

<script src="http://www.quelqueshoe.org/storage/javascript/jquery-3.3.1.min.js"></script>
<script src="http://www.quelqueshoe.org/storage/javascript/popper-1-14-3.js"></script>
<script src="http://www.quelqueshoe.org/storage/javascript/bootstrap-4-1-3.js"></script>
<script src="http://www.quelqueshoe.org/storage/javascript/datatables.min.js"></script>
<script src="http://www.quelqueshoe.org/storage/javascript/dataTables.bootstrap4.min.js"></script>
<script>
$(document).ready(function(){
  $('table').DataTable();
});</script>

That away all I'm doing is loading the JS files and then initializing all <table> elements based on the HTML that is static on the webpage.

I have 6 webpages that are giving me errors, however here is just one of them: http://www.quelqueshoe.org/leadership if you want to navigate the website, the other pages giving me the same error are: Vigil, Newsletters, Uncas Award, Outstanding Arrowmen, and Founders Award

Here is a code fiddle where I copy/paste the markup for my table and then added the datatables CSS/JS CDN as well as the JQuery CDN: https://codepen.io/anon/pen/qLQZym

As you can tell in the fiddle it is working without giving me the error. So why is it that in a code fiddle it works fine, but on my live website it is giving me the error and not initializing the table?

David
  • 5,877
  • 3
  • 23
  • 40
  • 1
    you have two tables and the first is not correctly formatted – gaetanoM Jan 11 '19 at 20:15
  • @gaetanoM - actually I have 6 tables and all of them have a `` and `` could you perhaps elaborate on how it is not "correctly formatted"? – David Jan 11 '19 at 21:05
  • 1
    Can you update your codepen with all the tables you have in the html source page? – gaetanoM Jan 11 '19 at 21:07
  • @gaetanoM - to clarify, the DOM was something that Squarespace injected. Whenever I copy/paste my HTML in codepen it executed properly, however whenever I copy/paste the entire HTML generated by Squarespace it did not. – David Jan 11 '19 at 21:11
  • Just finished to see your site (....Vigil) Now It works correctly. – gaetanoM Jan 11 '19 at 21:15

0 Answers0