selectize.js icon indicating copy to clipboard operation
selectize.js copied to clipboard

Uncaught TypeError: Cannot read property 'mixin' of undefined in 0.12.0.

Open nicholasray opened this issue 11 years ago • 14 comments

Using version 0.12.0, I get this message in the both the standalone and regular versions. Is there a fix for this?

nicholasray avatar Feb 02 '15 17:02 nicholasray

Hm, are you using require.js or any sort of bundler? The demo site is using 0.12.0 w/o this problem

brianreavis avatar Feb 02 '15 20:02 brianreavis

I just tried to use the stand alone selectize.js and I got the same error at line 535 from MicroPlugin.mixin(Selectize). It appears MicroPlugin is not defined.

My original includes (brace yourself):

<script type="text/javascript" language="javascript" src="/Scripts/jquery-2.1.1.js"></script>
<script type="text/javascript" language="javascript" src="/Scripts/jquery-ui-1.11.4.min.js"></script>
<script type="text/javascript" language="javascript" src="/Scripts/jquery.validate.min.js"></script>

<script type="text/javascript" language="javascript" src="/Scripts/bootstrap.js"></script>
<script type="text/javascript" language="javascript" src="/Scripts/bootstrap-switch.js"></script>

<script type="text/javascript" language="javascript" src="/DataTables-1.10.4/media/js/jquery.dataTables.js"></script>
<script type="text/javascript" language="javascript" src="//cdn.datatables.net/plug-ins/3cfcc339e89/integration/bootstrap/3/dataTables.bootstrap.js"></script>
<script type="text/javascript" language="javascript" src="/DataTables-1.10.4/extensions/RowGrouping/jquery.dataTables.grouping.js"></script>
<script type="text/javascript" language="javascript" src="//cdn.datatables.net/responsive/1.0.3/js/dataTables.responsive.js"></script>
<script type="text/javascript" language="javascript" src="//cdn.datatables.net/plug-ins/3cfcc339e89/sorting/enum.js"></script>

<script type="text/javascript" language="javascript" src="/Scripts/jquery.jstepper.min.js"></script>
<script type="text/javascript" language="javascript" src="/Scripts/bootbox.min.js"></script>
<script type="text/javascript" language="javascript" src="/Scripts/fake-select.js"></script>
<script type="text/javascript" language="javascript" src="/Scripts/selectize/selectize.js"></script>

This error went away when I moved the include of this file from the bottom of the list to directly under:

<script type="text/javascript" language="javascript" src="/Scripts/jquery-2.1.1.js"></script>
<script type="text/javascript" language="javascript" src="/Scripts/jquery-ui-1.11.4.min.js"></script>
<script type="text/javascript" language="javascript" src="/Scripts/jquery.validate.min.js"></script>

Hope this helps debug. Thanks for the great component!

jacobmhulse avatar Apr 23 '15 15:04 jacobmhulse

I'm using 0.12.1, standalone bundle works.

haio avatar Mar 23 '16 02:03 haio

SAme issue here with 0.12.1 Uncaught TypeError: Cannot read property 'mixin' of undefined

florentcm avatar Mar 23 '16 20:03 florentcm

I'm getting the very same, we do include jquery in our code, but I've tried both standalone and regular, I've tried moving it all around, below, above jquery but I'm still getting the error. Is there clash between the standalone and jquery? Do I need a specific version of jquery? Does it clash with other jquery plugins like jquery.complexify.js, jquery-ui.min.js, jquery.cookie.js and we have multiple others. Any help is appreciated.

twiho avatar Apr 21 '16 10:04 twiho

same here Uncaught TypeError: Cannot read property 'mixin' of undefined, error when using this version https://cdnjs.cloudflare.com/ajax/libs/selectize.js/0.12.1/js/selectize.min.js

but no problem when using this https://cdnjs.cloudflare.com/ajax/libs/selectize.js/0.12.1/js/standalone/selectize.js

hakimihamdan88 avatar May 05 '16 07:05 hakimihamdan88

I was using 0.12.1/js/standalone/selectize.min.js with requireJS and ran into this problem. Switching to the non-minified version in the standalone directory fixed this for me though I would be interested to know what's going on here. Anyone have any idea?

bradical avatar Jun 23 '16 18:06 bradical

Including mircoplugin before including selectize solved this for me.

chaitu87 avatar Jul 15 '16 01:07 chaitu87

Can someone confirm that using js/standalone/selectize.min.js at 0.12.2, this is still a problem?

joallard avatar Jul 15 '16 20:07 joallard

Confirming that there is no problem using js/standalone/selectize.min.js at 0.12.2.

bojanv91 avatar Jul 16 '16 22:07 bojanv91

Thank you @bojanv91.

Resolution: Make sure to use standalone distribution which comes with Microplugin.

joallard avatar Jul 20 '16 17:07 joallard

@joallard Just fyi I faced the same error with 0.12.2, I switched to using the standalone version which fixed the problem (both were min versions).

dwasyl avatar Jul 29 '16 09:07 dwasyl

This should be fixed at least by logging some hint on the console. I almost gave up and used another script.

styxxx avatar Aug 15 '16 09:08 styxxx

@styxxx Good point, as I've been quick to point out on other repos, good errors are clear to the cause of the problem and nudge people in how to fix it, which this is neither. However I'm sure you've found just Googling the message will bring you around here.

joallard avatar Aug 15 '16 16:08 joallard