Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught TypeError: Cannot read property 'Constructor' of undefined #2439

Closed
gavinju opened this issue Apr 18, 2020 · 27 comments
Closed

Uncaught TypeError: Cannot read property 'Constructor' of undefined #2439

gavinju opened this issue Apr 18, 2020 · 27 comments

Comments

@gavinju
Copy link

gavinju commented Apr 18, 2020

When I upgraded from 1.13.12 to the 1.13.14 version, some errors occurred:
“Uncaught TypeError: Cannot read property 'Constructor' of undefined”

I found there is new code in 1.13.14:
// get Bootstrap's keydown event handler for either Bootstrap 4 or Bootstrap 3
var bootstrapKeydown = $.fn.dropdown.Constructor._dataApiKeydownHandler || $.fn.dropdown.Constructor.prototype.keydown;

Please help me, how to solve this problem?
thank you very much!

Bootstrap version
4.3.1

JQuery version
3.4.1

Bootstrap-Select version
1.13.14

OS: Windows 10, macOS

@caseyjhol
Copy link
Member

Released in v1.13.15!

@Skillnter
Copy link

using 1.13.18 facing the same issue 👎

@CollectionAgency
Copy link

Error still occuring.

@RamonaBarbieru
Copy link

RamonaBarbieru commented Oct 19, 2020

Just downloaded the last release and the error is still there. Fixed by put the js link at the bottom of the page.

@TheGP
Copy link

TheGP commented Nov 5, 2020

Its caused by bootstrap js(with draggable js) loading after bootstrap-select js

@offlineC
Copy link

offlineC commented Feb 19, 2021

Try include the bootstrap js script (as what I've used from here for bootstrap v4.6). Or use the respective versions that come with the boostrap css's version.

I tried including the bootstrap script and the issue is fixed.

@manager-wiseTech
Copy link

manager-wiseTech commented Aug 20, 2021

Try to use bootstrap 4.6.0 and try to load bootstrap base files before SELECT plugin js and CSS files.

@shirgans
Copy link

I'm using Bootstrap 5.1 and loading it before the select plugin. Still, got that issue... any solution?

@shirgans
Copy link

I managed to fix that after taking the exact version as in here

@nurmuhammet-ali
Copy link

I managed to fix that after taking the exact version as in here

Thank you my man

@iheblhbib
Copy link

I managed to fix that after taking the exact version as in here

thanks man

@jthomp
Copy link

jthomp commented Apr 14, 2022

I managed to fix that after taking the exact version as in here

Fixed this for me, as well. Thanks!

@RenrevZ
Copy link

RenrevZ commented Jun 18, 2022

I managed to fix that after taking the exact version as in here

damn 2022 and this is still the solution

@Symness
Copy link

Symness commented Jul 7, 2022

I managed to fix that after taking the exact version as in here

Thanks !

@andrewsemchism
Copy link

I managed to fix that after taking the exact version as in here

Worked for me. Thanks.

@isackblue
Copy link

I managed to fix that after taking the exact version as in here

Excelent!! Working here with Bootstrap 5.20

@ekane3
Copy link

ekane3 commented Aug 3, 2022

I managed to fix that after taking the exact version as in here

Thanks very much for your answer, i spent roughly a couple of hours looking for a good cdn solution

@iankucera
Copy link

I can confirm this is fixed by latest bootstrap-select beta2 or beta3
https://cdn.jsdelivr.net/npm/bootstrap-select@1.14.0-beta3/dist/js/bootstrap-select.min.js

@muhismail015
Copy link

I can confirm this is fixed by latest bootstrap-select beta2 or beta3 https://cdn.jsdelivr.net/npm/bootstrap-select@1.14.0-beta3/dist/js/bootstrap-select.min.js

its works, thanks!!

@mithunkottayi
Copy link

It's working, thanks

@wliontb
Copy link

wliontb commented Jan 31, 2023

I can confirm this is fixed by latest bootstrap-select beta2 or beta3 https://cdn.jsdelivr.net/npm/bootstrap-select@1.14.0-beta3/dist/js/bootstrap-select.min.js

Thks

@gxcplcto
Copy link

gxcplcto commented Mar 17, 2023

In Bootstrap 5.3 I am getting this error:

Uncaught TypeError: can't access property "Constructor", $.fn.dropdown is undefined
bootstrap-select.js:3133
bootstrap-select.js:3152
bootstrap-select.js:21
bootstrap-select.js:23

I am trying to implement the Live Search.

Other scripts that I am using are:

<script src="<cms:show k_site_link />assets/js/jquery-3.0.0.js"></script>
<script src="<cms:show k_site_link />assets/js/popper.js"></script>
<script src="<cms:show k_site_link />assets/js/bootstrap.js"></script>
<script src="<cms:show k_site_link />assets/js/Chart.js"></script>
<script src="<cms:show k_site_link />assets/js/bootstrap-select.js"></script>

and they are in the same sequence as mentioned above.

@maulidailham
Copy link

the beta version didnt include search functionality!

@kriit24
Copy link

kriit24 commented Nov 28, 2023

does not worked for me. Bootstrap v5.0.0-beta3
edit: also does not work with Bootstrap v5.3.2

@Mike-A-Qian
Copy link

I can confirm this is fixed by latest bootstrap-select beta2 or beta3我可以确认这已通过最新的 bootstrap-select beta2 或 beta3 修复 https://cdn.jsdelivr.net/npm/bootstrap-select@1.14.0-beta3/dist/js/bootstrap-select.min.js

thanks

@dudugsx
Copy link

dudugsx commented Feb 24, 2024

I managed to fix that after taking the exact version as in here

Thank you, it worked for me.
bootstrap 5.1.0 and bootstrap-select 1.14.0-beta3

@baij45
Copy link

baij45 commented Jul 3, 2024

I managed to fix that after taking the exact version as in here

相当有用

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests