403 (Forbidden) error when I include jquery.dataTables.min.js in footer

395 views
Skip to first unread message

Muhammad Shahzad

unread,
Apr 14, 2017, 12:45:37 AM4/14/17
to Fat-Free Framework
Hi,

I have tried to display data in jquery data table, I included jquery.dataTables.min.js in footer:

<script src="{{ @BASE }}/minify/js/jquery-3.1.1.min.js,bootstrap.min.js,modernizr.custom.js,intercom.min.js,jquery-ui-dragsort.min.js,loadingoverlay.min.js,bootstrap-datepicker.js, bootstrap-datepicker.en-GB.js,select2.min.js,jquery.dataTables.min.js,global.js"></script>

But in console I'm getting this error:

www.example.com/subdir/minify/js/jquery…trap-datepicker.en-GB.js,select2.min.js,jquery.dataTables.min.js,global.js 403 (Forbidden)
Uncaught ReferenceError: $ is not defined
    at HTMLDocument.<anonymous> (all:1055)
    at HTMLDocument.nrWrapper (all:5)


But if I can remove jquery.dataTables.min.js from footer then jquery is working although datatable not functional.
Is it any security issue in datatable js file?

ikkez

unread,
Apr 14, 2017, 4:38:56 AM4/14/17
to Fat-Free Framework
maybe the minification breaks at some point. This can happen when a package doesn't close some statements with ; explicitly. have a look at the minified datatables.min, maybe add a ; at the end, or beginning and see if that helps..
Reply all
Reply to author
Forward
0 new messages