Download & Extend

Notice: Undefined variable: cid in webform_component_list() when trying to add a field

Project:Webform
Version:7.x-3.6
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

I get this error when I try to add new field

* Notice: Undefined variable: cid in webform_component_list() (line 869 of C:\xampp\htdocs\drupal7\sites\all\modules\webform\includes\webform.components.inc).
* Notice: Undefined index: in webform_component_list() (line 869 of C:\xampp\htdocs\drupal7\sites\all\modules\webform\includes\webform.components.inc).

If there is any solution, or help it would be so grateful.

Thanks in advance.

Comments

#1

Priority:critical» minor

Notices do not affect the functioning of your site in any way, they're just PHP saying, "I had to make an assumption here, but nothing is actually wrong." Stable releases of Drupal disable the display of notices entirely, but during development versions (including the RC versions) have this turned on. You can adjust the setting to only show errors and warnings at "admin/config/development/logging".

In any case though we should be able to get rid of these notices in the Webform code, but it's not a priority unless it's actually causing any trouble.

#2

Status:active» fixed

Thank you so much for the help and advice. Best wishes for your development works.

#3

Status:fixed» closed (fixed)

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

#4

Status:closed (fixed)» active

This bug still exists even if it's minor.

#5

Title:I get this error when I try to add new field» Notice: Undefined variable: cid in webform_component_list() when trying to add a field
Status:active» fixed

I've fixed this minor issue with the attached patch.

AttachmentSize
webform_cid_notice.patch 1.07 KB

#6

I am really sorry for re-opening it again, but sadly that patch didn't fix the error.
Here is the error again;

Notice: Undefined variable: arguments in _webform_select_options_callback() (line 791 of C:\xampp\htdocs\drupal7\sites\all\modules\webform\components\select.inc).

Thank you always for your great support and works.
AttachmentSize
error-webform.png 12.62 KB

#7

Priority:minor» major
Status:fixed» needs work

I am really sorry for re-opening it again, but sadly that patch didn't fix the error.
Here is the error again;
Notice: Undefined variable: arguments in _webform_select_options_callback() (line 791 of C:\xampp\htdocs\drupal7\sites\all\modules\webform\components\select.inc).

Thank you always for your great support and works.

(I forgot to make this post active, re-posting (sorry for the mistake).

AttachmentSize
error-webform.png 12.62 KB

#8

I've got a similar error (webform 7.x-3.4-beta1)

    * Notice: Undefined variable: cid in webform_component_list() (line 869 of /var/www/vhosts/xxxxx/httpdocs/xxxxx/sites/all/modules/webform/includes/webform.components.inc).
    * Notice: Undefined index: in webform_component_list() (line 869 of /var/www/vhosts/xxxxx/httpdocs/xxxxx/sites/all/modules/webform/includes/webform.components.inc).

#9

Priority:major» normal
Status:needs work» reviewed & tested by the community

Patch in #5 works.
It defines the variable cid (as 0) and the error vanished.

Tested on Drupal 7 (official release) and Webform 7.x-3.4-beta1.

#10

Status:reviewed & tested by the community» fixed

The patch has already been committed.

#11

Thanks

#12

I am still getting the following in 7.x-3.6 stable release :

Notice: Undefined variable: arguments in _webform_select_options_callback() (line 791 of /home3/esomscou/public_html/edentest/sites/all/modules/webform/components/select.inc).

#13

Version:7.x-3.4-beta1» 7.x-3.6
Status:fixed» needs work

I am still receiving the error also, drupal 7.0 and Webform 7.x-3.6. Same error message on line 791 of select.inc:
Notice: Undefined variable: arguments in _webform_select_options_callback() (line 791 of ......./sites/all/modules/webform/components/select.inc).

#14

Status:needs work» fixed

My bad, this is a different issue that is covered at http://drupal.org/node/1024748. See this link for the 791 issue fix.

#15

Status:fixed» needs work

Not sure if this deserves it's own issue so I'll post in here for now

Notice: Undefined index: p2 in webform_component_list() (line 873 of sites\all\modules\webform\includes\webform.components.inc).

#16

Status:needs work» fixed

@Network: Please file a new issue with a description of how to reproduce. At first glance I can't figure out why such an error would occur.

#17

Status:fixed» closed (fixed)

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