I'm using the latest webform-4.x and it installs just fine. However, when I go to the settings page admin/config/content/webform I get this error with no link to add fields.

Warning: Invalid argument supplied for foreach() in webform_entity_form_webform_admin_settings_alter() (line 405 of /home/jose/www/lscout/www/sites/all/modules/contrib/webform_entity/webform_entity.module).

However, if you go to the path directly admin/config/content/webform/entities/webform. You are presented with the right fields form.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dafeder’s picture

Yeah same here - what version of webform was that designed to work with? The offending code is here on line 403 of webform_entity.module:

  $webform_types = webform_entity_node_types();
  $existing_entity_types = webform_entity_get_types();
  foreach ($form['node_types']['#options'] as $option_name => &$option) {
    if (in_array($option_name, $webform_types)) {
      $admin_link = 'admin/config/content/webform/entities/' . strtr($option_name, array('_' => '-'));
...

But the form in webform 4.1 has no [node_types] element.

If I could see what this is supposed to look like I could probably create a patch.

Jon Pugh’s picture

Status: Active » Needs review
FileSize
2.9 KB

Patch attached that adds the list of webform node types with links to manage fields and manage display.

Handles missing "webform entity type" by creating a link directly to "Create Submission Type" and "Delete Submission Type" when one already exists.

tizzo’s picture

Status: Needs review » Needs work

This patch is rolled against sites/all/modules/contrib/webform_entity instead of the root of the module - reroll?

Jon Pugh’s picture

FileSize
2.9 KB

Oops!

Rerolled, and attached.

Jon Pugh’s picture

Status: Needs work » Needs review
feldmarv’s picture

patch #2 and #4 was not working on my setup. If someone else has the same problem just use the link /admin/config/content/webform/entities/webform to get the settings page from this module.

MegaChriz’s picture

When I apply the patch from #4 and go to /admin/config/content/webform I get the following error message:

Fatal error: Call to undefined function webform_entity_node_types() in /Websites/drupal/drupalsites/mailchimp/sites/all/modules/contrib/webform_entity/webform_entity.module on line 397

It looks like this patch depends on the patch from #2079807: Preserve compatibility with Webform 4: don't use variable "webform_node_types", though the patch from this issue and the patch from the other issue can't be applied both. If you apply one patch the other fails to apply and vice versa.

  • Jon Pugh authored dd0cc88 on 7.x-1.x
    Issue #2209947 by Jon Pugh: Link to webform_entity settings page missing
    
AaronBauman’s picture

Status: Needs review » Fixed

works for me.
committed.

Status: Fixed » Closed (fixed)

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