Every time I try to define a profile I get the message "Invalid argument supplied for foreach() in ...\form.inc on line 1181." The operation appears to be successful anyway.

Comments

orthoducks’s picture

PHP is v5.2.5. Drupal is v6.2. Server is Apache 2.2.8.

Nethernet’s picture

I seem to be having the same issue. Anyone have any ideas (I'm running Drupal 6.1)

orthoducks’s picture

I got the problem to go away, but I can't offer you any help -- I don't know what I did! Keep trying.

yopyop’s picture

same problem here. Drupal 6.1. Php is v4.4.8. Apache 1.3.4.1

doesn't seem to prevent us from creating a user, though.

tuwebo’s picture

Same problem here, but only when there is not (at all) profile defined before.
Making some test:
- Create the first profile --> Got warning message
- Create second profile --> No warning message
- Delete both
- Create new profile --> Got warning message

PHP is v5.1.4 Drupal is v6.2. Server is Apache 2.0.58.
tinymce 6.x-1.1-dev
tinymce 3_0_8

sifaan’s picture

I also get the error "warning: Invalid argument supplied for foreach() in .../includes/form.inc on line 1181." whenever I try to create a new profile (i.e not only at the first time)

Drupal 6.2 (on Dreamhost)
TinyMCE 6.x-1.1-dev
TinyMCE 3.0.9

aren cambre’s picture

Also get the error on 1and1.com.

Drupal 6.2
TinyMCE-1.1-dev (2008-Mar-31)
PHP 5.2.6

Here's PHPInfo:
System Linux infong 2.4 #1 SMP Tue Dec 18 22:34:10 UTC 2007 i686 GNU/Linux
Build Date May 19 2008 09:17:19
Configure Command '../configure' '--program-suffix=5' '--with-pear=/usr/lib/php5' '--with-config-file-path=/usr/lib/php5' '--with-mysqli' '--with-kerberos' '--with-imap-ssl' '--enable-soap' '--with-xsl' '--enable-mbstring=all' '--with-curl' '--with-mcrypt' '--with-gd' '--with-pdo-mysql' '--with-freetype-dir' '--with-libxml-dir' '--with-mysql' '--with-zlib' '--enable-debug=no' '--enable-safe-mode=no' '--enable-discard-path=no' '--with-png-dir' '--enable-track-vars' '--with-db' '--with-gdbm' '--enable-force-cgi-redirect' '--with-ttf' '--enable-ftp' '--enable-dbase' '--enable-memory-limit' '--enable-calendar' '--enable-wddx' '--with-jpeg-dir=/usr/src/kundenserver/jpeg-6b' '--enable-bcmath' '--enable-gd-imgstrttf' '--enable-shmop' '--enable-mhash' '--with-mhash' '--with-openssl' '--enable-xslt' '--with-xslt-sablot' '--with-dom' '--with-dom-xslt' '--with-dom-exslt' '--with-imap' '--with-iconv' '--with-bz2' '--with-gettext' '--enable-exif' '--with-idn' '--with-sqlite' '--enable-sqlite-utf8' '--enable-zip'
Server API CGI
Virtual Directory Support disabled
Configuration File (php.ini) Path /usr/lib/php5
Loaded Configuration File /[my drupal6 root directory]/php.ini
PHP API 20041225
PHP Extension 20060613
Zend Extension 220060519
Debug Build no
Thread Safety disabled
Zend Memory Manager enabled
IPv6 Support enabled
Registered PHP Streams zip, php, file, data, http, ftp, compress.bzip2, compress.zlib, https, ftps
Registered Stream Socket Transports tcp, udp, unix, udg, ssl, sslv3, sslv2, tls
Registered Stream Filters string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, convert.iconv.*, bzip2.*, zlib.*

aren cambre’s picture

Title: Run time error in Add New Tiny MCE Profile » Run time error in /admin/settings/tinymce/add (add new profile)

Making title more precise.

webchick’s picture

Same. Digging in now.

webchick’s picture

Priority: Normal » Critical

Ok, so this error comes up because there are no roles in the roles select box since permissions haven't been configured yet, since you just enabled the module. I'm also escalating this to critical because it's really not nice to barf errors all over poor users, especially first thing.

Patch coming up in a few minutes...

webchick’s picture

Status: Active » Needs review
StatusFileSize
new1.02 KB

There are a few possible ways to fix this problem; this one seems like the cleanest. If there are no roles defined, it doesn't make a whole lot of sense to even continue processing the form, does it?

webchick’s picture

Status: Needs review » Needs work

Hm. Nope. That's not it. I continue to get this error even when I assign "access tinymce" to both authenticated and anonymous and $roles is populated. Hm...

webchick’s picture

Status: Needs work » Needs review
StatusFileSize
new1017 bytes

Ah-ha! Nailed it this time. :) #default_value was getting set to NULL if this was a new profile, and form_type_checkboxes_value() expects this to be an empty array.

davecormier’s picture

ran the patch (13)... seems to have gotten rid of the error! thanks. had to provide 'path to file' not sure if that's relevant to patch creation...

webchick’s picture

Status: Needs review » Reviewed & tested by the community

Awesome. Thanks for testing!

Odotnet’s picture

How can I install a patch while being on a SHARED server?

keesje’s picture

Patch file on your local machine, then upload.

fliangz’s picture

i know this sounds really stupid since i'm really new to drupal ... but how do you actually apply the patch ? copy paste the code into certain file or overwrite a certain file? ....

orthoducks’s picture

... how do you actually apply the patch?

See http://drupal.org/patch/apply.

I use the patch utility in unxutils, which I got at http://unxutils.sourceforge.net/.

The only stupid question is the one that does not get asked.

fliangz’s picture

@jhsachs

thx a lot for that, appreciate it :D

-Anti-’s picture

I just spent three hours trying desperately to get one of the windows patch programs to work.
I've had enough of this absolute bollocks.

Could someone post an already patched tinymce.admin.inc file here please.

Cheers.

EDIT:
Never mind - I just noticed that the patch only has one word changed - doh!
I demand drupal token vouchers to the equivalent of three hours of my life...
about $1.50 worth should cover it :)

Thanks for solving this error.

aren cambre’s picture

Status: Reviewed & tested by the community » Closed (won't fix)

This module is abandoned.