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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

z3cka’s picture

It is checking for a property that does not exist yet. I was able to fix this by checking for the object instead. See patch.

kevinquillen’s picture

Assigned: Unassigned » kevinquillen
kevinquillen’s picture

Good work.

  • kevinquillen committed 9358f62 on 7.x-1.x authored by z3cka
    Issue #2364889 by z3cka: Uncaught TypeError: Cannot read property '...
kevinquillen’s picture

Status: Needs work » Fixed

  • kevinquillen committed 9358f62 on 8.x-1.x authored by z3cka
    Issue #2364889 by z3cka: Uncaught TypeError: Cannot read property '...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.