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)) ...

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jeqq created an issue. See original summary.

jeqq’s picture

Issue summary: View changes

Status: Needs review » Needs work

The last submitted patch, fix-construct-ContentEntityForm.patch, failed testing.

jeqq’s picture

Status: Needs work » Needs review
FileSize
1.8 KB

Remove TimeInterface parameter, removing it makes the class compatible with both version 8.2.x and 8.3.x.

jeqq’s picture

Status: Needs review » Needs work

The last submitted patch, 4: fix-construct-ContentEntityForm-4.patch, failed testing.

  • jeqq committed 873154b on 8.x-1.x
    Issue #2846218 by jeqq: Correctly construct the ContentEntityForm object
    
jeqq’s picture

Status: Needs work » Fixed

Status: Fixed » Closed (fixed)

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