using module_load_include('inc', 'webform', 'components/[component type]'); will get incorrect functionality in case the components has been altered using hook_webform_component_info and the altered info is actually the included file/module.

correct is to use: webform_component_include([component type])

This issue exists on WebformConditionals->executeConditionals function defined in webform\includes\webform.webformconditionals.inc. Components number/select are loaded using:
module_load_include('inc', 'webform', 'components/number');
module_load_include('inc', 'webform', 'components/select');

Comments

aalin created an issue. See original summary.

aalin’s picture

liam morland’s picture

Status: Active » Needs review

When uploading a patch, please set status to "Needs review".

liam morland’s picture

Thanks for the patch.

Currently, if $conditional_type is "numeric", the file "components/number.inc" gets loaded, not "components/numeric.inc".

  • Liam Morland committed 7616a29 on 7.x-4.x authored by aalin
    Issue #2891776 by aalin, Liam Morland: Use webform_component_include()...
liam morland’s picture

Title: webform conditionals includes components using module_load_include instead webform_component_include » Use webform_component_include() instead of module_load_include()
Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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