I would really appreciate any help on this, as I'm now relying heavily on Ubercart's webform ( 7.x-2.2 ) integration to finish a project.

Due to other issues getting conditional statements to work with webform and ubercart I got desperate and upgraded to Webform 4 ( 7.x-4.0-alpha8 ) as it sounds great.

When first upgrading webform and webform conditionals to 4, I had a couple of errors when editing the components of existing forms:

Cannot redeclare _webform_components_form_rows()

and

Undefined index: required in webform_components_form()

After doing a full uninstall and reinstall of webform and ubercart webform, I now am unable to add any components to a webform as the add component area is blank - see screenshot. Please help!

CommentFileSizeAuthor
blank-components.png25.45 KBkhakistocracy

Comments

alpaez’s picture

Hi, for the problem with Undefined index: required in webform_components_form(), you need to change in the DATABESE in the table webform_component the name of the the value "mandatory" to "required".

Maybe its a problem in the UPDATE funtion of the module (not working the alter table for the Data Base)...

khakistocracy’s picture

Thanks for the reply. Just checked and the field is now set to 'required' already - which I assume means that index issue was fixed in the fresh install of webform and uc_webform.

I still now just have the blank components area as the last image. It's no longer reporting any error, just not allowing the creation of components. Any ideas about that?

zooter626’s picture

same. looks like it's not displaying components when enabled with webform 4.x.

glynster’s picture

Any progression on this?

Collins405’s picture

I'm getting the same error on line 635 of uc_webform.module "Cannot redeclare _webform_components_form_rows()".

Subscribing!

tobscure’s picture

Subscribing.

tobscure’s picture

I did a bit of digging and worked out that this error occurs because the module overrides all of the theme code that outputs the webform components table. This code is not compatible with Webform 4. It can simply be disabled by removing the following function (around line 570 of uc_webform.module) and clearing the cache:

function uc_webform_theme_registry_alter(&$theme_registry) {
  if (!empty($theme_registry['webform_components_form'])) {
    $theme_registry['webform_components_form']['function'] = 'uc_webform_webform_components_form';
  }
}
Joel MMCC’s picture

Issue summary: View changes

#7 worked for me. I had a different visual effect, though.

cartagena’s picture

Thanks so much--#7 worked!

hockey2112’s picture

#7 worked for me, too! Thanks!

elvin - albania drupal developer’s picture

haha, #7 worked for me, too! Thanks a lot guys!!!!

elvin - albania drupal developer’s picture

Shouldnt this be applied to the module as #7 was submitted 5 months ago :)

cycilmpembe’s picture

#7 Hi guys i removed this code but still my webform still does not show components am using uc webform 7x-2.3

<?php
function uc_webform_theme_registry_alter(&$theme_registry) {
  if (!empty($theme_registry['webform_components_form'])) {
    $theme_registry['webform_components_form']['function'] = 'uc_webform_webform_components_form';
  }
}
?>
dieuwe’s picture

Status: Active » Closed (duplicate)

Attempting to consolidate all open Webform 4.x integration issues into one.

#2416877: Webform 4.x Compatibility (patch)