- Issue created by @jvollebregt-swis
A bit of peer review and refactoring later: This patch will fix the typerror and make scheduling work in media forms without needing to patch core.
Applying the core patches linked in https://www.drupal.org/node/2916730 → results in an error when adding an oembed media through the media library:
TypeError: Drupal\Core\Entity\Entity\EntityFormDisplay::collectRenderDisplay(): Argument #1 ($entity) must be of type Drupal\Core\Entity\FieldableEntityInterface, Drupal\Core\Form\FormState given, called in /var/www/html/app/core/modules/media_library/src/Form/AddFormBase.php on line 248 in Drupal\Core\Entity\Entity\EntityFormDisplay::collectRenderDisplay() (line 85 of core/lib/Drupal/Core/Entity/Entity/EntityFormDisplay.php).
Call getFormDisplay
with the entity if in the media_library_add_form_oembed
form too.
Active
2.2
Code
A bit of peer review and refactoring later: This patch will fix the typerror and make scheduling work in media forms without needing to patch core.