There is a website encountered error issue thrown when authored user is deleted making the content anonymous
Steps to Reproduce:
- Create a event series with an xyz user.
- Cancel that xyz user account, Select the option Delete the user and set the content to Anonymous option.
- Now, go back to event series page and edit/clone the event that is created by that xyz user.
Here is the issue:
Error: Call to a member function getDisplayName() on null in Drupal\recurring_events\Form\EventSeriesForm->buildForm() (line 292 of /var/www/docroot/modules/contrib/recurring_events/src/Form/EventSeriesForm.php)
#0 [internal function]: Drupal\recurring_events\Form\EventSeriesForm->buildForm(Array, Object(Drupal\Core\Form\FormState))
#1 /var/www/docroot/core/lib/Drupal/Core/Form/FormBuilder.php(532): call_user_func_array(Array, Array)
#2 /var/www/docroot/core/lib/Drupal/Core/Form/FormBuilder.php(278): Drupal\Core\Form\FormBuilder->retrieveForm('eventseries_vir...', Object(Drupal\Core\Form\FormState))
#3 /var/www/docroot/core/lib/Drupal/Core/Controller/FormController.php(91): Drupal\Core\Form\FormBuilder->buildForm(Object(Drupal\recurring_events\Form\EventSeriesForm), Object(Drupal\Core\Form\FormState))
#4 [internal function]: Drupal\Core\Controller\FormController->getContentResult(Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Routing\RouteMatch))
#5 /var/www/docroot/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array)
#6 /var/www/docroot/core/lib/Drupal/Core/Render/Renderer.php(573): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#7 /var/www/docroot/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))
#8 /var/www/docroot/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array)
#9 /var/www/vendor/symfony/http-kernel/HttpKernel.php(151): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#10 /var/www/vendor/symfony/http-kernel/HttpKernel.php(68): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
#11 /var/www/docroot/modules/contrib/simple_oauth/src/HttpMiddleware/BasicAuthSwap.php(67): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#12 /var/www/docroot/core/lib/Drupal/Core/StackMiddleware/Session.php(57): Drupal\simple_oauth\HttpMiddleware\BasicAuthSwap->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#13 /var/www/docroot/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(47): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#14 /var/www/docroot/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#15 /var/www/docroot/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#16 /var/www/docroot/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(47): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#17 /var/www/docroot/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(52): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#18 /var/www/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#19 /var/www/docroot/core/lib/Drupal/Core/DrupalKernel.php(708): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#20 /var/www/docroot/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))
#21 {main}
.| Comment | File | Size | Author |
|---|---|---|---|
| #9 | 3229674-events-edit-clone-issue.patch | 1.13 KB | bharath-kondeti |
| #2 | 3229674-events-edit-clone-issue-2.patch | 1.08 KB | bharath-kondeti |
Comments
Comment #2
bharath-kondeti commentedFix for the issue. Please verify
Comment #3
bharath-kondeti commentedComment #4
owenbush commentedThanks for raising the issue. I'll try and take a look this week.
Comment #7
owenbush commentedThis has been fixed in the latest dev version for 8.x-1.x and 2.0.x
Thanks for the patch, much appreciated.
Comment #8
owenbush commentedComment #9
bharath-kondeti commentedThanks @owenbush. I am attaching the patch with final changed that is committed on the git repo.