Problem/Motivation
When I create a new event series, I get the following error message, regardless of which event type I use. I also get the error message with the standard type Master:
Warning: Array to string conversion in Drupal\Core\Entity\Sql\SqlContentEntityStorageSchema::castValue() (line 2579 of core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php).
Drupal\Core\Entity\Sql\SqlContentEntityStorageSchema::castValue(Array, Array) (Line: 1068)
Drupal\Core\Entity\Sql\SqlContentEntityStorage->mapToStorageRecord(Object, 'eventseries_field_data') (Line: 1127)
Drupal\Core\Entity\Sql\SqlContentEntityStorage->mapToDataStorageRecord(Object, 'eventseries_field_data') (Line: 1013)
Drupal\Core\Entity\Sql\SqlContentEntityStorage->saveToSharedTables(Object) (Line: 958)
Drupal\Core\Entity\Sql\SqlContentEntityStorage->doSaveFieldItems(Object) (Line: 718)
Drupal\Core\Entity\ContentEntityStorageBase->doSave(NULL, Object) (Line: 520)
Drupal\Core\Entity\EntityStorageBase->save(Object) (Line: 804)
Drupal\Core\Entity\Sql\SqlContentEntityStorage->save(Object) (Line: 339)
Drupal\Core\Entity\EntityBase->save() (Line: 285)
Drupal\Core\Entity\EntityForm->save(Array, Object) (Line: 392)
Drupal\recurring_events\Form\EventSeriesForm->save(Array, Object)
call_user_func_array(Array, Array) (Line: 114)
Drupal\Core\Form\FormSubmitter->executeSubmitHandlers(Array, Object) (Line: 52)
Drupal\Core\Form\FormSubmitter->doSubmitForm(Array, Object) (Line: 597)
Drupal\Core\Form\FormBuilder->processForm('eventseries_zeitbereich_add_form', Array, Object) (Line: 325)
Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 73)
Drupal\Core\Controller\FormController->getContentResult(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 580)
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: 169)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 81)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 718)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
Comments
Comment #2
chrisla commentedhave you tried on a clean installation or using simplytest.me to see if it works without other modules involved?
Comment #3
trichers commentedI have recreated the process on simplytest.me and do not get the error there. I have noticed that the error message is listed just as often as event instances have been created.
Comment #4
chrisla commented@trichers, I think you would need to figure out how someone else can reproduce your error. Otherwise, it could be related to some of your custom code or a combination with another module.
Comment #5
kasperg commentedI can recreate a situation where the error message above is shown on SimplyTest.me:
- Spawn a new site with Recurring Events
- Disable "Daily events" for "Enabled Recur Field Types" on /admin/structure/events/series/settings
- Create a new event series of type. Any type and data should do.
- See that an error message is shown "Warning: Array to string conversion in Drupal\Core\Entity\Sql\SqlContentEntityStorageSchema::castValue() (line 2573 of core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php)"
Comment #7
kasperg commentedI have created a merge request which should address the issue.
Comment #10
owenbush commentedComment #11
owenbush commentedThanks for the fix, this has been merged.