Jump to:
| Project: | FCKeditor - WYSIWYG HTML editor |
| Version: | 5.x-2.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Jorrit |
| Status: | closed (fixed) |
Issue Summary
Hi there,
I'm not sure if this belongs in the Form API issues queue or the FCKEditor queue. Here's the issue:
I have a form field that I hide from certain users by altering the #access value of the field in hook_form_alter(). While this hides the input just fine, the input is still processed through fckeditor_process_textarea(), which adds a bit of javascript. When the field is not present, the javascript causes an error (something like 'oFCKeditor_edit_body is not defined').
It doesn't look like it's possible to hook into this to prevent the javascript from being placed in the HTML - form_builder() first sets the field's #processed value to FALSE (so changing that in hook_form_alter() doesn't help), and then it runs the #process functions regardless of whether #access is set to FALSE or not.
So I think either fckeditor_process_textarea() should check whether the field has !(#access == FALSE), or form_builder() should not #process a field unless !(#access == FALSE) - but the form_builder() function might do this on purpose.
Thank you!
Comments
#1
Hmm that probably make sense, in the meantime set the #wysiwyg attribute to false in your hook.
#2
#wysiwyg will not work for 5.x. My intention is to add this to 5.x-2.x, 6.x-1.x and 6.x-2.x.
#3
My mistake, #wysiwyg does work.
#4
This should be fixed in all versions.
#5
Fixed in 5.x-2.x, 6.x-1.x and 6.x-2.x.
#6
Automatically closed -- issue fixed for 2 weeks with no activity.