Since the release of alpha-9, the default argument for term ID taken from the active node has stopped functioning.
Steps to reproduce:
Create a view of content.
Add a block display.
Add the "Has taxonomy term ID filter"
Under "When the filter is not available", select "Taxonomy term ID from URL", then check "Load default filter from node page, that's good for related taxonomy blocks."
Save the view and create content tagged with a taxonomy term.
Set the block to display, and visit a node page that is tagged with a term.
Observe that no content shows.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | 2202565-taxonomy_default_tid_arg-6.patch | 8.44 KB | rbayliss |
| #3 | 2202565-taxonomy_default_tid_arg-test-only-3.txt | 7.14 KB | rbayliss |
| #3 | 2202565-taxonomy_default_tid_arg-3.patch | 8.48 KB | rbayliss |
| #2 | 2202565-taxonomy_default_tid_arg-2.patch | 915 bytes | rbayliss |
| #1 | 2202565-taxonomy_default_tid_arg-1.patch | 905 bytes | rbayliss |
Comments
Comment #1
rbayliss commentedComment #2
rbayliss commentedReroll.
Comment #3
rbayliss commentedLooks like this has become even more broken - in addition to the "Load default filter from node page" not working, I'm now getting a fatal if "Load default filter from term page" is checked. Pretty clear we need some tests I guess. Here's a reroll of the previous patch with the fix for the fatal, and a test for both.
Comment #4
olli commentedComment #5
dawehnerThank you for your work on this issue, especially given that it has some proper test.
<3 but here is a question, can't we directly use a kernel test base in that case?
We don't store UUIDs for test views.
This view should be probably reexported, because for example this value is now different.
Comment #6
rbayliss commentedThanks for the feedback. In theory I think we could use KernelTestBase for that test, but it would involve a lot of duplication of code between the TaxonomyTestBase to recreate the nodes and terms with the proper fields (more code than the tests themselves actually), so I'm not convinced it's worth it. Feel free to kick it back to needs work if you disagree.
Reroll to remove UUID and update the field_language value.
Comment #7
dawehner+1
Comment #8
alexpottCommitted d76bf40 and pushed to 8.0.x. Thanks!