Help text is missing

Created on 9 August 2022, over 2 years ago
Updated 13 January 2024, 10 months ago

Problem/Motivation

The field help text does not display when creating or editing fields that use the plupload widget.

Steps to reproduce

  1. Setup a file upload field that uses plupload.
  2. Set help text for the field.
  3. Set the limit to 1 value (not sure if this matters but this is how mine is setup)
  4. Save and then create a new entity and see if the help text is displaying.

Proposed resolution

The following code does not appear to output anything. Perhaps there was a change in API at one point?

Simply removing this section of code will restore the help text output.

// Change the element description because
// the PLUPLOAD widget MUST have the
// extension filters as descripiton.
// @see \Drupal\plupload\Element\PlUploadFile::preRenderPlUploadFile()
// @see \Drupal\file\Plugin\Field\FieldWidget\FileWidget::formElement()
$file_upload_help = [
'#theme' => 'file_upload_help',
'#description' => '',
'#upload_validators' => '',
'#cardinality' => $configuration->cardinality,
];
$element['#description'] = \Drupal::service('renderer')->renderPlain($file_upload_help);

πŸ› Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States retiredpro

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