I have visible states setup for a 2 fields that correctly work when javascript aggregation is disabled. When I turn JS aggregation on both fields are visible no matter what option I select on the triggering field.
The error I see in the console is:
jQuery.Deferred exception: undefined is not an object (evaluating 'drupalSettings.dialog.buttonClass = 'btn'')
(anonymous function) — js_fsUR56avHuCdleLNsv7K8iPJi-p2GvAib4YZimyUwYM.js:2656
e — js_iZGsOOYcwKj6smZrna-ZUEcxHgdurhEAEKqi_VGeytE.js:1399
(anonymous function) — js_iZGsOOYcwKj6smZrna-ZUEcxHgdurhEAEKqi_VGeytE.js:1407
undefined
The exact line causing this is:
// Create the "modal" plugin bridge.
Bootstrap.Modal.Bridge = function() {
var Modal = this;
however I didn't write that line and can't seem to find it.
EDIT:
These are the errors I get with JS aggregation disabled:
[Error] TypeError: undefined is not an object (evaluating 'Bootstrap.Modal')
(anonymous function) (modal.jquery.ui.bridge.js:73)
(anonymous function) (drupal.bootstrap.js:239)
(anonymous function) (modal.jquery.ui.bridge.js:17)
Global Code (modal.jquery.ui.bridge.js:585)
[Error] TypeError: undefined is not an object (evaluating '$.fn.tooltip.Constructor.DEFAULTS')
(anonymous function) (drupal.js:14)
I'm not using any custom javascript on this page just relying purely on Drupals Form API and '#states'.
EDIT 2: Turning off "Enable Bootstrap Modals" in the themes appearance settings menu allows the states to continue working. The theme is not using a CDN(both options error out for some reason) and I'm not sure why the local compile isn't working.