After updating to 1.0 "taxonomy_term"-view loses group context.
| Comment | File | Size | Author |
|---|---|---|---|
| #13 | og_vocab_term_id-605138-13.patch | 672 bytes | pgillis |
| #7 | og_vocab.patch | 581 bytes | pgillis |
After updating to 1.0 "taxonomy_term"-view loses group context.
| Comment | File | Size | Author |
|---|---|---|---|
| #13 | og_vocab_term_id-605138-13.patch | 672 bytes | pgillis |
| #7 | og_vocab.patch | 581 bytes | pgillis |
Comments
Comment #1
amitaibuI'll need some more info about it.
Comment #2
Pasi commentedI think this is a big problem. I am sorry if I gave too little info.
-I have "Group categories" block which displays my group taxonomy.
- I will see "taxonomy_term" view, when I click one of the terms (For example /taxonomy/term/7)
- I don't have any group context with this view. There is no "Group details" -block for example. There is nothing group related.
Previously I had the latest dev and all was good. I don't know what else info you need...
Thank you for your good work :)
Comment #3
Pasi commentedI have the latest stable versions of all my modules and core drupal
Comment #4
Pasi commentedStill don't know what happened, but I got it working. I switched to "posts_by_term"-view and added a block with following PHP-code as argument:
if ($node = og_get_group_context()) {
return $node->nid;
}
Comment #5
jvieille commentedI am struggling with this same problem apparently. I keep asking questions about that on the OG Vocab and OG lists, but I am not very successful...
1) The Group Category block works well by default.
2) This happens al long as the "taxonomy_term" View is disabled (its default setting). This View emulates the Drupal core handling for taxonomy terms, so you normally don't see the difference when it is enabled.
3) If you enable the "taxonomy_term", the Group Category block does not work anymore: the group context is lost when clicking on a term.
This means that Views does not emulate Drupal core exactly. When OG Vocab Group Category bloc fire on clicking a term, Drupal Views seems to catch the call and processes it, but not fairly as far as OG is concerned. Whatever I tried to keep the context through default arguments failed .
4) by the way, you said that you found a solution. Have you succeeded at creating a bock similar to Group Category, with indented terms and displaying the View output to the content space?
Can you elaborate?
Thanks for help
Comment #6
jvieille commentedI found a solution:
http://drupal.org/node/763308#comment-2962022
The problem is that if the group nid is not in the url, there seem to be no way to get it from a menu item.
I succeeded only by changing the code that generated the link from the menu item in OG Vocab in order to add the group node id in the url.
Comment #7
pgillis commentedI am having this problem as well. In fact I have seen multiple issues reported for this module that seem to be, at the root, an issue with lack of group context. I am changing the priority to major in that this seems to be a significant problem. I know it is for my installation.
I have attached a file with a patch to og_vocab.module that makes the problem go away for me. It turns out that in hook_init, the module tries to load the term by getting the id from the first element of the page_arguments and then looking up the group context from the term. In the case of the view, the term is now the 3rd element.
Instead of getting the url from the page_arguments which is different in both cases I look to the map which has the same value where the term is the 3rd element.
What do you think? Thanks...
Comment #8
cray146 commentedsubscribe
Comment #9
javier.soler commentedI apply replace og_set_group_context(node_load($gid)); (ob_vocab.module > ob_vocab_init(), line 146)
by
$group_node = node_load($gid) ;
og_set_theme($group_node);
og_set_group_context($group_node);
og_set_language($group_node);
because the page lost the theme and language
Comment #10
jharder commentedFinding this patch was a miracle. Thank you for posting!
My OG vocab term pages were rendering in my site's default theme. After applying this patch the OG vocab term page has the correct group context and renders using my group theme.
I spent days trying to solve this!
Comment #11
pgillis commentedChecking up on resolution of this issue. Changed status to needs review for patch.
Comment #13
pgillis commentedGenerated new patch against DEV line.