Wednesday, 7 August 2013

Drupal 7 views block with default value contextual filter does not filter on page (Mongo)

Drupal 7 views block with default value contextual filter does not filter
on page (Mongo)

tl;dr: Views Block, with contextual filter, WITH default value. Results
show properly in preview, but NOT on the page. Page = taxonomy term page
with a path alias. Running on Mongo.
=====
How my problem differs from all other contextual filter block issues I've
seen: - Using Mongo - DO have a default value set on the Contextual filter
- Results show properly in filter, but not on page
Using Drupal 7 on Mongo, with EFQ Views, I need to display all nodes of
NODETYPE that have been tagged with term TERM, on TERM page. (With Drupal
on Mongo, taxonomy index is stored in MySql but the node content in Mongo,
so term pages don't work as expected, and return no content. So a view is
necessary to establish this functionality. <-- Yes, this is really
stupid.)
My Taxonomy is an entity with its own fields, & tagged content appears in
a block, below the terms own fields. (This is why I didn't just make a
page view to display tagged content -- bc. I must display the term's own
fields.)
Taxonomy term pages have a path alias, "vocab/term-name".
Configurations I've tried that work successfully in preview but not on the
page:
1: Using path alias. Global: Null for arg(0) Node: TAGS for arg(1) When
filter is NOT available: - Provide default value: Taxonomy term ID from
URL - Load default filter from term page
OR -- Raw value from URL, Path Component 2 -- "Use Path alias" Checked
When filter IS available: - Validator: Taxonomy Term, Vocab TAGS - Filter
value type: Term name converted to Term ID - Transform dashes in URL to
spaces in term name filter values
2: Use Term ID When filter is NOT available: -- Raw value from URL, Path
Component 3
When filter IS available: - Validator: Taxonomy Term, Vocab TAGS - Filter
value type: Term ID
View results in preview appear correctly whether using the term name or
term id in the C.Filter. But no matter how it's set, the block on the
actual page returns all NODETYPE nodes.
On the taxonomy page, the block is displayed in a custom region, or in the
Main content area of the page. In both cases, all nodes display,
unfiltered. Ajax is enabled on the block, for good measure.
Topics I've read / tried that don't apply / don't work: (can only post 2,
but I have 15): Drupal 7 views Contextual filters with Page & Blocks
drupal 7 views block and contextual filter not working

No comments:

Post a Comment