Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Note: I am selecting version 8.x-2.0-beta1 but this problem is specific to 8.x-2.0-beta2 (it isn't an option in the select list).
We were using the alpha1 release and everything was working great (thank you!).
But we upgraded to 8.x-2.0-beta2 yesterday (and I ran the database updates successfully) and now when I try to create a new node that has a date_recur field, I get WSOD with the Assertion Error below.
Interestingly, problem does not occur when editing an existing node - just when creating a new one.
The website encountered an unexpected error. Please try again later.
AssertionError: assert(!empty($defaultDateTimeZone)) in assert() (line 173 of modules/contrib/date_recur/src/Plugin/Field/FieldType/DateRecurFieldItemList.php).
assert(, 'assert(!empty($defaultDateTimeZone))') (Line: 173)
Drupal\date_recur\Plugin\Field\FieldType\DateRecurFieldItemList::processDefaultValue(Array, Object, Object) (Line: 405)
Drupal\Core\Field\FieldConfigBase->getDefaultValue(Object) (Line: 169)
Drupal\Core\Field\FieldItemList->applyDefaultValue() (Line: 149)
Drupal\Core\Entity\ContentEntityStorageBase->initFieldValues(Object, Array) (Line: 91)
Drupal\Core\Entity\ContentEntityStorageBase->doCreate(Array) (Line: 221)
Drupal\Core\Entity\EntityStorageBase->create(Array) (Line: 110)
Drupal\node\Controller\NodeController->add(Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 582)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 151)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 99)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 78)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 693)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
Comment | File | Size | Author |
---|---|---|---|
#6 | 3028186-assert.patch | 1.03 KB | dpi |
Comments
Comment #2
dpiIt looks like there is no Start and end date time zone configured. See https://www.drupal.org/docs/8/modules/recurring-dates-field/date-recur-d...
This shouldnt be possible as form validation requires the field is configured.
Perhaps a default value was used, as inherited from datetime_range, before the feature was implemented for date_recur.
Comment #3
dpiComment #4
dpiTo be clear this isnt fixed, I'm expecting this state to be an edge case.
Comment #5
dpiAlright I got this error on one of my sites. :)
Comment #6
dpiComment #8
dpiThanks
Comment #10
dpiChanges are packaged in 8.x-2.0-beta4 and later.