I am getting this error message when I go to create a new profile in tinymce:

warning: Invalid argument supplied for foreach() in /var/www/html/drupal-6.3-test/includes/form.inc on line 1182.

It does not seem to affect functionality as I am still able to create the profile and everything works otherwise. This just seems to only occur on new profiles.

I have also tried uninstalling and re-installing tinymce to see if that had any affect and it did not.

CommentFileSizeAuthor
#10 283879.patch838 bytesowen barton
#4 Picture 1.png44.47 KBTimG1

Comments

PixelClever’s picture

Category: support » bug

I am getting this same error. It is a bug, but I don't know if it really hurts anything at this point.

jimmb’s picture

Assigned: Unassigned » jimmb

I just installed TinyMCE (along with the Moxie vsn. 3.1.1), and upon creating a new profile got:

"warning: Invalid argument supplied for foreach() in /home/jimmnet/public_html/includes/form.inc on line 1189."

It seems to work OK, although there isn't any "Disable rich-text editor" link under the body field.

Colorful Tones’s picture

I just installed TinyMCE on a fresh Drupal install and received the same message: "warning: Invalid argument supplied for foreach() in /drupal6_4/includes/form.inc on line 1189." I was able to successfully create a profile though.

TimG1’s picture

Priority: Minor » Normal
StatusFileSize
new44.47 KB

I am getting the same error too. I am able to create my first profile fine. Then when I go to edit some content TinyMCE does not appear. I just see plain text as my editor.

Furthermore, all my tabs that typically have a link and a triangle to expand/collapse more admin options are gone. For example "Menu Settings", "Authoring Information", and "Publishing Information" on a basic Page node. The label for each area is still in view, but it's not a link.

When I try to create a second profile, this is all I see....

Not all user roles are shown since they already have tinymce profiles. You must first unassign profiles in order to add them to a new one.

warning: Invalid argument supplied for foreach() in /home/studiot1/public_html/includes/form.inc on line 1189.

Basic setup
Visibility
Buttons and plugins
Editor appearance
Cleanup and output
CSS

"Basic setup", "Visibility", etc are just text and not clickable. When I view source, the expanded content is still there. But, it's just hidden from view. For example, when I view source, here is what I see for Publishing Options tab when editing a page node.

<div class="options">
<fieldset class=" collapsible collapsed"><legend>Publishing options</legend><div class="form-item" id="edit-status-wrapper">
 <label class="option"><input type="checkbox" name="status" id="edit-status" value="1"  checked="checked"  class="form-checkbox" /> Published</label>

</div>
<div class="form-item" id="edit-promote-wrapper">
 <label class="option"><input type="checkbox" name="promote" id="edit-promote" value="1"   class="form-checkbox" /> Promoted to front page</label>
</div>
<div class="form-item" id="edit-sticky-wrapper">
 <label class="option"><input type="checkbox" name="sticky" id="edit-sticky" value="1"   class="form-checkbox" /> Sticky at top of lists</label>
</div>
</fieldset>
    </div>

Attached is a screenshot of the Javascript errors happening on the page.

I tried disabling the TinyMCE module and the tabs are clickable again. I've tried this in Firefox 3 and Safari 3. I'm using TinyMCE 6.x-1.1-dev on Drupal 6. This is TinyMCE Version: 3.2.0.1 from http://tinymce.moxiecode.com/download.php

Here is a list of other modules I have installed.

Administration Menu
CCK
Blog
Blog API
Comment
Database Logging
Help
Menu
Path
Taxonomy
Update Status
GeShi Filter & node
Advanced Help
Feedburner
Meta tags
Nodeaccess
TinyMCE
Webform
Views

-Tim

discursives’s picture

same error here. went to the trouble of going to Sourceforge and getting 3.0.5 of the engine, no luck.

hollybeary’s picture

I can't get it working either anymore and I've installed this module a hundred times on other sites in the past : ( Running drupal6.4 with latest version of everything.

Danic’s picture

Assigned: jimmb » Unassigned

Same error here. jimmb, are you still working at the problem?

jimmb’s picture

I'm sorry for the confusion. I assigned it to myself misunderstanding what that meant - and after the post couldn't change it. So no, I'm not a programmer and can't fix it.

All I can say is that integrating TinyMCE and Drupal 6 is such a hassle currently that I've switched to FCK editor. Not as nice, but at least it works (for the most part).

Jim

depace’s picture

In tinymce.admin.inc file, change line no. 120 from

'#default_value' => isset($edit->rids) ? array_keys((array) $edit->rids) : NULL,

to

'#default_value' => isset($edit->rids) ? array_keys((array) $edit->rids) : array(),

owen barton’s picture

Status: Active » Reviewed & tested by the community
StatusFileSize
new838 bytes

Here is a patch - very straightforward so I am going straight to RTBC

murphytwin’s picture

Hello,
How do you use the patch? I'm a bit new to drupal

owen barton’s picture

Please see http://drupal.org/patch/apply

You can also manually remove the lines with '-' and add the ones with '+'.

cgjohnson’s picture

Does replacing with

'#default_value' => isset($edit->rids) ? array_keys((array) $edit->rids) : array(),

work, and is it equally effective as the patch? I'm not a developer so this seems much easier, as long as it works. Thanks.

cloxzime’s picture

I have replaced the code below in tinymce.admin.inc. The good news, the error is not appear anymore BUT the editor still NOT appear in Content > Page/Story textbox.

'#default_value' => isset($edit->rids) ? array_keys((array) $edit->rids) : array(),

The next thing that blocked my abillity is, I am using Shared Hosting with cPanel. So that I have no privilege to use such command to install the patches as I am NOT able to access root server.

Could you please show me the right way.

Your help are greatly appreciated.

Thanks & regards,
cloxzime

lawlessbg’s picture

The patch worked to me. In the /sites/all/modules/tinymce/ directory t typed :patch -p0 < 283879.patch

owen barton’s picture

Hey Folks,

If you want to use TinyMCE on Drupal 6, I strongly suggest using http://drupal.org/project/wysiwyg instead of this module - it is under active development, and supports TinyMCE 2 and 3 (and more). I switched very shortly after I wrote this patch and am very happy with it :)

This project is either dead, or just very very dormant (and either way, WYSIWYG module is the way of the future...)

cloxzime’s picture

Hi!

I'm using shared hosting so I am unable to access the area.

I already try to patch directly from my host by kick in http://www.mywebsite.com/drupal/sites/all/modules/tinymce/patch -p0 < 283879.patch but still cannot.

Can you show me how in details.

Thanks & regards,
cloXZime

futurist’s picture

@cloxzime: There are handbook pages as suggested in #12 that explain how to patch locally (under Windows or OSX) before uploading.

nicoloye’s picture

Issue summary: View changes
Status: Reviewed & tested by the community » Closed (outdated)
Issue tags: -