Error when Syslog Enabled

Created on 11 January 2022, almost 3 years ago
Updated 5 April 2023, over 1 year ago

Problem/Motivation

When Syslog module is enabled, we receive "The website encountered an unexpected error. Please try again later." when attempting to register using an email that is not whitelisted.

Steps to reproduce

Deny all emails, whitelist select email and domains, enable and configure Syslog, register a user who is not whitelisted/allowed to create an account. When Syslog is disabled, User Restrictions works as expected.

Here's the error:
Recoverable fatal error: Object of class Drupal\Core\Link could not be converted to string in Drupal\syslog\Logger\SysLog->log() (line 79 of /var/www/web/core/modules/syslog/src/Logger/SysLog.php)
#0 /var/www/web/core/includes/bootstrap.inc(312): _drupal_error_handler_real(4096, 'Object of class...', '/var/www/web/co...', 79)
#1 [internal function]: _drupal_error_handler(4096, 'Object of class...', '/var/www/web/co...', 79, Array)
#2 /var/www/web/core/modules/syslog/src/Logger/SysLog.php(79): strtr('Restricted emai...', Array)
#3 /var/www/web/core/lib/Drupal/Core/Logger/LoggerChannel.php(127): Drupal\syslog\Logger\SysLog->log(5, 'Restricted emai...', Array)
#4 /var/www/vendor/psr/log/Psr/Log/LoggerTrait.php(99): Drupal\Core\Logger\LoggerChannel->log(5, 'Restricted emai...', Array)
#5 /var/www/web/modules/contrib/user_restrictions/src/Plugin/UserRestrictionType/Email.php(33): Drupal\Core\Logger\LoggerChannel->notice('Restricted emai...', Array)
#6 /var/www/web/modules/contrib/user_restrictions/src/UserRestrictionsManager.php(67): Drupal\user_restrictions\Plugin\UserRestrictionType\Email->matches(Array)
#7 /var/www/web/modules/contrib/user_restrictions/user_restrictions.module(100): Drupal\user_restrictions\UserRestrictionsManager->matchesRestrictions(Array)
#8 [internal function]: user_restrictions_validate(Array, Object(Drupal\Core\Form\FormState))
#9 /var/www/web/core/lib/Drupal/Core/Form/FormValidator.php(82): call_user_func_array('user_restrictio...', Array)
#10 /var/www/web/core/lib/Drupal/Core/Form/FormValidator.php(275): Drupal\Core\Form\FormValidator->executeValidateHandlers(Array, Object(Drupal\Core\Form\FormState))
#11 /var/www/web/core/lib/Drupal/Core/Form/FormValidator.php(118): Drupal\Core\Form\FormValidator->doValidateForm(Array, Object(Drupal\Core\Form\FormState), 'user_register_f...')
#12 /var/www/web/core/lib/Drupal/Core/Form/FormBuilder.php(589): Drupal\Core\Form\FormValidator->validateForm('user_register_f...', Array, Object(Drupal\Core\Form\FormState))
#13 /var/www/web/core/lib/Drupal/Core/Form/FormBuilder.php(321): Drupal\Core\Form\FormBuilder->processForm('user_register_f...', Array, Object(Drupal\Core\Form\FormState))
#14 /var/www/web/core/lib/Drupal/Core/Controller/FormController.php(73): Drupal\Core\Form\FormBuilder->buildForm(Object(Drupal\user\RegisterForm), Object(Drupal\Core\Form\FormState))
#15 /var/www/web/core/modules/layout_builder/src/Controller/LayoutBuilderHtmlEntityFormController.php(39): Drupal\Core\Controller\FormController->getContentResult(Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Routing\RouteMatch))
#16 [internal function]: Drupal\layout_builder\Controller\LayoutBuilderHtmlEntityFormController->getContentResult(Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Routing\RouteMatch))
#17 /var/www/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array)
#18 /var/www/web/core/lib/Drupal/Core/Render/Renderer.php(578): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#19 /var/www/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))
#20 /var/www/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array)
#21 /var/www/vendor/symfony/http-kernel/HttpKernel.php(158): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#22 /var/www/vendor/symfony/http-kernel/HttpKernel.php(80): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
#23 /var/www/web/core/lib/Drupal/Core/StackMiddleware/Session.php(57): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#24 /var/www/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(47): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#25 /var/www/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#26 /var/www/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#27 /var/www/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(47): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#28 /var/www/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(52): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#29 /var/www/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#30 /var/www/web/core/lib/Drupal/Core/DrupalKernel.php(717): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#31 /var/www/web/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))
#32 {main}

πŸ› Bug report
Status

RTBC

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States justin.green

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024