Missing container invalidation update from issue modifying services

Created on 2 September 2024, 7 months ago
Updated 16 September 2024, 7 months ago

Problem/Motivation

Steps to reproduce

When I updated the module to v2.0.2 using composer I got the error message saying:

The website encountered an unexpected error. Please try again later.
ArgumentCountError: Too few arguments to function Drupal\seckit\EventSubscriber\SecKitEventSubscriber::__construct(), 2 passed in /opt/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php on line 259 and exactly 3 expected in Drupal\seckit\EventSubscriber\SecKitEventSubscriber->__construct() (line 70 of modules/contrib/seckit/src/EventSubscriber/SecKitEventSubscriber.php).

Proposed resolution

I couldn't find the solution so I had to reinstall v2.0.1.

πŸ› Bug report
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡¦πŸ‡ΊAustralia prussobcm

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.

  • πŸ‡ΊπŸ‡ΈUnited States chucksimply

    Yup, same here

  • πŸ‡¨πŸ‡¦Canada puregin

    This is critical since SA-CONTRIB-2024-039 advises upgrading to 2.0.3, which makes the site inaccessible.

  • πŸ‡¦πŸ‡ΊAustralia dpi Perth, Australia

    Seckit should have implemented an empty postupdate as a part of πŸ“Œ Fix validate pipeline Fixed . This is the Drupal convention to force container invalidation.

    Alternatively, you can just clear the cache before running deploy.

    If someone wants to action that here, you can do that. An example can be found in Drupal core v10 series @ `big_pipe_post_update_html5_placeholders`, and many others over time.

    Changing severity, since there is a clear workaround and should be automatic if you are using the standard `drush deploy`.

  • πŸ‡¦πŸ‡ΊAustralia dpi Perth, Australia

    I just created another issue and MR which touches on services, which needs a postupdate hook.

    Instead of something here, maintainers can consider merging that instead, which will fix up container for this issue.

  • πŸ‡¨πŸ‡¦Canada puregin

    Thanks for explaining this, @dpi. The steps you outlined resolve the problem for me.

  • πŸ‡¬πŸ‡§United Kingdom Alina Basarabeanu

    The changes from the issue don't apply to the 2.0.3 version.
    Switching to 2.x-dev fixed the error

    ArgumentCountError: Too few arguments to function Drupal\seckit\EventSubscriber\SecKitEventSubscriber::__construct(), 2 passed in /var/www/html/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php on line 261 and exactly 3 expected in Drupal\seckit\EventSubscriber\SecKitEventSubscriber->__construct() (line 70 of modules/contrib/seckit/src/EventSubscriber/SecKitEventSubscriber.php).
    
Production build 0.71.5 2024