Problem/Motivation

Apparently the check for modifiers in the modifiers.js is too loosely defined resulting in JS errors on administrative pages.

drupal.js?v=8.4.2:13
Uncaught TypeError: Cannot read property 'attributes' of undefined
    at Object.initAttributes (modifiers.init.js:44)
    at Object.attach (modifiers.init.js:17)
    at Object.Drupal.attachBehaviors (drupal.js?v=8.4.2:25)
    at drupal.init.js?v=8.4.2:16
    at HTMLDocument.t (ready.min.js?v=1.0.8:4)

Proposed resolution

The attached patch resolves this issue by adding an extra check to verify the "modifiers" setting exists before trying to verify properties.

Remaining tasks

reviews needed

User interface changes

none

API changes

none

Data model changes

none

Comments

attisan created an issue. See original summary.

attisan’s picture

Status: Active » Needs review
StatusFileSize
new936 bytes
kyberman’s picture

Thanks for that @attisan, nice catch! I'll definitely merge this one.

  • kyberman committed ee7a4db on 8.x-1.x
    Issue #2932254 by attisan, kyberman: Uncaught TypeError: Cannot read...
kyberman’s picture

Assigned: attisan » Unassigned
Status: Needs review » Fixed

I simplified this patch and merged, thank you.

Status: Fixed » Closed (fixed)

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