Error: Call to undefined function template_preprocess_webform_element_managed_file()

Created on 9 January 2024, about 1 year ago

Problem/Motivation

Attempt to access a webform submission containing a dropzonejs field results in the following error

Error: Call to undefined function template_preprocess_webform_element_managed_file() in template_preprocess_webform_element_dropzonejs() (line 31 of modules/contrib/dropzonejs_webform/webform_dropzonejs.module).

Steps to reproduce

1. Complete a webform containing a dropzonejs field.
2. Attempt to access the submission at /admin/structure/webform/manage/{webform_id}/results/submissions
3. Encounter error.

Proposed resolution

Find out why the 'undefined function' which is defined in the webform module is not being called. Increasing the weight of the webformdropzone_js module in the core.extension.yml to ensure the webform module is implemented first solves this error.

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡¬πŸ‡§United Kingdom sabrina.liman

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @sabrina.liman
  • πŸ‡¬πŸ‡§United Kingdom sabrina.liman
  • Status changed to Closed: outdated about 1 year ago
  • πŸ‡¬πŸ‡§United Kingdom sabrina.liman
  • πŸ‡²πŸ‡¦Morocco Anouar LOUEDZIANE

    I had the same issue in my project:
    Attempting to access a webform submission containing a dropzonejs field results in the following error.

    Error: Call to undefined function template_preprocess_webform_element_managed_file() in template_preprocess_webform_element_dropzonejs() (line 13 of /modules/contrib/webform_dropzonejs/includes/webform_dropzonejs.theme.template.inc).

    The issue is due to this deprecated function module_load_include, using the ModuleHandler::loadInclude() instead seems to resolve the issue for me.

  • πŸ‡ΊπŸ‡ΈUnited States damondt

    This is also addressed in the larger D10 compatibility issue https://www.drupal.org/project/webform_dropzonejs/issues/3299484 πŸ“Œ Automated Drupal 10 compatibility fixes Needs work

  • Status changed to Closed: duplicate 8 months ago
  • πŸ‡ΊπŸ‡ΈUnited States damondt
  • Status changed to Needs review 3 days ago
  • πŸ‡¬πŸ‡·Greece fotisp

    This is not a duplicate.
    The issue reported by @damondt refers to the module "webform_dropzonejs" and not "dropzonejs_webform"
    Changing issue status to "Needs review"

Production build 0.71.5 2024