Steps to reproduce

  1. Enable polly media.
  2. Configure a widget on an entity type to support speech synthesis.
  3. Save the entity without choosing to convert to speech.

You get an error

TypeError: Drupal\Component\Utility\NestedArray::unsetValue(): Argument #2 ($parents) must be of type array, null given, called in /var/www/html/modules/polly_media/src/Hook/MediaWidgetAlter.php on line 332 in Drupal\Component\Utility\NestedArray::unsetValue() (line 222 of core/lib/Drupal/Component/Utility/NestedArray.php).
Drupal\polly_media\Hook\MediaWidgetAlter::entityToSpeechElementValidate()
call_user_func_array() (Line: 281)
Drupal\Core\Form\FormValidator->doValidateForm() (Line: 238)
Drupal\Core\Form\FormValidator->doValidateForm() (Line: 238)
Drupal\Core\Form\FormValidator->doValidateForm() (Line: 238)
Drupal\Core\Form\FormValidator->doValidateForm() (Line: 118)
Drupal\Core\Form\FormValidator->validateForm() (Line: 593)
Drupal\Core\Form\FormBuilder->processForm() (Line: 326)
Drupal\Core\Form\FormBuilder->buildForm() (Line: 73)
<snip>

Proposed resolution

Add a guard around the offending area.

Remaining tasks

User interface changes

API changes

Data model changes

Issue fork polly-3592932

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.