webform_civicrm icon indicating copy to clipboard operation
webform_civicrm copied to clipboard

always load utils.inc on submission_render_alter

Open MegaphoneJon opened this issue 2 years ago • 2 comments

Overview

Drupal crashes when trying to render hidden select fields in webform submissions.

I'm not sure when this regressed - I started seeing the issue about a week ago, and see that Webform got an update, but I can't see anything in that update to cause this.

To replicate, have a hidden select field (in my case, an event picker), submit the form, then try to view it.

Before

WSOD:

Error: Call to undefined function wf_crm_field_options() in webform_civicrm_webform_submission_render_alter() (line 343 of /home/jon/local/mysite/web/sites/all/modules/webform_civicrm/webform_civicrm.module).

After

Displays.

Technical Details

I assume that this line was previously called by an earlier function in the call stack.

MegaphoneJon avatar Feb 15 '23 19:02 MegaphoneJon

This is on 7.x?

KarinG avatar Feb 16 '23 00:02 KarinG

@KarinG Yes, sorry, I should have specified in the title.

MegaphoneJon avatar Feb 20 '23 17:02 MegaphoneJon