On every click on 'Form components' within the module there comes the message:

warning: Invalid argument supplied for foreach() in /web/1/000/034/871/111832/htdocs/drupal_print/sites/all/modules/webform/webform_components.inc on line 31.

Then after adding a new component in the area 'Edit component: ... (...)' there are also two warnings:

warning: Invalid argument supplied for foreach() in /web/1/000/034/871/111832/htdocs/drupal_print/sites/all/modules/webform/webform_components.inc on line 31.
warning: Invalid argument supplied for foreach() in /web/1/000/034/871/111832/htdocs/drupal_print/sites/all/modules/webform/webform_components.inc on line 244.

If I want to create the component by submit it doesn't work and there are still two warnings:

warning: Invalid argument supplied for foreach() in /web/1/000/034/871/111832/htdocs/drupal_print/sites/all/modules/webform/webform_components.inc on line 414.
warning: Invalid argument supplied for foreach() in /web/1/000/034/871/111832/htdocs/drupal_print/sites/all/modules/webform/webform_components.inc on line 31.

Our hoster is 'goneo' (germany)
Server-OS: FreeBSD
Drupal: 6.15
PHP: 4.4.9
MySQL: 5.0.77

Thanks for helping ...

Comments

quicksketch’s picture

These errors do not occur on a fresh installation of Drupal and Webform. Could you provide steps on how to reproduce from a clean installation?

troynt’s picture

This occurs when downgrading from webform-3.x-beta1

Delete all Webform nodes
Disable Webform 3.x beta 1
Uninstall Webform

Delete Webform directory

Download Webform 2.9
Enable Webform
Create Webform Node

I also see the issue and took the above steps multiple times.

quicksketch’s picture

Title:"warning: Invalid argument ..." in Form components» Downgrading Webform causes "warning: Invalid argument ..." in Form components
Category:bug» support

Downgrading is not supported in any way. The only way to restore Webform to a previous version is to restore a database backup.

This probably occurs because Webform does not delete webform-enabled content types on uninstall (say you had webform-enabled other content types besides "webform"). When you downgrade from 3.x to 2.x, there is still a "webform" content type in your database that is owned by Node module. Since Webform cannot "own" a node if its type is already claimed by Node module, Webform does not function properly.

quicksketch’s picture

troynt’s picture

Thanks quicksketch it appears one has to delete the webform content type in node_type table before it would work.

Working instructions here:

Delete all Webform nodes
Disable Webform 3.x beta 1
Uninstall Webform

Delete Webform directory

DELETE FROM node_type WHERE type = 'webform';

Download Webform 2.9
Enable Webform
Create Webform Node

bronchialtee’s picture

Status:Active» Closed (fixed)

Sorry for delay ...

havn't found the discussion you showed in #4.

The problem really was: 'Delete the Webform content type also.'

Now it works.

But thanks for the helpful details!!

sarjeet.singh’s picture

Working instructions here:

Disable Webform 3.x beta 1

Download Webform 2.9
Enable Webform

update node_type table
UPDATE node_type SET module='webform' WHERE `type`='webform';
clear all cache

Now it works.
(No need to delete all weform nodes and webform content type)

loophole080’s picture

#5 worked for me - doing the module uninstall seems necessary - the SQL query didn't effect anything, tho i still did it anyway

ahimsauzi’s picture

Thank troynt ,

Your instruction worked for me.

While I am on the subject, the idea that a module is released, even as a beta version, that will require such process without a proper disclaimer is mindboggling.

I do appreciate the hard work guys no question here but at one point we need to start taming the beast we all hooked on!

Thanks for listening to my venting!

lacrosse_20’s picture

#7 works! THANK YOU SO MUCH!