'Settings' option not accessible

Created on 7 November 2024, 4 months ago

I cannot access 'Settings' on D11 w/ below error.
I have tried to add config factory variable and function, but it didn't work. Guess it is due to D11 and D10 differences.

The website encountered an unexpected error. Try again later.

ArgumentCountError: Too few arguments to function Drupal\Core\Form\ConfigFormBase::__construct(), 1 passed in /myfolder/drupal/web/modules/contrib/openid_connect/src/Form/OpenIDConnectSettingsForm.php on line 64 and exactly 2 expected in Drupal\Core\Form\ConfigFormBase->__construct() (line 43 of core/lib/Drupal/Core/Form/ConfigFormBase.php).
Drupal\openid_connect\Form\OpenIDConnectSettingsForm->__construct() (Line: 75)
Drupal\openid_connect\Form\OpenIDConnectSettingsForm::create() (Line: 36)
Drupal\Core\DependencyInjection\ClassResolver->getInstanceFromDefinition() (Line: 48)
Drupal\Core\Controller\HtmlFormController->getFormObject() (Line: 58)
Drupal\Core\Controller\FormController->getContentResult()
call_user_func_array() (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 593)
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 121)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 183)
Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 53)
Drupal\Core\StackMiddleware\Session->handle() (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 28)
Drupal\Core\StackMiddleware\ContentLength->handle() (Line: 32)
Drupal\big_pipe\StackMiddleware\ContentLength->handle() (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 36)
Drupal\Core\StackMiddleware\AjaxPageState->handle() (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 709)
Drupal\Core\DrupalKernel->handle() (Line: 19)

🐛 Bug report
Status

Active

Version

3.0

Component

Code

Created by

🇰🇷South Korea keithkhl

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

Merge Requests

Comments & Activities

  • Issue created by @keithkhl
  • Merge request !127Fixed construct issue for drupal 11 → (Merged) created by Unnamed author
  • Pipeline finished with Success
    4 months ago
    #331805
  • 🇮🇳India sarwan_verma

    Hi,

    I have resolved the "construct" issue for Drupal 10 and created MR!27. I’ve also attached a screenshot.
    Please review and verify.

    Thank you!

  • 🇵🇹Portugal jcnventura

    The CR that introduced this is https://www.drupal.org/node/3404140

    This means that with this change, we need to remove support for Drupal 9, and have it only ^10.2 || ^11.0

  • Pipeline finished with Success
    4 months ago
    #331841
  • 🇧🇪Belgium Ozmodiar

    Confirming that this fixes the issue.
    Just attaching a static patch that safely can be used in composer.json.

  • First commit to issue fork.
  • 🇺🇸United States pfrilling Minster, OH

    It seems I already made this change in #3452009 (https://git.drupalcode.org/project/openid_connect/-/merge_requests/110/d...).

    That being said, I think dropping support for Drupal 9 is acceptable being that it has not been supported for over a year now. Would you agree?

    I updated the merge request to add a test to confirm the settings form is loading on Drupal 10 and 11.

  • 🇺🇸United States dcam

    I think dropping support for Drupal 9 is acceptable being that it has not been supported for over a year now. Would you agree?

    As a fellow contrib module maintainer I'd like to give my own perspective. I have dropped support for any unsupported versions from my own modules. That's because GitLab CI only tests on supported versions. Therefore, you can't guarantee compatibility with old versions. You might even break an old website at some point with a future change. So I actually consider it to be potentially harmful to continue declaring compatibility that you can't test against.

  • 🇺🇸United States dcam

    Of course, in this case you're being forced to make a change that you know will break compatibility. As far as that goes, you gotta do what you gotta do. Ultimately, it's on people with outdated versions of Core to get busy updating anyway. They can always remain on the old version of the module until they can upgrade.

  • 🇺🇸United States dcam

    All that said, I reviewed the MR. The test is short and sweet, so there isn't much to say. If it were up to me, I might change the test function name from testSettingsFormAccessible() to be more generic, e.g. testSettingsForm(), as an indication to others that assertions for testing other things about the form should also go in there. But I'll make this RTBC since that's a minor, subjective change.

  • 🇺🇸United States pfrilling Minster, OH

    Thanks @dcam! I made the method name change you suggested.

    Since Drupal 9 is no longer supported and the form changes were already made that broke the settings form in D9, I went ahead and dropped support for that version.

  • Status changed to Fixed about 1 month ago
  • Automatically closed - issue fixed for 2 weeks with no activity.

  • 🇨🇦Canada joseph.olstad

    Alpha6 causes an issue in keycloak reported by two others

    I'm not sure which change in alpha6 is causing this.

Production build 0.71.5 2024