Topic: Error When Doing Initial Setup
BeldenSpartan asked 3 years ago
I just purchased the MDB package, and did the install process. I then moved the index.html file to my templates folder and renamed it temp.html.
I then modified the two links in the html file to:
When i run the server and go to the page, the following errors show in the terminal:
[14/Jul/2021 11:15:56] "GET /temp/ HTTP/1.1" 200 1757Not Found: /node_modules/mdb-ui-kit/css/mdb.min.css[14/Jul/2021 11:15:56] "GET /node_modules/mdb-ui-kit/css/mdb.min.css HTTP/1.1" 404 2677Not Found: /temp/js/mdb.min.js[14/Jul/2021 11:15:56] "GET /temp/js/mdb.min.js HTTP/1.1" 404 2614Not Found: /temp/img/mdb-favicon.ico[14/Jul/2021 11:15:56] "GET /temp/img/mdb-favicon.ico HTTP/1.1" 404 2632
When I hover over the links, and ctrl+click the link, it does go to the files, so the links seem to be fine. What am I doing wrong??
Should I be copying the css, img, js, and src folders within node_modules/mdb-ui-kit into my static folder?
BeldenSpartan answered 3 years ago
Hi Gregorz - I'm doing this within VS Code for a Django web application. But having trouble even following the simple quick install instructions.
For example, if I go to my downloads page:
--> download "MDB5-STANDARD-UI-KIT-PRO-ESSENTIAL-3.9.0"
--> unzip the package
--> open the folder
--> open the index.html file in Chrome -- everything seems to be functioning
--> if I replace it with Lightbox component, that seems to work too
--> However, if I replace the code in index.html between the start and end project comments with:
<div class="multi-ranges-basic"></div>
<div id="multi-ranges-basic-value" class="mt-3">
Value:
<span class="d-flex flex-column">
<div>First:</div>
<div>Second:</div>
</span>
</div>
I only see the text of Value:, First:, Second:. I don't see a slider.
I then added:
<link rel="stylesheet" href="css/modules/multi-range.min.css" />
under:
<link rel="stylesheet" href="css/mdb.min.css" />
And then I added:
<script type="text/javascript" src="js/modules/multi-range.min.js"></script>
under:
<script type="text/javascript" src="js/mdb.min.js"></script>
But that didn't make a difference. What am I doing wrong?
Grzegorz Bujański staff commented 3 years ago
Did you add the necessary JS code? Some examples in our documentation have a JAVASCRIPT
tab and there is an additional JS code required for the correct operation of the component
BeldenSpartan answered 3 years ago
I think I have everything functioning as intended using the following:
link rel="stylesheet" href="{% static "/mdb-ui-kit/css/mdb.min.css" %}"
script type="text/javascript" src="{% static "/mdb-ui-kit/js/mdb.min.js" %}
While I can get many of the standard components to function, I seem to be having trouble with the 'pro' components. For example:
Does not return anything. And I have other display issues with Datepicker, etc. Yes, checkbox and others seem to work fine.
Is there anything special I need to do to access the 'pro' components?
Grzegorz Bujański staff commented 3 years ago
Do you use any framework? Are you sure you have a pro package installed, not free?
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 Standard
- MDB Version: MDB5 3.9.0
- Device: PC
- Browser: Chrome
- OS: Windows
- Provided sample code: No
- Provided link: No