AssertionError: assert($key_type instanceof KeyPluginBase) in assert() (line 164 of samlauth/src/Form/SamlauthSamlConfigureForm.php)

Created on 29 August 2024, 3 months ago

Problem/Motivation

I'm getting the following error when trying to visit /admin/config/people/saml/saml:

AssertionError: assert($key_type instanceof KeyPluginBase) in assert() (line 164 of modules/contrib/samlauth/src/Form/SamlauthSamlConfigureForm.php).
assert(, 'assert($key_type instanceof KeyPluginBase)') (Line: 164)
Drupal\samlauth\Form\SamlauthSamlConfigureForm->buildForm(Array, Object)
call_user_func_array(Array, Array) (Line: 536)
Drupal\Core\Form\FormBuilder->retrieveForm('samlauth_configure_form', Object) (Line: 283)
Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 97)
Drupal\autosave_form\Form\AutosaveFormBuilder->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: 52)
Drupal\crawler_rate_limit\CrawlerRateLimitMiddleware->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 116)
Drupal\cloudflare\CloudFlareMiddleware->handle(Object, 1, 1) (Line: 153)
Drupal\redactive_cloudflare\RedactiveCloudFlareMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 49)
Drupal\remove_http_headers\StackMiddleware\RemoveHttpHeadersMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 718)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

This is fixable by adding the following use statement to the top of SamlauthSamlConfigureForm.php:

use Drupal\key\Plugin\KeyPluginBase;

Steps to reproduce

Attempt to load /admin/config/people/saml/saml

Proposed resolution

Add the use statement; I will open an MR and attach a patch in case anyone else is running into this issue and needs a quick fix :)

/A

πŸ› Bug report
Status

Needs review

Version

3.0

Component

Code

Created by

πŸ‡¬πŸ‡§United Kingdom alexharries

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024