Loop on line 8 is grabbing some selectors that don't have a name attr. Causing an error on line 8 "Uncaught TypeError: Cannot call method 'replace' of undefined".

var default_name = $(this).attr('name').replace(/\[value\]/, '[default]');

This error is stopping other javascript on the page to load. Such as ckeditor on field_body.

Provided patch to add a check if the field name is defined.

var input_field = $(this).attr('name');
if(input_field === undefined ) {
  return false;
}
var default_name = input_field.replace(/\[value\]/, '[default]');

Comments

travelertt’s picture

Issue summary: View changes
StatusFileSize
new0 bytes
travelertt’s picture

Issue summary: View changes
travelertt’s picture

StatusFileSize
new936 bytes
travelertt’s picture

Status: Active » Needs review
damienmckenna’s picture

This is exactly the same as #2088299: Open graph breaks CKEditor 4.1 only the patch takes the opposite approach.

damienmckenna’s picture

StatusFileSize
new991 bytes

A slight tweak for code compliance, and added a comment.

damienmckenna’s picture

Status: Needs review » Fixed

Committed. Thanks!

Status: Fixed » Closed (fixed)

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