The module looks great, but I'm having trouble setting it up! I've just setup a clean Drupal install to test out the webform_alt_ui module. I have downloaded the newest dev releases of all related modules, and applied patches as instructed in the "how to get this modle working" thread, yet still get the following Errors thrown when visiting node/add/webform

Notice: Undefined property: stdClass::$nid in webform_configure_form() (line 17 of /sites/all/modules/webform/includes/webform.pages.inc).
Warning: Invalid argument supplied for foreach() in form_builder_webform_form_builder_load() (line 244 of /sites/all/modules/form_builder/modules/webform/form_builder_webform.module).
Notice: Undefined property: stdClass::$nid in webform_client_form() (line 1694 of /sites/all/modules/webform/webform.module).
Notice: Undefined property: stdClass::$nid in webform_client_form() (line 1707 of /sites/all/modules/webform/webform.module).
Notice: Undefined offset: 1 in webform_alt_ui_form_form_builder_preview_alter() (line 1157 of /sites/all/modules/webform_alt_ui/webform_alt_ui.module).
Warning: Invalid argument supplied for foreach() in form_builder_webform_form_builder_load() (line 244 of /sites/all/modules/form_builder/modules/webform/form_builder_webform.module).
Notice: Undefined property: stdClass::$nid in webform_client_form() (line 1694 of /sites/all/modules/webform/webform.module).
Notice: Undefined property: stdClass::$nid in webform_client_form() (line 1707 of /sites/all/modules/webform/webform.module).

These errors all disappear when I disable the webform_alt_ui module. Any ideas what would be causing this errors / how I can troubleshoot the issue?

Thanks!

CommentFileSizeAuthor
#8 fix-issues-webform-alt-ui-module.patch2.98 KBxthiago

Comments

jelle_s’s picture

I even get this when I get the code from a drupal gardens site (I didn't get it using drupal gardens...)

mckinleymedia’s picture

Same issue here.

David_Rothstein’s picture

Drupal Gardens uses the core setting that causes warnings/notices/etc to only be printed to the logs, not the screen (i.e., the setting that is recommended for production Drupal websites).

So presumably, the bug is there too, just doesn't appear as prominently as it does when your site is configured differently...

ouebDC’s picture

I have the same problem in a drupal commerce profile (quick start) here :

Notice : Undefined offset: 1 dans webform_alt_ui_form_form_builder_preview_alter() (ligne 1176 of webform_alt_ui.module).

any idea ?
thank you

mrconnerton’s picture

Since its a bit to difficult to come up with a git patch, I will just put what I did. First this is assuming you are using the drupal gardens version of webforms and related modules.

Also, please bear in mind that I have no idea how this effects anything else in the system :-P

I changed in form_builder_webform_form_builder_load on line 218 of file form_builder/modules/webform/form_builder_webform.module

if ($form_builder_type == 'webform') {

to

if ($form_builder_type == 'webform' && is_numeric($form_builder_id)) {

I have tested creating a form, including a page break, and submitting the form with no other errors.

mrconnerton’s picture

Also I think this should be moved to the form_builder project.

tripper54’s picture

Made the changes in #5 and I'm still getting this notice.

xthiago’s picture

StatusFileSize
new2.98 KB

I created a patch that fixes some warnings and noticies. Also includes the changes made by mrconnerton.

The Webform Alternate UI works fine with code exported from Drupal Gardens and this patch. Tested with Drupal standard distribution and Gardens modules (form_builder, options_element, ux_elements, webform and webform_alt_ui).

lmakarov’s picture

Status: Active » Needs work

I can confirm #8 does clean up all of the Notice and Warning messages.
Before: http://take.ms/7w41t
After: http://take.ms/635LF

While it works, it needs to be split into individual project patches (form_builder and webform_alt_ui).