Notice: Undefined offset: 25 in webform_scoring_manage_rules() (line 91 of webform_scoring/includes/forms/rule.view.inc). =>
Notice: Undefined offset: 35 in webform_scoring_manage_rules() (line 91 of webform_scoring/includes/forms/rule.view.inc). =>

Add a webform field
add it to scoring
delete the field
the score cannot be deleted

CommentFileSizeAuthor
#3 delete-field-error-fix-2737023-3.patch551 byteschishah92

Comments

SocialNicheGuru created an issue. See original summary.

socialnicheguru’s picture

modified line 34 in webform_scoring/includes/forms/rule.delete.inc to remove $condition from the evaluation.
I was then able to delete any rule that had or did not have a component.
if you deleted a field, then the rule would not have a component.
You might be able to save a rule without a component.

old code:
if ($rule && $component) {
new code
if ($rule){

chishah92’s picture

Assigned: Unassigned » chishah92
Status: Active » Needs review
StatusFileSize
new551 bytes

Have added a patch as per suggestions.

Thanks!

socialnicheguru’s picture

I wanted to know from the maintainers if there was a reason to check for $component.
I thought it best to just delete any rule regardless.

chishah92’s picture

Assigned: chishah92 » Unassigned

  • JayKandari committed 018bb3f on 7.x-1.x authored by chishah92
    Issue #2737023 by chishah92, SocialNicheGuru: Delete a field that had a...

jaykandari’s picture

Version: » 7.x-1.x-dev
Status: Needs review » Fixed

Committed! Thanks for Contribution!! :)

Status: Fixed » Closed (fixed)

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