If textarea with BUEditor is rebuilt via #ajax then BUEditor will disappear. Because BUEditor is disabled for 'system/ajax' page ("Show the editor on specific pages" setting at /admin/config/content/bueditor/%editor_id).

We have the same bug on drupal.org: #2125423: Regression: bueditor buttons disappear from issue form when project is changed
Simply click on "Project" field at "Issue metadata" fieldset and focus out to reproduce it.
BUEditor will not apply to "Issue summary" field.

Attached patch fixed this problem in such way: it added ability to attach BUEditor not only by paths but per form ids also.

Comments

ufku’s picture

Would BUEditor Plus help?

bohart’s picture

Nope, I tested BUEditor Plus before creating this ticket and patch.
It has the same bug when BUEditor need to be applied to textarea generated with #ajax.

ufku’s picture

Did you consider adding system/ajax path to the visible pages list?

To be honest I have no intention to commit patches that add more complexity.

bohart’s picture

If we will add 'system/ajax' path to visible pages list then all textareas on forms generated via #ajax will have attached BUEditor. This is not a right way.

And now there is no way to add BUEditor (with BUEditor or BUEditor Plus modules) for specific forms generated via #ajax. So we can add it only for all or for any forms that returned with drupal #ajax, for now.

ufku’s picture

Status: Needs review » Closed (won't fix)

This issue is actually about field IDs not being preserved on ajax load.
I've committed a fix for this.

Form id visibility won't go in.