Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
I'm having this issue
Uncaught TypeError: Cannot read property 'settings' of undefined
I like the way we use the CSS Classes.
at this code
(function($) {
Drupal.behaviors.selectize = {
attach: function(context, settings) {
if (typeof settings.selectize.settings != 'undefined') {
$.each(settings.selectize.settings, function(index, value) {
$('#' + index).selectize(JSON.parse(value));
});
}
}
}
})(jQuery);
But seems that it's not worked out in the right way.
Not sure we may need to add ( Classes as we add IDs ) .
Thanks.
Comment | File | Size | Author |
---|---|---|---|
#1 | Uncaught_TypeError_property_settings-2364889-1.patch | 517 bytes | z3cka |
Comments
Comment #1
z3cka CreditAttribution: z3cka commentedIt is checking for a property that does not exist yet. I was able to fix this by checking for the object instead. See patch.
Comment #2
kevinquillen CreditAttribution: kevinquillen commentedComment #3
kevinquillen CreditAttribution: kevinquillen commentedGood work.
Comment #5
kevinquillen CreditAttribution: kevinquillen commented