tinyMCE - cannot create new profile
| Project: | TinyMCE |
| Version: | 6.x-1.x-dev |
| Component: | User interface |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
I have installed TinyMCE ad when trying to add a new profile I get an error :
warning: Invalid argument supplied for foreach() in /customers/darthspringbok.com/darthspringbok.com/httpd.www/test/includes/form.inc on line 1193.
Below is the text from the form.inc and line 1193 reads as follows "foreach ($form['#default_value'] as $key) { "
I cannot see anything wrong, is this a bad installation of TinyMCE or is there something that needs to be changed?
/**
* Helper function to determine the value for a checkboxes form element.
*
* @param $form
* The form element whose value is being populated.
* @param $edit
* The incoming POST data to populate the form element. If this is FALSE,
* the element's default value should be returned.
* @return
* The data that will appear in the $form_state['values'] collection
* for this element. Return nothing to use the default.
*/
function form_type_checkboxes_value($form, $edit = FALSE) {
if ($edit === FALSE) {
$value = array();
$form += array('#default_value' => array());
foreach ($form['#default_value'] as $key) {
$value[$key] = 1;
}
return $value;
}
elseif (!isset($edit)) {
return array();
}
}

#1
I can confirm this issue as I am receiving the exact same thing
#2
please note that this will not keep you from creating a profile. simply expand the "basic setup" tab listed under the error, fill in the information, and click submit.
This error appears to be linked to the TinyMCE module creating the profile page which the error occurs on. TinyMCE is probably passing an empty or NULL array and asking drupal to create a form element with it.
I don't know what element it might be trying to create, but as long as it is not an essential one I think the rest of the profile options should still work fine.
This is also documented on this page: http://drupal.org/node/346647
EDIT - the direct TinyMCE plugin has been replaced by the WYSIWYG module, which manages multiple WYSIWYG editors like fckEditor and TinyMCE