When I press the View tab in Webform the following error displays at the top of the page:
Notice: Undefined index: value in _webform_conditional_get_all_components() (line 660 of D:\jac\local_sites\drupal-7.4\sites\all\modules\webform_conditional\webform_conditional.module).

When I disable the module Webform_conditional the error disappears but reappears when I re-enable it.

I am using Webform 7.x-4.0-alpha4 along with some other Webform modules:
Webform Rules, Webform Import, Webform reports, Webform Revisions, Webform Rules.

I have disabled all the modules except for Webform 7.x-4.0-alpha4 and then renabled them one at a time but the error still appears.

Is there anything else I should try?

Comments

raul323’s picture

A similar problem here,

I notice the same error but printed 10x times after submiting the contact form!

This is the code that I found in the webform_conditional.module file:

function _webform_conditional_get_all_components($nid, $submitted_data = array()) {
  $sql = "SELECT * FROM {webform_component} where nid = :nid";
  $result = db_query($sql, array(':nid' => $nid));
  $components = array();
  while ($component = $result->fetchAssoc()) {
    $component['extra'] = unserialize($component['extra']);
    if (!isset($component['extra']['webform_conditional_operator'])) {
      $component['extra']['webform_conditional_operator'] = "=";
    }
    $components[$component['cid']] = $component;
    if (isset($submitted_data[$component['cid']])) {
---(Line 660)--$components[$component['cid']]['value'] = $submitted_data[$component['cid']]['value'];    }
  }
  return $components;
}
densolis’s picture

Assigned: Unassigned » densolis

All,

Hmm, I believe that all of the functionality of webform_conditional has been incorporated directly into webform 7.x-4.0-alpha6. Therefore, you should not have webform_conditional enabled (or installed) when running webform 7.x-4.0-alpha6. Please look at at the second paragraph on webform_conditional's main page.

Is this a new installation or did upgrade an existing site to webform?

If this is a new installation, then simply disabling webform_conditional should resolve your issue. I don't know if you will have to re-enter your conditional test. I've yet to install this new version of webform.

Now, if you upgraded from some prior version of webform and webform conditional to webform 7.x-4.0-alpha6, then we have an issue because the migration from webform conditional data to webform 7.x-4.0-alpha has not yet been completed. Tedbow is in the process of debugging the migration module.

So, please let me know if this is a new installation or an upgrade. If you just upgraded, can not wait for the migration, and you don't have a lot too many web forms, I'm guessing that you could manually re-enter your conditional values using the new webform 7.x-4.0-alpha6 version. However, I've yet to actually do this.

I will be talking to the module maintainer and ask him about the following issues:
1. Can you just disable the webform conditional module or do you need to uninstall it. I talked Tedbow. You need to disable the webform conditional.

2. What is the status of the webform conditional migration to webform 7.x-4.0-alpha6? The migration is still in development, so you will need to disable webform condtional and then re-enter JUST the conditional fields that are on the same page.

3. If you need to get implement the new webform module version immediately and can not wait for the webform conditional migration module to be completed, what you do?

Please let me know if you are installing a new version of webform or if you upgraded to the new version of webform. How I answer your question and how much work I have to do depends upon your answer.

Dennis

jimclegg’s picture

Dennis

Thanks for the response.

To answer your question when I disable webform conditional the errors dissappear I do not need to remove it.
At the time I wrote this on sep 11 Webform 7.x-4.0-alpha6 was not a stable version so I am using 7.x-4.0-alpha4.

I have not migrated to 7.x-4.0-alpha6 and looking at the project page by the color it is now yellow it looks like it became a more stable version on sep 15. As my webform information is not critical I can export it and will try and install webform alpha 6 and see what happens.

Jim

densolis’s picture

Jim,

Good luck. Please let me know if there is anything we can do. Unless you tell me differently, I will consider your part of this issue resolved.

I will not close this issue until I hear from raul323.

Dennis

raul323’s picture

Component: Miscellaneous » Code
Category: support » bug

Hi Dennis,

Thank you for your response, I am not sure but I believe I made an upgrade to webform module...A couple of weeks ago I performed an upgrade to several modules. Where can I check the last time a module were upgraded?

When I disable the webform_conditional module I don't have the same problem again, what does the migration do?

1) I will need to uninstall webform conditional after migrating the "conditionals" to webform?
or
2)is better to disable and uninstall the webform conditional and start over applying the conditions to my website's contact form?

because as soon as I disable the module all the conditional fields are exposed.

densolis’s picture

Component: Code » Miscellaneous
Category: bug » support

Hi raul323,

I don't know what OS you are on so I not quite sure how to check when you upgraded. I'm not sure it matters when, it just matters that you did.

The migration would take your old same page conditional setting and covert them from the way webform conditional stored them to the way webform stores them. However, this does not matter as the migration program is not yet ready.

Therefore, you will need to migrate the data by hand. To do this, you will need to:

  1. Disable webform conditional
  2. Once you are satisfied that you no longer need webform conditional, you can uninstall this module.
  3. Yes, you will need to start over and re-apply only the conditions for the same page conditionals on your website's contact form.

If I can be of any more assistance, please post your question here. Please keep me informed of you progress so I can close out this issue when you have re-entered all of your conditions.

Dennis

densolis’s picture

Component: Code » Miscellaneous
Category: bug » support
Status: Active » Closed (works as designed)
Issue tags: +migration

I'm am closing this issue because the current version of webform conditional works as designs.

There is an open issue for the automatic migration of the webform conditional data from the current version of webform conditional to the webform 7.x-4.0-alpha6.

You can post any further comment to this issue or to the link above.

Dennis