Add `#description_display` to form elements that define a `#description`

Created on 25 September 2025, 15 days ago

Problem/Motivation

At the moment in many of the admin audit trail forms there is a PHP warning:

Warning: Undefined array key "#description_display" in template_preprocess_form_element() (line 490 of /app/web/core/includes/form.inc) #0 /app/web/core/includes/bootstrap.inc(104): _drupal_error_handler_real()
#1 /app/web/core/includes/form.inc(490): _drupal_error_handler()
#2 [internal function]: template_preprocess_form_element()
#3 /app/web/core/lib/Drupal/Core/Theme/ThemeManager.php(308): call_user_func_array()

This core preprocess function requires a position for the description if a description is defined.

Steps to reproduce

Proposed resolution

Remaining tasks

  • ✅ File an issue
  • ➖ Addition/Change/Update/Fix
  • ➖ Testing to ensure no regression
  • ➖ Automated unit testing coverage
  • ➖ Automated functional testing coverage
  • ➖ UX/UI designer responsibilities
  • ➖ Readability
  • ➖ Accessibility
  • ➖ Performance
  • ➖ Security
  • ➖ Documentation
  • ➖ Code review by maintainers
  • ➖ Full testing and approval
  • ➖ Credit contributors
  • ➖ Review with the product owner
  • ➖ Release notes snippet
  • ❌ Release

API changes

  • N/A

Data model changes

  • N/A

Release notes snippet

  • N/A
🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇦🇺Australia RichardGaunt Melbourne

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

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024