Error in Drupal 10 - Drupal\Component\Plugin\Exception\PluginException: Plugin (entity:taxonomy_term) instance class "Drupal\taxonomy\Plugin\views\argument_validator\Term" does not exist

Created on 14 April 2023, over 1 year ago
Updated 17 April 2024, 8 months ago

Location http://localhost/mywebsite/public_html/admin/structure/views/ajax/handle...

Referrer http://localhost/mywebsite/public_html/admin/structure/views/view/taxono...

Drupal\Component\Plugin\Exception\PluginException: Plugin (entity:taxonomy_term) instance class "Drupal\taxonomy\Plugin\views\argument_validator\Term" does not exist. in Drupal\Component\Plugin\Factory\DefaultFactory::getPluginClass() (line 97 of C:\xampp\htdocs\mywebsite\public_html\core\lib\Drupal\Component\Plugin\Factory\DefaultFactory.php).

I am receiving this error when trying to access the settings for the "Product: Product has taxonomy term ID (with depth)" contextual filter in my view. How can I fix this?

πŸ› Bug report
Status

Needs review

Version

3.0

Component

Miscellaneous

Created by

πŸ‡ΊπŸ‡ΈUnited States hockey2112

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

Comments & Activities

  • Issue created by @hockey2112
  • πŸ‡ΊπŸ‡ΈUnited States hockey2112

    I think I found the issue, thanks to ChatGPT. In product_taxonomy_filter.views.inc, line 38 says:

    $plugins['entity:taxonomy_term']['class'] = 'Drupal\taxonomy\Plugin\views\argument_validator\Term';

    However, the Term file does not exist in D10 core; TermName exists. Therefore, I changes that line to:

    $plugins['entity:taxonomy_term']['class'] = 'Drupal\taxonomy\Plugin\views\argument_validator\TermName';

    And that allowed me to access the settings for the contextual filter.

  • Status changed to Needs review over 1 year ago
  • Made a patch with the change suggested in #2. Manually testing and not seeing any issue in 9.5 or 10.0.7.

  • That solution doesn't work for us (Drupal 10.2) because all taxonomy terms on the website are showing a 404 Not Found page now.

    Here's a new (temporary) solution

Production build 0.71.5 2024