warning: Invalid argument supplied for foreach() in sites/all/modules/arrange_fields/arrange_fields.module on line 417.

I am running Drupal 6.20 on a local Mamp install.
PHP 5.2.13
JQuery 1.7

Comments

richardp’s picture

Hmm. I looked at that spot in the code, and it doesn't make sense to me why it would give you that warning. Does the page continue to load normally for you after that? As in, are you able to use the module? Also, is this a multi-page form or in any way an unusual form?

Richard

DrewMathers’s picture

I get the same error on one specific form, this one: /admin/content/node-type/webform/arrange-fields

All other content-type forms (page, story, etc.) work OK. Webform nodes work OK. Curiously, the webform content-type is missing from the listing of content-type forms at /admin/settings/arrange-fields.

DrewMathers’s picture

Seph,

To clarify my previous post, try using Create Content to create a webform node, then use Arrange Fields on the node. If you are trying Arrange Fields on the webform content type directly, that won't work.

richardp’s picture

Yes, I actually do go out of my way to make sure the webform content type itself is not listed on the menu page. I did this primarily to relieve confusion, as I figured most (all?) users of Arrange Fields would be arranging the webforms themselves, and not the webform content type ;) My thinking was that if they saw a link that said "Webform" they'd want to click it, which would cause problems. In fact, I am thinking now that this is what the original poster did.

The warning in question, it appears, happens because the webform content type's form is slightly different than the module expects. I honestly haven't looked into what needs to happen to let you arrange the content type itself, since the demand for it is so low.

Richard

DrewMathers’s picture

Category: bug » feature

Richard,

Could you make /admin/content/node-type/webform/arrange-fields a handled exception, with a drupal_set_message() error? It's not enough just to suppress that Arrange Fields tab, as a user could try it from the path. It's good to not freak out users with PHP errors.

richardp’s picture

Status: Active » Closed (won't fix)

(closing this older issue-- I decided to leave the menu structure as-is unless others report having similar problems)

michaellcarey’s picture

Version: 6.x-1.4 » 7.x-1.1
Category: feature » support
Priority: Normal » Minor

No show stopper, but I have the same problem.

An exception catch would be nice or warning level control in drupal 7.

Now Conditional Fields on Webform 3 is problematic.

Time to install Webform 4 and hope my nicely arranged fields
and validation works after migrating from Webform 3.