Closed (duplicate)
Project:
Context
Version:
7.x-3.0-beta2
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
29 Sep 2011 at 19:22 UTC
Updated:
4 Nov 2011 at 15:52 UTC
I found a problem with node taxonomy condition used in multilingual site. It is possible that node language is different than field language which makes this condition fail. The problem is in context_condition_node_taxonomy.inc file around line 54:
if (isset($node->{$field}[$node->language])) {
foreach ($node->{$field}[$node->language] as $term) {The language should rather be set by using field_language function like this:
$language = field_language('node', $node, $field);
if (isset($node->{$field}[$language])) {
foreach ($node->{$field}[$language] as $term) {This fixed the problem for me. Here's the patch:
| Comment | File | Size | Author |
|---|---|---|---|
| node_taxonomy_field_language.patch | 872 bytes | philipz |
Comments
Comment #1
philipz commentedComment #2
valderama commentedhad the same problem :) took some time to find it, and I just wanted to provide a patch.
So I also hope this problem will be fixed soon.
Thx and greets,
walter
Comment #3
p4trizio commentedThanks philipz, patch is working fine
Comment #4
bojanz commentedMakes sense.
Comment #5
bojanz commented#1267372: node taxonomy condition failing on translated or multilanguage site is older and has the same fix. Marking this issue as duplicate.