- Issue created by @hockey2112
- 🇺🇸United States hockey2112
As a test, I added D10 to the requirements in the module's info file. I installed the module and encountered an error:
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 changed "Term" to "TermName" in your module, and that got me past that issue.
In my view of Products, I added a contextual filter for Product: Has taxonomy term ID. In the filter settings, I did the following:
- Provide default value: Taxonomy Term ID from URL (Commerce Product) {{I also tried "Taxonomy Term ID from URL", but that didn't solve my issue)
This results in no results in the View, and it does not show any SQL output.
How can I fix this issue?
- Status changed to Needs review
over 1 year ago 3:03pm 24 April 2023 - dc19abf5 committed on 1.0.x
Issue #3354318: Drupal 10 fixes
- dc19abf5 committed on 1.0.x
- 28d672ee committed on 1.0.x
Issue #3354318: Drupal 10 fixes
- 28d672ee committed on 1.0.x
- 🇺🇸United States hockey2112
I am also running into this error in the logs:
Error: Call to undefined function taxonomy_vocabulary_get_names
It appears that function may be deprecated/removed from Drupal 10?
- 🇺🇸United States hockey2112
I may have a fix, but I don't know if it is a "proper" fix. It appears to be working though.
Based on the patch located here: https://www.drupal.org/files/issues/2022-12-02/d10-compatibility-3324916... →
I edited the "\commerce_product_taxonomy_filter\src\Plugin\views\argument_default\Tid.php" file as such:
Old version:
if (!empty($this->options['vids'])) { - $vocabularies = taxonomy_vocabulary_get_names(); foreach ($this->options['vids'] as $vid) {
New version:
if (!empty($this->options['vids'])) { + $vocabularies = \Drupal::entityQuery('taxonomy_vocabulary') + ->execute(); foreach ($this->options['vids'] as $vid) {
Is this a valid fix? Is this something that could/should be rolled into the production version of this module?
- First commit to issue fork.
- @skounis opened merge request.
-
Jeya sundhar →
committed f2cb626d on 1.0.x authored by
skounis →
Issue #3354318 by skounis: Drupal 10 version?
-
Jeya sundhar →
committed f2cb626d on 1.0.x authored by
skounis →
- Status changed to Fixed
over 1 year ago 5:49am 6 June 2023 Automatically closed - issue fixed for 2 weeks with no activity.