If a form (for example node creation form) does not contain any autocomplete fields, JavaScript returns the following error:

Uncaught TypeError: Cannot read property 'options' of undefined
    at node-form.js:94
    at node-form.js:113

I think we will need to add a check to see if Drupal.autocomplete exists first before applying a selectHandler in node-form.js

When JavaScript aggregation is enabled in Drupal, this issues makes all JavaScript fail on page load.

Comments

maxneaga created an issue. See original summary.

maxneaga’s picture

Issue summary: View changes

  • 72ebde7 committed on 8.x-1.x
    Issue #2922619 by maxneaga: JavaScript error on forms with no...
jepster_’s picture

Status: Active » Fixed

Thanks maxneaga for reporting this bug!

I have fixed it in the latest Git dev branch. Please re-open this issue, if you have any objections.

Status: Fixed » Closed (fixed)

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