This is a fix for Drupal 8.3.x
WorkspaceForm extends the ContentEntityForm but it doesn't construct it correctly. This proces errors like this:
Error: Call to a member function getRequestTime() on null in Drupal\Core\Entity\ContentEntityForm->updateChangedTime() (line 373 of /var/www/drupal8dev/core/lib/Drupal/Core/Entity/ContentEntityForm.php) #0 /var/www/drupal8dev/core/lib/Drupal/Core/Entity/ContentEntityForm.php(139): Drupal\Core\Entity\ContentEntityForm->updateChangedTime(Object(Drupal\multiversion\Entity\Workspace)) #1 [internal function]: Drupal\Core\Entity\ContentEntityForm->submitForm(Array, Object(Drupal\Core\Form\FormState)) #2 /var/www/drupal8dev/core/lib/Drupal/Core/Form/FormSubmitter.php(111): call_user_func_array(Array, Array) #3 /var/www/drupal8dev/core/lib/Drupal/Core/Form/FormSubmitter.php(51): Drupal\Core\Form\FormSubmitter->executeSubmitHandlers(Array, Object(Drupal\Core\Form\FormState)) #4 /var/www/drupal8dev/core/lib/Drupal/Core/Form/FormBuilder.php(585): Drupal\Core\Form\FormSubmitter->doSubmitForm(Array, Object(Drupal\Core\Form\FormState)) ...
Comment | File | Size | Author |
---|---|---|---|
#4 | fix-construct-ContentEntityForm-4.patch | 1.8 KB | jeqq |
fix-construct-ContentEntityForm.patch | 1.85 KB | jeqq | |
Comments
Comment #2
jeqqComment #4
jeqqRemove TimeInterface parameter, removing it makes the class compatible with both version 8.2.x and 8.3.x.
Comment #5
jeqqComment #8
jeqq