ArgumentCountError: Too few arguments to function

Created on 22 April 2022, over 2 years ago
Updated 23 February 2023, over 1 year ago

Problem/Motivation

I'm getting the following error with the 8.x-1.8 version of the module:

ArgumentCountError: Too few arguments to function Drupal\taxonomy\Plugin\views\argument\IndexTidDepth::__construct(), 4 passed in /taxonomy_entity_index/src/Plugin/views/argument/TaxonomyEntityIndexDepth.php on line 58 and exactly 5 expected in Drupal\taxonomy\Plugin\views\argument\IndexTidDepth->__construct()

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡¨πŸ‡¦Canada optasy

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.

  • I encounter the same error on D10 (php 8.2.1) :

    ArgumentCountError: Too few arguments to function Drupal\taxonomy\Plugin\views\filter\TaxonomyIndexTid::__construct(), 5 passed in /home/*/**/web/modules/contrib/taxonomy_entity_index/src/Plugin/views/filter/TaxonomyEntityIndexTidDepth.php on line 57 and exactly 6 expected in Drupal\taxonomy\Plugin\views\filter\TaxonomyIndexTid->__construct() (line 69 of /home/*/**/web/core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTid.php).

  • πŸ‡¦πŸ‡ΊAustralia larowlan πŸ‡¦πŸ‡ΊπŸ.au GMT+10

    I think you must have a patch applied to core

    Can you check your composer.json or similar to see if you have any patches applied to views?

  • here my composer.json :

    {
        "name": "drupal/recommended-project",
        "description": "Project template for Drupal projects with a relocated document root",
        "type": "project",
        "license": "GPL-2.0-or-later",
        "homepage": "https://www.drupal.org/project/drupal",
        "support": {
            "docs": "https://www.drupal.org/docs/user_guide/en/index.html",
            "chat": "https://www.drupal.org/node/314178"
        },
        "repositories": [
            {
                "type": "composer",
                "url": "https://packages.drupal.org/8"
            }
        ],
        "require": {
            "composer/installers": "^2.0",
            "drupal/address": "^1.11",
            "drupal/admin_toolbar": "^3.3",
            "drupal/auto_entitylabel": "^3.0",
            "drupal/core-composer-scaffold": "^10.0",
            "drupal/core-project-message": "^10.0",
            "drupal/core-recommended": "^10.0",
            "drupal/field_group": "^3.4",
            "drupal/inline_entity_form": "^1.0@RC",
            "drupal/paragraphs": "^1.15",
            "drupal/pathauto": "^1.11",
            "drupal/taxonomy_entity_index": "^1.12",
            "drupal/taxonomy_manager": "^2.0",
            "drupal/term_reference_tree": "^2.0",
            "drupal/token": "^1.11",
            "drush/drush": "^11.4"
        },
        "conflict": {
            "drupal/drupal": "*"
        },
        "minimum-stability": "stable",
        "prefer-stable": true,
        "config": {
            "allow-plugins": {
                "composer/installers": true,
                "drupal/core-composer-scaffold": true,
                "drupal/core-project-message": true,
                "phpstan/extension-installer": true,
                "dealerdirect/phpcodesniffer-composer-installer": true
            },
            "sort-packages": true
        },
        "extra": { 
            "drupal-scaffold": { 
                "locations": { 
                    "web-root": "web/" 
                } 
            }, 
            "installer-paths": { 
                "web/core": [ 
                    "type:drupal-core" 
                ], 
                "web/libraries/{$name}": [ 
                    "type:drupal-library" 
                ], 
                "web/modules/contrib/{$name}": [ 
                    "type:drupal-module" 
                ], 
                "web/profiles/contrib/{$name}": [ 
                    "type:drupal-profile" 
                ], 
                "web/themes/contrib/{$name}": [ 
                    "type:drupal-theme" 
                ], 
                "drush/Commands/contrib/{$name}": [ 
                    "type:drupal-drush" 
                ], 
                "web/modules/custom/{$name}": [ 
                    "type:drupal-custom-module" 
                ], 
                "web/profiles/custom/{$name}": [ 
                    "type:drupal-custom-profile" 
                ], 
                "web/themes/custom/{$name}": [ 
                    "type:drupal-custom-theme" 
                ] 
            }, 
            "drupal-core-project-message": { 
                "include-keys": [ 
                    "homepage", 
                    "support" 
                ], 
                "post-create-project-cmd-message": [ 
                    "<bg=blue;fg=white>                                                         </>", 
                    "<bg=blue;fg=white>  Congratulations, you’ve installed the Drupal codebase  </>", 
                    "<bg=blue;fg=white>  from the drupal/recommended-project template!          </>", 
                    "<bg=blue;fg=white>                                                         </>", 
                    "", 
                    "<bg=yellow;fg=black>Next steps</>:", 
                    "  * Install the site: https://www.drupal.org/docs/installing-drupal", 
                    "  * Read the user guide: https://www.drupal.org/docs/user_guide/en/index.html", 
                    "  * Get support: https://www.drupal.org/support", 
                    "  * Get involved with the Drupal community:", 
                    "      https://www.drupal.org/getting-involved", 
                    "  * Remove the plugin that prints this message:", 
                    "      composer remove drupal/core-project-message" 
                ] 
            } 
        } 
    }
    
  • Issue was unassigned.
  • Status changed to Needs work over 1 year ago
  • πŸ‡¦πŸ‡ΊAustralia larowlan πŸ‡¦πŸ‡ΊπŸ.au GMT+10

    Ah I see the issue, I was looking at the wrong class

    Let's fix this using https://www.previousnext.com.au/blog/safely-extending-drupal-8-plugin-cl...

  • Status changed to Needs review over 1 year ago
  • πŸ‡¦πŸ‡ΊAustralia larowlan πŸ‡¦πŸ‡ΊπŸ.au GMT+10
    • larowlan β†’ committed 4138c1c2 on 8.x-1.x
      Issue #3276743 by larowlan, optasy, jipiuno: ArgumentCountError: Too few...
  • Status changed to Fixed over 1 year ago
  • πŸ‡¦πŸ‡ΊAustralia larowlan πŸ‡¦πŸ‡ΊπŸ.au GMT+10

    will cut 8.x-1.13 with this fix, thanks

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024