Too few arguments to function Drupal\permissions_by_term\Service\AccessStorage::__construct()

Created on 10 December 2024, 13 days ago

Problem/Motivation

Upgraded to 3.1.35 and on login I get a WSOD with this info

ArgumentCountError: Too few arguments to function Drupal\permissions_by_term\Service\AccessStorage::__construct(), 7 passed in /xxx/xxx/xxx/xxx/web/core/lib/Drupal/Component/DependencyInjection/Container.php on line 261 and at least 8 expected in Drupal\permissions_by_term\Service\AccessStorage->__construct() (line 34 of modules/contrib/permissions_by_term/src/Service/AccessStorage.php).

๐Ÿ› Bug report
Status

Active

Version

3.1

Component

Code

Created by

๐Ÿ‡ณ๐Ÿ‡ฟNew Zealand Richarda253

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

Comments & Activities

  • Issue created by @Richarda253
  • ๐Ÿ‡ณ๐Ÿ‡ฟNew Zealand Richarda253

    I have re-enabled logging in by installing the previous version.

  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany Peter Majmesku ๐Ÿ‡ฉ๐Ÿ‡ชDรผsseldorf

    Do you see the error on a specific page? I have tested the module. Please provide details.

  • ๐Ÿ‡ณ๐Ÿ‡ฟNew Zealand Richarda253

    The error first occurred while I was logged in to the site and had just updated the module. On /admin/reports/updates I hit the "Check manually" link and got the error message. The public pages were still available so I tried to tried to login to the site and got the same message. I restored the database from backup and cleared all caches but no joy.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia priti197

    Could not replicate this error.

    AccessStorage does require 8 arguments, see AccessStorage.php line 34
    These 8 arguments are defined and provided in permissions_by_term.services.yml
    So if only 7 are being passed it implies that the updated permissions_by_term.services.yml file is not being respected. Clearing cache (drush cache-rebuild) should overcome this issue.

  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany Peter Majmesku ๐Ÿ‡ฉ๐Ÿ‡ชDรผsseldorf

    Yes, the dependencies are resolved via cache flush (e.g. "drush cr"). I re-checked this by signing in into a newly installed Drupal 11 site with PbT installed. It worked. The error can't be reproduced. Therefor I am closing this issue.

Production build 0.71.5 2024