Problem/Motivation

WSOD when preview

Drupal\Core\Entity\EntityMalformedException: The "node" entity cannot have a URI as it does not have an ID in Drupal\Core\Entity\EntityBase->toUrl() (line 161 of core/lib/Drupal/Core/Entity/EntityBase.php).
Drupal\social_node\Entity\Node->toUrl('canonical', Array) (Line: 155)
Drupal\social_event_addtocal\Plugin\SocialAddToCalendarBase->getEventDescription(Object) (Line: 91)
Drupal\social_event_addtocal\Plugin\SocialAddToCalendarBase->generateSettings(Object) (Line: 27)
Drupal\social_event_addtocal\Plugin\SocialAddToCalendar\AddToOutlook->generateUrl(Object) (Line: 255)
_social_event_addtocal_get_links(Object) (Line: 107)
social_event_addtocal_node_view(Array, Object, Object, 'full')
call_user_func_array(Object, Array) (Line: 426)
Drupal\Core\Extension\ModuleHandler->Drupal\Core\Extension\{closure}(Object, 'social_event_addtocal') (Line: 405)
Drupal\Core\Extension\ModuleHandler->invokeAllWith('node_view', Object) (Line: 433)
Drupal\Core\Extension\ModuleHandler->invokeAll('node_view', Array) (Line: 288)
Drupal\Core\Entity\EntityViewBuilder->buildMultiple(Array) (Line: 239)
Drupal\Core\Entity\EntityViewBuilder->build(Array)
call_user_func_array(Array, Array) (Line: 101)
Drupal\Core\Render\Renderer->doTrustedCallback(Array, Array, 'Render #pre_render callbacks must be methods of a class that implements \Drupal\Core\Security\TrustedCallbackInterface or be an anonymous function. The callback was %s. See https://www.drupal.org/node/2966725', 'exception', 'Drupal\Core\Render\Element\RenderCallbackInterface') (Line: 788)
Drupal\Core\Render\Renderer->doCallback('#pre_render', Array, Array) (Line: 374)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 204)
Drupal\Core\Render\Renderer->render(Array, ) (Line: 242)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 580)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 243)
Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object, Object) (Line: 132)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object)
call_user_func(Array, Object, 'kernel.view', Object) (Line: 142)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object, 'kernel.view') (Line: 174)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 81)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 54)
Drupal\simple_oauth\HttpMiddleware\BasicAuthSwap->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: 728)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

Steps to reproduce

enable social_event_addtocal
create a new event
do not save it
preview it
WSOD with the above error

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Comments

SocialNicheGuru created an issue. See original summary.

socialnicheguru’s picture

Status: Active » Needs review
StatusFileSize
new1.42 KB
socialnicheguru’s picture

upload a new patch for Opensocial (OS) 11.9.6

ronaldtebrake’s picture

Adding it here, in a slightly changed format - https://github.com/goalgorilla/open_social/pull/3668

robertragas’s picture

Approved and merged.

Will be landing in OS 12.0.2

People can use the patch in here for OS 11, but we are not officially supporting/releasing for this version as it also uses Drupal 9 which is EOL.

robertragas’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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