At risk of creating a duplicate, I thought I'd open another issue as the last one seems to have been resolved against codebase.

I'm getting the error:
Notice: Undefined index: xxx in _webform_condtional_get_usable_child_elements() (line 616 of /var/www/example.com/sites/all/modules/webform_conditional/webform_conditional.module).
Where xxx is the id of the item.

My webform is set out with 2 initial form fields, which then expand to show others based on one of the answers.

The first conditional fieldset seemed to work fine, it was the subsequent ones that threw up this error.

I have worked around this issue for now by removing the condition from these subsequent fieldsets and putting them as children of the first, so this issue is more something to be looked in to at some point, hence the low priority.

Thanks for this module, much appreciated.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

tedbow’s picture

Status: Active » Postponed (maintainer needs more info)

To make addressing issues for this module easier I ask for an export of a Webform for bug issues. Directions can be found here: http://drupal.org/node/add/project-issue/webform_conditional

Could you please provide an export for this issue.

thanks

rahulshah_1988’s picture

Has this issue been addressed? I am getting the same kind of error

Notice: Undefined index: 29 in _webform_condtional_get_usable_child_elements() (line 616 of /home/uga/domains/uga.asu.edu/public_html/sites/all/modules/webform_conditional/webform_conditional.module).

densolis’s picture

Issue tags: +waiting-for-user

All,

I am helping Ted with this module and will be talking with him tomorrow (8-30-12). However, I see that Ted needs an export of the Webform so he can debug the issue. Can you please supply the export? Directions can be found here: http://drupal.org/node/add/project-issue/webform_conditional

Thanks,

Dennis

kiwimind’s picture

I'm hoping #2 may be able to help you as I'm reluctant to undo the fixes I've made that long ago.

If nothing is forthcoming, I'll see what I can do about mocking this up locally to help.

Thanks.

densolis’s picture

Hi kiwimind,

I am trying to duplicate your problem so we can fix it. I just finished re-writing the user documentation for this module. In the process, I exercised the module pretty well, but I could not duplicate you problem.

So, please export a node with this issue so I can test, find the problem, and hopefully get it fixed. The problem is if I can not duplicate it, I can not fix it.

Thanks,

Dennis

Anonymous’s picture

[Changing back to Active since I can supply more information for you]

I am having this exact error on a new form that one of our Content Editors created. The form seems to be working, but getting this error. I tried to do the export, but Node Export requires Uuid, which was causing problems on our installation, so I cannot create the export. Is there a way for me to export the info you need via MySQL?

UPDATE: This is NOT just happening on new forms. Forms that did not have this issue in the past are now getting this error.

zed_den’s picture

Status: Postponed (maintainer needs more info) » Active

Hi @ all,
the same problem here.
1. Created a Fieldset with two Fields and Conditions
2. Created another Fieldset and moved one of the Fields into the new Fieldset
3. The Tab "Conditional rules" at the FieldConfig is missing, but the Conditions works
4. Edit one of these Fields and at EditPage the "undefined index" notice is on the screen

Thanks :-)

creatile’s picture

I have the same issue

greggmarshall’s picture

I think I am seeing the issue, but sadly I didn't pay attention to when it appeared. I know I have been moving lots of fields around on the form and into and out of Fieldsets.

petrovichby’s picture

I'm having the same issue with Fieldsets.

densolis’s picture

All,

There seems to be a re-creatable error. Based upon the above instructions, I will try to recreate the error. However, it would be most helpful is someone could export one of the Webform so either Tedbow or I can debug the issue.

Can someone please supply the export? Directions can be found here: http://drupal.org/node/add/project-issue/webform_conditional.

rick2d2t’s picture

I am using webform_conditional-7.x-1.0-beta1 and seeing the same error.

I am attaching a node export of a simple example form.

zarko’s picture

Status: Active » Needs review
FileSize
779 bytes

The issue is quite easy to reproduce.

  1. Create a new webform
  2. Add 3 fieldsets
  3. Make the second fieldset a child of the first
  4. click the edit link for the third fieldset
  5. Notice: Undefined index: 3 in _webform_condtional_get_usable_child_elements() (line 616 of /Library/Server/Web/Data/Sites/Default/sites/all/modules/webform_conditional/webform_conditional.module).

The problem is due to the fact that the "current component", as defined by $current_cid, is not present in $form_components. It is a top level component and $form_components contains only children of top level components. Consider the attached patch.

Samvel’s picture

Works for me, thanks!

jdanthinne’s picture

#13 isn't working for me… It suppress the Notice, but after that, no components are available in the select list within the conditional fieldset…

jdanthinne’s picture

Issue summary: View changes
Status: Needs review » Active
FileSize
197.69 KB

For the record, here's an export of a webform causing troubles. Try to edit component 172 to see te notices.

silurius’s picture

I started experiencing this issue recently, whether logged in or not, and whether a particular webform has conditions or not.

Anyone come up with another fix?