Steps to reproduce
- Enable polly media.
- Configure a widget on an entity type to support speech synthesis.
- 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
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
Comment #3
andyf commented