When creating an editor profile, the "Buttons and plugins" fieldset is not displayed. And submitting the form, I get the following errors:

* warning: Invalid argument supplied for foreach() in wysiwyg_editor.admin.inc on line 361.
* warning: array_filter(): The first argument should be an array in wysiwyg_editor.admin.inc on line 366.

The profile is created, and editing it after that, it works. The "Buttons and plugins" fieldset is there and no error is issued on submit.

It looks like wysiwyg_editor_get_plugins() in wysiwyg_editor_profile_form() returns an empty array when creating a profile because the 'buttons' array is empty.

Comments

sun’s picture

I guess you are trying FCKeditor?

markus_petrux’s picture

Nope, TinyMCE-3.

sun’s picture

Title: Error creating an editor profile. » PHP notices when creating a profile

Ah, I see now what you mean. (/me should read issue titles)
Yes, the profile configuration form needs a complete overhaul.

scottrigby’s picture

Ah, I'm getting this as well (on another test site) using the dev snapshot from today. Also tinymce3. Is there anything we can do to help troubleshoot?

sun’s picture

Unfortunately, no. The cause is trivial: Wysiwyg API tries to load and submit/store buttons and plugins for the configured editor in a profile; however, at profile creation time, no editor is configured for the profile. Hence, no buttons to select, and no buttons to store in the DB for this profile.

The notice/error message does not do any harm. After creating a new profile, just edit it again to configure the editor buttons.

sun’s picture

Status: Active » Fixed

The cause of this issue was fixed by #327100: Associate editors/profiles with input formats.

Status: Fixed » Closed (fixed)

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