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

Comments

optasy created an issue. See original summary.

optasy’s picture

StatusFileSize
new3.02 KB

I attached the patch to fix the issue.

larowlan’s picture

Status: Active » Postponed (maintainer needs more info)

What version of core are you seeing this on?

larowlan’s picture

I don't see those arguments in 9.4.x or 10.0.x

larowlan’s picture

I think you must have a patch applied to core

jipiuno’s picture

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).

larowlan’s picture

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?

jipiuno’s picture

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" 
            ] 
        } 
    } 
}
larowlan’s picture

Version: 8.x-1.8 » 8.x-1.x-dev
Assigned: optasy » Unassigned
Priority: Normal » Critical
Status: Postponed (maintainer needs more info) » Needs work

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...

larowlan’s picture

Status: Needs work » Needs review
StatusFileSize
new1.38 KB

  • larowlan committed 4138c1c2 on 8.x-1.x
    Issue #3276743 by larowlan, optasy, jipiuno: ArgumentCountError: Too few...
larowlan’s picture

Status: Needs review » Fixed

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

larowlan’s picture

Status: Fixed » Closed (fixed)

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