Problem/Motivation

If you use the module to allow synthesis on a media field, there are some warnings and AJAX funkiness:

  • A couple of undefined array key warnings which both come from expecting a language code in the format language-COUNTRY (eg. en-US) which isn't true for arb (standard Arabic):
    • Warning: Undefined array key 1 in Drupal\polly_media\Hook\MediaWidgetAlter->Drupal\polly_media\Hook\{closure}() (line 148 of /var/www/html/modules/polly_media/src/Hook/MediaWidgetAlter.php).
    • Warning: Undefined array key "" in Drupal\polly_media\Hook\MediaWidgetAlter->Drupal\polly_media\Hook\{closure}() (line 151 of /var/www/html/modules/polly_media/src/Hook/MediaWidgetAlter.php).
  • If you check Allow content editors to choose the voice and switch between engines, then the Voices label gets repeated - this is because an additional theme wrapper is added to the checkboxes in Checkboxes::preRenderCompositeFormElement() which is run after we've added the wrapping container that gets replaced by AJAX.
  • If you uncheck Allow content editors to choose the voice it doesn't hide the Voices checkboxes.

Steps to reproduce

  1. Set up a content type with a media field.
  2. Go to the form settings and configure the media widget to allow speech synthesis.

Issue fork polly-3593011

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

andyf created an issue. See original summary.

andyf’s picture

Assigned: andyf » Unassigned
Status: Active » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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