- 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
Comment #1
graindor commentedlooking at it.
Comment #2
mnicolas80 commentedHello,
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
Comment #3
graindor commentedHi Nicolas,
switched off the aggregate js files but issue remains.
Comment #4
graindor commentedThe 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.
Comment #5
mnicolas80 commentedYou are right graindor .... probably not correctly invalidated cache. Re-checking...
Comment #6
graindor commentedComment #7
graindor commentedThe 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.
Comment #8
graindor commentedThe 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).
Comment #9
graindor commentedComment #10
pendashteh commented@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.