STEPS TO REPRODUCE
Created view of products in commerce
path is /taxonomy/term/%
created 2 contextual filters
Product: Stone
Product: Catalog
stone is vocabulary field
and catalog is another vocabulary field with terms inside
the relationship is Product variation
so basically when u try to acced the term for second vocabulary...it searches the term inside the first vocabulary.....and fails
so if you want to display in preview lets say 3 which is id term for term inside catalog, which is the second contextual filter...the query shows it was searching the term in the Stone vocabulary
hi for some reason I cant figure out why some terms are showing up and some are not
What is missing?
The catalog terms show up nicely, they display products that have that term
but stone terms, wholesale do not show up anything and the products have that term checked
products
-------- catalog
------------------ earings
------------------ rings
------------------ bracelets
---------- stone
------------------ amethist
------------------ crystal
------------------ citrine
------------ wholesale
------------------ wholesale
url of the view is of course taxonomy/term/% so this should show any term you click on
here is my view
https://pasteboard.co/abaChmm7itVn.png
thank you so much !
Comments
Comment #2
cilefen commentedI am switching this to a support request because it isn’t a proper bug report.
Comment #3
rossidrup commentedhere is the query for the view
SELECT DISTINCT "commerce_product_field_data"."title" AS "commerce_product_field_data_title", "commerce_product_variation_field_data_commerce_product__variations"."price__number" AS "commerce_product_variation_field_data_commerce_product__vari_1", "commerce_product_variation_field_data_commerce_product__variations"."sku" AS "commerce_product_variation_field_data_commerce_product__vari_2", "commerce_product_field_data"."product_id" AS "product_id", "commerce_product_variation_field_data_commerce_product__variations"."variation_id" AS "commerce_product_variation_field_data_commerce_product__vari_3", "taxonomy_term_field_data_commerce_product__field_catalog"."tid" AS "taxonomy_term_field_data_commerce_product__field_catalog_tid", "taxonomy_term_field_data_commerce_product__field_stone"."tid" AS "taxonomy_term_field_data_commerce_product__field_stone_tid", DATE_FORMAT((DATE_ADD('19700101', INTERVAL commerce_product_variation_field_data_commerce_product__variations.created SECOND) + INTERVAL 7200 SECOND), '%Y%m%d%H') AS "commerce_product_variation_field_data_commerce_product__vari"
FROM
{commerce_product_field_data} "commerce_product_field_data"
LEFT JOIN {commerce_product__variations} "commerce_product__variations" ON commerce_product_field_data.product_id = commerce_product__variations.entity_id AND commerce_product__variations.deleted = '0'
INNER JOIN {commerce_product_variation_field_data} "commerce_product_variation_field_data_commerce_product__variations" ON commerce_product__variations.variations_target_id = commerce_product_variation_field_data_commerce_product__variations.variation_id
LEFT JOIN {commerce_product__field_catalog} "commerce_product__field_catalog" ON commerce_product_field_data.product_id = commerce_product__field_catalog.entity_id AND commerce_product__field_catalog.deleted = '0'
LEFT JOIN {taxonomy_term_field_data} "taxonomy_term_field_data_commerce_product__field_catalog" ON commerce_product__field_catalog.field_catalog_target_id = taxonomy_term_field_data_commerce_product__field_catalog.tid
LEFT JOIN {commerce_product__field_stone} "commerce_product__field_stone" ON commerce_product_field_data.product_id = commerce_product__field_stone.entity_id AND commerce_product__field_stone.deleted = '0'
LEFT JOIN {taxonomy_term_field_data} "taxonomy_term_field_data_commerce_product__field_stone" ON commerce_product__field_stone.field_stone_target_id = taxonomy_term_field_data_commerce_product__field_stone.tid
WHERE ((commerce_product__field_catalog.field_catalog_target_id = '28')) AND (("commerce_product_field_data"."status" = '1') AND ("commerce_product__variations"."delta" = '0'))
ORDER BY "commerce_product_field_data_title" ASC
LIMIT 30 OFFSET 0
i used 28 in the preview box...because that is the term in vocabulary stones
WHERE ((commerce_product__field_catalog.field_catalog_target_id = '28')) AND (("commerce_product_field_data"."status" = '1') AND ("commerce_product__variations"."delta" = '0'))
so is it looking for term id 28 in the catalog vocabulary
my vocabularies are like these
catalog
-------------earirings
-------------rings
-------------pendants
stones
-------------ruby
.------------amethist
...............citrine
so catalog terms all show up nicely in the view
but the stones term show empty results
from jquery it seems that it looks the ruby term inside the catalog which is WRONG VOCABUALRY; IT SHOULD LOOK FOR IT IN THE STONE VOCABULARY?
and how to change that?
the vocabularies are fields in the product
so catalog is one field
and stone is the second fields
they are not unders one vocabulary...these are two vocabularies
Comment #4
rossidrup commentedseems like the problem is in contextual filters
if I move the contextual filter for stones on top and catalog below it works vice versa
seems the views do not use OR anymore for all contextual filters?
i hope somebody can see this and fix it
Comment #5
rossidrup commentedi also tried https://www.drupal.org/project/views_contextual_filters_or to set OR for contextual filter but it does not work
Comment #6
rossidrup commentedComment #7
rossidrup commentedComment #8
rossidrup commentedComment #9
rossidrup commentedhttps://drupal.slack.com/archives/C1BB308HH/p1658340569953779
Comment #10
rossidrup commenteda bug confirmed by two people
Comment #11
rossidrup commentedComment #12
cilefen commentedComment #13
cilefen commentedPlease post steps to reproduce in the issue summary. That is expected of a bug report.
Comment #14
rossidrup commentedComment #15
rossidrup commentedadded steps to reproduce at the start of the issue
I hope you can reproduce this
Comment #16
lendudePlease post steps to reproduce this with just Drupal core. The steps to reproduce here use commerce so it is hard to see if this is a problem in Drupal core or something in Commerce or something in both, or none and it might be a 3rd module doing things
Comment #18
kristen polThanks for reporting this issue. We rely on issue reports like this one to resolve bugs and improve Drupal core.
As part of the Bug Smash Initiative, we are triaging issues that are marked "Postponed (maintainer needs more info)". This issue was marked "Postponed (maintainer needs more info)" more than 6 months ago with a request for steps to reproduce with just core and there has been no activity since that time.
Since we need more information to move forward with this issue, I am tagging for Bug Smash Initiative and keeping the status at Postponed (maintainer needs more info). If we don't receive additional information to help with the issue, it may be closed after three months.
Thanks!
Comment #20
kristen polAs part of the Bug Smash Initiative, we are triaging issues that are marked "Postponed (maintainer needs more info)". This issue was marked "Postponed (maintainer needs more info)" more than 7 months ago.
Since we need additional information for this issue to progress, I'm marking the issue "Closed (cannot reproduce)". If anyone can provide complete steps to reproduce the issue (starting from "Install Drupal core"), document those steps in the issue summary and set the issue status back to "Active" [or "Needs Work" if it has a patch, etc.].
Thanks!