Invalid argument supplied for foreach() on line 301

sweetie1 - August 12, 2008 - 13:47
Project:Deadwood
Version:6.x-1.2
Component:Code
Category:bug report
Priority:normal
Assigned:solotandem
Status:closed
Description

Hi,

i tried to convert extra_voting_forms by this module i am getting this error. i tried some other modules but still getting the same error.

* warning: Invalid argument supplied for foreach() in /sites/all/modules/deadwood/deadwood.module on line 301.
* Please select at least one conversion to apply.

thnx in advance

#1

solotandem - August 12, 2008 - 17:09

Thanks for trying out the module.

The first message is indicating that you need to load the conversion list (this is addressed in the project's release notes). The second message is indicating that you need to select some conversions to apply. In the 1.2 release, the conversion list did not load on install. Even after loading the list, none of the conversion items are selected to be applied. This is the default and will change in 1.3.

To remove the first message: After installation, go to the API changes page (admin/settings/deadwood/api) and click the "Reload the API changes" button. Using the menu hierarchy, this page is Administer / Site configuration / Module conversion. This will load the API conversion list.

Two ways to handle the second message (the first I believe is preferable):

  1. Go to the admin/settings/deadwood/api page and select the conversions to be applied by default. You can select all by checking the first check box in the list (on the header row next to "Category"). Click the "Save configuration" button.
  2. On the admin/build/deadwood page, expand the "Conversions to apply" fieldset and select the conversions to apply. This approach has the disadvantage that you need to do it each time. That is why you would set your defaults as described in item 1 above, and use this page to change those defaults at runtime, if necessary.

Let me know if this solves the issue.

I will change the code that caused the warning message, too. This will be in tonight's development release. Again, thanks for finding the warning.

#2

sweetie1 - August 14, 2008 - 11:04

Thanks for the quick response.
i tried out your new release and that error disappeared :)
thanks again.

#3

solotandem - August 14, 2008 - 18:15
Assigned to:Anonymous» solotandem
Status:active» fixed

Fixed in new release.

#4

Anonymous (not verified) - August 28, 2008 - 18:22
Status:fixed» closed

Automatically closed -- issue fixed for two weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.