Currently, when accessing the URL /admin/config/development/devel/webprofiler the following uncaught error happens.
drupal.js?v=8.3.2:59 Uncaught Error: Syntax error, unrecognized expression: :input[name="active_toolbar_items[database]
at Function.fa.error (jquery.min.js?v=2.2.4:2)
at fa.tokenize (jquery.min.js?v=2.2.4:2)
at fa.select (jquery.min.js?v=2.2.4:2)
at Function.fa [as find] (jquery.min.js?v=2.2.4:2)
at n.fn.init.find (jquery.min.js?v=2.2.4:2)
at new n.fn.init (jquery.min.js?v=2.2.4:2)
at n (jquery.min.js?v=2.2.4:2)
at states.Dependent.initializeDependee (states.js?v=8.3.2:155)
at new states.Dependent (states.js?v=8.3.2:82)
at Object.attach (states.js?v=8.3.2:44)
at Object.Drupal.attachBehaviors (drupal.js?v=8.3.2:160)
at drupal.init.js?v=8.3.2:17
at HTMLDocument.t (ready.min.js?v=1.0.8:4)
fa.error @ jquery.min.js?v=2.2.4:2
fa.tokenize @ jquery.min.js?v=2.2.4:2
fa.select @ jquery.min.js?v=2.2.4:2
fa @ jquery.min.js?v=2.2.4:2
find @ jquery.min.js?v=2.2.4:2
n.fn.init @ jquery.min.js?v=2.2.4:2
n @ jquery.min.js?v=2.2.4:2
initializeDependee @ states.js?v=8.3.2:155
states.Dependent @ states.js?v=8.3.2:82
attach @ states.js?v=8.3.2:44
Drupal.attachBehaviors @ drupal.js?v=8.3.2:160
(anonymous) @ drupal.init.js?v=8.3.2:17
t @ ready.min.js?v=1.0.8:4
setTimeout (async)
Drupal.throwError @ drupal.js?v=8.3.2:59
Drupal.attachBehaviors @ drupal.js?v=8.3.2:163
(anonymous) @ drupal.init.js?v=8.3.2:17
t @ ready.min.js?v=1.0.8:4
I did a little digging and it appears to be related to a malformed selector which results in Drupal behaviors code throwing the error.
Changing that line to the following code appears to resolve the issue. I no longer see JS errors and I can still toggle the database toolbar node correctly.
'input[name="active_toolbar_items[database]"]' => array('checked' => TRUE),
I haven't worked with Drupal much at all (especially 8) and I'm not sure if there are any ramifications of my fix but it seems to work fine.
I'll see how I go about creating a pull request or where to send the patch to.
Comment | File | Size | Author |
---|---|---|---|
#3 | fix-configform-selector-2913425-1.patch | 550 bytes | bradmccormack |
Comments
Comment #2
bradmccormack CreditAttribution: bradmccormack commentedComment #3
bradmccormack CreditAttribution: bradmccormack commentedComment #6
lussolucaGood catch!
Committed and pushed to 8.x-1.x
Thanks!
Comment #7
bradmccormack CreditAttribution: bradmccormack commentedThanks !