This is too optimistically:
$.each(settings.mvw,function(id, type) {..});
Settings existing must be checked before.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

maximpodorov’s picture

Chi’s picture

Status: Needs review » Postponed (maintainer needs more info)

We always add multiple_value_widget.js file in conjunction with mvw.settings. Can you describe the steps to reproduce the bag?

maximpodorov’s picture

That was a complicated form which parts are AJAX-loaded. I saw in the debugger that $.each() argument is undefined.

Chi’s picture

Priority: Major » Normal
Status: Postponed (maintainer needs more info) » Needs work

The widget won't work without these settings. The patch is supposed just to hide the error not to fix it. Right? I assume we should find a way to get it working with ajax forms.

maximpodorov’s picture

The widget does work. But the problem is with other parts of the form which are ajaxified. JavaScript error arises after reapplying behaviors, since your behavior wants to see its settings, but they are not presented in this situation.

  • Chi committed d943bd3 on 7.x-1.x authored by maximpodorov
    Issue #2422045 by maximpodorov: Behavior uses Drupal.settings too...

  • Chi committed b464234 on 7.x-2.x authored by maximpodorov
    Issue #2422045 by maximpodorov: Behavior uses Drupal.settings too...
Chi’s picture

Status: Needs work » Fixed

It changes the matter. Committed. Thanks!

Status: Fixed » Closed (fixed)

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