Topic: Uncaught ReferenceError: bsCustomFileInput is not defined, MDB Pro 4.8.7

Allen777 pro asked 5 years ago


The Question version dropdown has not been updated. This is for MDB Pro 4.8.7, not 4.8.5!

Upgraded to MDB Pro 4.8.7 and received this error in the Console -

mdb.min.js:1 Uncaught ReferenceError: bsCustomFileInput is not defined at HTMLDocument. (mdb.min.js:1) (anonymous) @ mdb.min.js:1

We use Webpack 4 if that makes a difference.


icc free answered 5 years ago


Any update on a fix for this?


MDBootstrap staff commented 5 years ago

We are currently fixing such type of issues. This could take about a month but after this refactoring process, we plan to achieve this type of bugs disappears. We know that our package is used in all sort of development environments and we want to make it easier to use for everyone. Sorry for the inconvenience.

I want to assure you that this issue is not forgotten.


Allen777 pro answered 5 years ago


Tried the recommended solution to add bsCustomFileInput = require('bs-custom-file-input'); in bootstrap.js file and got error during compile. Frankly I doubt this will work at all. Changing bootstrap.js is just such an uncommon solution...

This is getting frustrating. This bug has been around for quite a few patch and minor version upgrade, and we cannot upgrade because of this error and we have reported it multiple times. Please look at it or we won't be able to continue to use MDB anymore.


Bartłomiej Malanowski staff commented 5 years ago

Could you please provide us a step-by-step guide on how to reproduce this issue?


Allen777 pro commented 5 years ago

Hi, I already have a repository out there as an example. It looks to me that MDB version 4.8.x is no longer compatible with Webpack. This outstanding issue has been around for months now. Look at them here - https://github.com/mdbootstrap/bootstrap-material-design/issues/245 https://github.com/mdbootstrap/bootstrap-material-design/issues/236 https://mdbootstrap.com/support/jquery/bscustomfileinput-is-not-defined/ Any idea when this will be fixed?


Adam Jakubowski staff commented 5 years ago

I forwarded the problem to our development department and it will be fixed in the next version


Allen777 pro commented 5 years ago

Thank you! Looking forward to the next version upgrade!


Adam Jakubowski staff answered 5 years ago


Hi,

Maybe try to add bsCustomFileInput = require('bs-custom-file-input'); in bootstrap.js file or toastr = require('toastr.js');to bootstrap.js

Best,

Adam


Allen777 pro answered 5 years ago


We created a sample code to demo this problem here. This was created in VS2019 and you probably need the IDE to clone this -

https://github.com/JoeYong/TestMDB1


Allen777 pro answered 5 years ago


Thanks for the reply. It is not related to a specific component, but the general application. To recreate this problem, create a simple application with JS and CSS, and reference any component such as the datepicker. User Webpack 4 to generate the compiled JS and CSS. The moment you run the app you will run into the issue that I have


Adam Jakubowski staff answered 5 years ago


Hi,

Could you explain more precisely at which component of our documentation this error occurs? So that I can recreate your problem and help you.

Best,

Adam



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • ForumUser: Pro
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: 4.8.5
  • Device: PC
  • Browser: Chrome
  • OS: Windows 10
  • Provided sample code: No
  • Provided link: No