Topic: SyntaxError: Invalid character '\ufffd'
cad-development asked 5 years ago
When running a page with the MDB scripts installed I am getting the following error:SyntaxError: Invalid character '\ufffd'
This occurs for mdb.min.js but not for mdb.js
Also occurs for datatables.min.js
I am assuming it is something to do with the minifying process.
Any guidance would be appreciated.
cad-development answered 5 years ago
Thanks for the reply Grzegorz
At the bottom of the I am loading the files as follows:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script type="text/javascript" src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.bundle.min.js"></script>
<script type="text/javascript" src="js/mdb.js"></script>
<script type="text/javascript" src="js/modules/material-select/material-select-view.min.js"></script>
<script type="text/javascript" src="js/addons/datatables.min.js"></script>
<script type="text/javascript" src="js/addons/datatables-select.min.js"></script>
Grzegorz Bujański staff commented 5 years ago
I add this code on my test page and I still don't have any errors. I try load a few components on page, and still nothing.
I search inside MDB '\ufffd' and only one place where it's present is jQuery library. Are you sure this error is from MDB? Which js file is the error pointing to?
By the way, you don't need import material-select-view.min.js - it's already in mdb.js. And you should import popper.js.
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- User: Free
- Premium support: No
- Technology: MDB jQuery
- MDB Version: 4.15.0
- Device: iMac
- Browser: Safari
- OS: 10.14.6
- Provided sample code: No
- Provided link: No
Grzegorz Bujański staff commented 5 years ago
Hi. How can i reproduce this error? You use framework like Laravel or Symphony or pure Js, HTML and CSS?
cad-development commented 5 years ago
Thanks for the reply.
There is no framework. Simply installed MDB into a folder and on the index page called the latest JS. Bootstrap and MDB.
Grzegorz Bujański staff commented 5 years ago
I check again, and still can't reproduce this error. Please show me your index page code.