• Add a field to a content type
  • Select type Text (formatted)
  • Add field
  • On the settings page you get this error:
          DrupalBehaviorError: attach ; editor: field is undefined
            DrupalBehaviorError.prototype = new Error();
        

This does not happen for Text (formatted, long) or Text (formatted, long, with summary).
Tested in Firefox 32.

Comments

graindor’s picture

Assigned: Unassigned » graindor

looking at it.

mnicolas80’s picture

Hello,

Using the same browser version, I found that the issue is relevant to the performance options.
If you don't enable the "Aggregate JavaScript files", it works. So, it has to do with the js minification mode.

Can you please confirm?

Nicolas

graindor’s picture

Hi Nicolas,
switched off the aggregate js files but issue remains.

graindor’s picture

The default value for this field is not saved either (regardless of the text format).
With Text (formatted, long) there is no problem -> problem only related to Text (formatted) field.
Text format for default value field set to "Basic HTML" but rich text editor doesn't load. Since the editor cannot be loaded, javascript returns an error.

mnicolas80’s picture

You are right graindor .... probably not correctly invalidated cache. Re-checking...

graindor’s picture

Priority: Minor » Normal
graindor’s picture

The mapping value for field.text.value in the schema is set to "label". Is this OK? I think this should be set to "text".
Update: ran new install with updated schema but problem remains.

graindor’s picture

The function findFieldForFormatSelector in editor.js fails for text field because it cannot execute $('#' + field_id).get(0) => cannot find the proper id/class within the HTML of the input field.
Another issue exists that explains it further: https://www.drupal.org/node/2348459
Will follow both to ensure js error is also resolved (but very likely will be).

graindor’s picture

pendashteh’s picture

Status: Active » Closed (duplicate)

@graindor, that's right. This problem is related to #2348459: Fields of type 'Text (formatted)' do NOT save values.

The problem is that 'name' and 'id' attributes are not generated in the markup so JavaScript cannot find the element. The issue is discussed fully on the other issue page.
I have added this problem to the issue summary of the other one.
I mark it as 'Closed (duplicate)' as this issue will be fixed when the other is fixed.