Come together with the global Drupal community in Rotterdam, 28 Sept – 1 Oct 2026. Sessions, contribution, connection, and Early Bird savings until 8 June.
Yap, i am getting the same thing ... I have installed TinyMCE on drupal 6.6 and it works just fine, however on a site which i recently upgraded to 6.8 i am getting the same error message:
warning: Invalid argument supplied for foreach() in /includes/form.inc on line 1193.
I am not sure if this is due to 6.8 upgrade or not. I can create a profile, but none of the settings gets saved so in a sense its a blank profile.
I got the same problem and cannot get TinyMCE, someone have ready to get TinyMCE and without the message:
warning: Invalid argument supplied for foreach() in (...)/includes/form.inc on line 1193. ?
I have also this same problem when come to drupal 6 but i was not having problem in my drupal 5 it was working fine ...any one is there who will tell us how to solve this .................
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.
I had the image assist module installed and was having some trouble with it. I read the INSTALL.txt included with it and found these instructions. After doing these it stopped that error from occurring. Of course it is possible that this is entirely unrelated, but I thought I'd throw this out here anyhow:
-- TINYMCE PLUGIN INSTALLATION --
If you use the TinyMCE WYSIWYG editor, you need to install a plugin for Image Assist.
* Move or copy the folder 'drupalimage' in the img_assist directory to
[sites/all/]modules/tinymce/tinymce/jscripts/tiny_mce/plugins/
Edit the file plugin_reg.php in the tinymce directory. It's located in:
[sites/all/]modules/tinymce/plugin_reg.php
Add the following lines anywhere above the 'return' statement
$plugins['drupalimage'] = array();
$plugins['drupalimage']['theme_advanced_buttons1'] = array('drupalimage');
$plugins['drupalimage']['extended_valid_elements'] = array('img[class|src|border=0|alt|title|width|height|align|name|style]');
Next, go to
Administer > Site configuration > TinyMCE
and enable the drupalimage plugin in your TinyMCE profile.
ps: It is VERY IMPORTANT to read the install.txt files included with the modules!
I had a similar warning. I think this issue is related to this, this and this. I applied the patch in the latter by Grugnog2 to tinymce.admin.inc, and the warning went away. (Grugnog2 also provided a link to the handbook pages explaining how to apply patches.)
Although a bit unrelated, this might be of interest if you are using the IMCE module: I also had a problem with TinyMCE not showing a button to the (imce) image browser, so I applied this patch to tinymce.module.
And finally, in order to get the "disable rich-text" link to show when TinyMCE is enabled, I applied this patch (the patch only) to tinymce.module.
All found after a little searching in this issue queue...
Hi every one ,
I am also having this same issue before many days and today i debub how can i solve this issue actually i was having error ....
warning: Invalid argument supplied for foreach() in \includes\form.inc on line 1193.
I am having this issue and when i debug and comment the code of checkboxes in my module than this error is resolved but i have to use this checkboxes ,check my code if i m missing some minor code and tell me how can i solve this ..
$form['payment_options']['business_payment_method']= array(
'#type' => 'checkboxes',
'#title'=> t('Payment Options'),
'#default_value' => variable_get('business_payment_method',$selected_payment),
'#options' => $payment_options,
);
I am using this tell me if you understand how can i solve this issue ...
Comments
Comment #1
aesmaeil commentedYap, i am getting the same thing ... I have installed TinyMCE on drupal 6.6 and it works just fine, however on a site which i recently upgraded to 6.8 i am getting the same error message:
warning: Invalid argument supplied for foreach() in /includes/form.inc on line 1193.
I am not sure if this is due to 6.8 upgrade or not. I can create a profile, but none of the settings gets saved so in a sense its a blank profile.
Any help is greatly appreciated.
Comment #2
MrGeek commentedSame thing here on a new 6.8 install
Comment #3
etrangerequitraverselaville commentedsame problem with the new 6.8 install
Comment #4
larrysweb commented6.6 Install I get the following message
Invalid argument supplied for foreach() in /home/pelicanb/public_html/includes/form.inc on line 1194
Comment #5
truls1502I got the same problem and cannot get TinyMCE, someone have ready to get TinyMCE and without the message:
warning: Invalid argument supplied for foreach() in (...)/includes/form.inc on line 1193. ?
Comment #6
computer_jin commentedI have also this same problem when come to drupal 6 but i was not having problem in my drupal 5 it was working fine ...any one is there who will tell us how to solve this .................
Comment #7
iMinnesotan commentedSame here. I'm kind of stuck.
Comment #8
cwd commentedplease 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.
Comment #9
cwd commentedI had the image assist module installed and was having some trouble with it. I read the INSTALL.txt included with it and found these instructions. After doing these it stopped that error from occurring. Of course it is possible that this is entirely unrelated, but I thought I'd throw this out here anyhow:
ps: It is VERY IMPORTANT to read the install.txt files included with the modules!
Comment #10
futurist commentedI had a similar warning. I think this issue is related to this, this and this. I applied the patch in the latter by Grugnog2 to tinymce.admin.inc, and the warning went away. (Grugnog2 also provided a link to the handbook pages explaining how to apply patches.)
Although a bit unrelated, this might be of interest if you are using the IMCE module: I also had a problem with TinyMCE not showing a button to the (imce) image browser, so I applied this patch to tinymce.module.
And finally, in order to get the "disable rich-text" link to show when TinyMCE is enabled, I applied this patch (the patch only) to tinymce.module.
All found after a little searching in this issue queue...
Comment #11
computer_jin commentedHi every one ,
I am also having this same issue before many days and today i debub how can i solve this issue actually i was having error ....
warning: Invalid argument supplied for foreach() in \includes\form.inc on line 1193.
I am having this issue and when i debug and comment the code of checkboxes in my module than this error is resolved but i have to use this checkboxes ,check my code if i m missing some minor code and tell me how can i solve this ..
$form['payment_options']['business_payment_method']= array(
'#type' => 'checkboxes',
'#title'=> t('Payment Options'),
'#default_value' => variable_get('business_payment_method',$selected_payment),
'#options' => $payment_options,
);
I am using this tell me if you understand how can i solve this issue ...
Thanks in Advance
Azhar
4 Ace Technologies(www.4acetech.com)
karachi,Pakistan
Comment #12
truls1502I am going to close this ticket. Please re-open the ticket if you still have issue.