Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
taxonomy.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
24 Sep 2015 at 12:19 UTC
Updated:
16 Sep 2022 at 17:39 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
stborchertThe patch simply adds the table alias for taxonomy_index.
Comment #3
poker10 commentedThe patch still applies to the 7.x-dev and it is working. Bug can be clearly reproduced by adding a simple join in the
hook_query_node_access_alter():You will get:
Setting this as RTBC.
Comment #4
mcdruid commentedIs this a problem in D9?
Can we add #3 to the existing tests easily?
Comment #5
poker10 commentedThis does not seems to affect D9 -
taxonomy_select_nodes()was removed and replaced by view in #2384583: Remove taxonomy_select_nodes function and related issues.The views query in D9 looks like this (there are table aliases correctly set):
I have added the test based on that example. Patch itself is unchanged.
Note that I have to create a new taxonomy_nodes_test.module and was unable to use the existing taxonomy_test.module for the new hook, because term_view alter hooks in the taxonomy_test.module are not controlled by a variable and because of that taxonomy term detail page throws
undefined propery $term->antonymwhen testing this scenario and displaying that page.Comment #7
mcdruid commentedExcellent, thanks for the D9 explanation and the tests!
Comment #9
poker10 commentedThanks!