Without making any changes to OG configurations, the url ../og stopped displaying a list of groups. It was as if I had no groups created.
After checking out the OG configurations and coming up with nothing, I noticed that the pre-installed view for the groups directory was at the url ../og/all. Now the groups directory is showing up at that URL.
Just to quickly fix the bug, I created a URL alias for ../og to ../og/all. With that alias, the URL ..og/all stops displaying content. If I delete the alias, it displays content.
I need help either creating an effective URL alias to ..og/all or to get back to the configuration where ../og displays the groups directory.
Thanks,
Patrick
Comments
Comment #1
mr.andrey commentedI have the same problem. Just installed the og module, and:
* Going to /og gives a "page not found"
* "Groups" menu link points to /og
* If I go to /og/all, the "Groups" tab still points to /og
There's a potential solution posted here:
http://drupal.org/node/138763
... but I found that my entry for og_menu function is A LOT longer, plus I'm not sure of consequences of just yanking out a function.
Any help is much appreciated.
Thanks,
Andrey.
Comment #2
moshe weitzman commentedhmm. the default view that og ships with for the directory is now supplying handling the 'og' url. maybe you have to flush views cache, or stop overriding the deault view?
Comment #3
mr.andrey commentedHello, thanks for the reply.
I just cleared the views cache, and made sure there are no view overrides. The version is 5.x-2.2.. just double-checked. The problem is still occurring. /og gives a "Page not found" and many links point to that.
/og/all works
og/my works.
I just created a URL Alias from /og to /og/all.. this fixes it for me, but without it, it still doesn't work. Let me know if you want me to do some more testing on this.
Andrey.
Comment #4
moshe weitzman commentedplease try with the development snapshot and report back results.
Comment #5
torne commentedHm, I saw this problem, i think in a support request, and posted a solution, but I can't find it now. This is a bug introduced by the change for http://drupal.org/node/138763 - the problem is that the views are set as tab pages, but there's no parent page for them to be tabs of any more now that the og module doesn't provide that url in its menus. Thus the og url disappears :)
The right fix is:
Sun May 13 13:06:38 BST 2007 Torne
* Fix og menu tabs
diff -rN -u old-dev/modules/og/og_views.inc new-dev/modules/og/og_views.inc
--- old-dev/modules/og/og_views.inc 2007-05-18 00:08:16.000000000 +0100
+++ new-dev/modules/og/og_views.inc 2007-05-18 00:08:16.000000000 +0100
@@ -412,6 +412,7 @@
$view->menu_title = t('My unread');
$view->menu_tab = TRUE;
$view->menu_tab_default = TRUE;
+ $view->menu_tab_default_parent_type = 'normal';
$view->menu_weight = '';
$view->sort = array (
);
@@ -671,13 +672,14 @@
$view->page_empty = t('No groups');
$view->page_empty_format = '1';
$view->page_type = 'table';
- $view->url = 'og';
+ $view->url = 'og/all';
$view->use_pager = TRUE;
$view->nodes_per_page = '90';
$view->menu = TRUE;
$view->menu_title = t('Groups');
$view->menu_tab = TRUE;
$view->menu_tab_default = TRUE;
+ $view->menu_tab_default_parent_type = 'normal';
$view->menu_tab_weight = '-5';
$view->sort = array (
);
Setting the default parent type to 'normal' instead of tab on those views means that they will have a parent page created automatically by the views module (which will just display the default tab). Tested on my site and after clearing views cache it works as intended. This is, as far as I can see, how tab pages are supposed to work in views.
Comment #6
rconstantine commentedThere is no development snapshot for 5.x on the project page - must get it from CVS.
Comment #7
moshe weitzman commentedyes, thats annoying that it does not show up on the project page. apparently i am dong something wrong with releases but i don't know what. anyway, i think this is fixed in CVS.
Comment #8
torne commentedI can't see a change relating to this in CVS, and it doesn't seem to be fixed with the current DRUPAL-5 branch code...
Comment #9
rconstantine commentedI used this:
http://cvs.drupal.org/viewcvs/drupal/contributions/modules/og/?sortby=lo...
and things seem to work. I don't need a url alias for og.
I should list this as a separate issue but am wondering if this current issue is related to this other one I posted:
http://drupal.org/node/146194
over at Views regarding Views UI and tabs getting screwed up in OG. Might recent changes in OG be to blame? Or is Views UI the problem for sure?
Comment #10
rconstantine commentedOops. I meant
http://cvs.drupal.org/viewcvs/drupal/contributions/modules/og/?sortby=lo...
Sorry.
And it looks like there are even more changes today.
Comment #11
rconstantine commentedTurns out I should've checked my Views issue mentioned in #9 above before this one as indeed it was an OG problem and has been fixed.
Comment #12
torne commentedCurrent code does not fix it for me; cleared all caches. Menu item for /og is still missing. /og works when visited manually but the "my groups" and "group activity" tabs end up in the second row, with the Views options, rather than in the first row. From /og/my, the main Groups tab leads back to the site root, not to /og or /og/all as it should. Similar misbehaviour persists in group/tracker and related links.
The patch I posted above (and attached to the other issue) makes all the tab behaviour correct including the group/tracker views and makes the menu items reappear after caches are cleared.
Comment #13
(not verified) commentedComment #14
csc4 commentedHow can this be closed on 7th June when it's a critical bug and there's been no CVS release since 4th June and there's no fix documented at http://drupal.org/project/cvs/13446 (and I still have the bug!)
BTW - Read complete log of changes - http://cvs.drupal.org/viewcvs/contributions/modules/og/og.module?sortby=log is throwing an exception
Comment #15
torne commentedcsc4, can you try my patch posted above? It fixes the issue for me, and seems to be the obvious change to make after perusing the Views source to see how tabbed pages are supposed to work. I've no idea why this has been closed either, as the current CVS still doesn't work for me without the patch I wrote.
Comment #16
csc4 commentedThanks - that fixes the error and produces a page - but it tells me I have no groups and yet when I go to the Group Activity tab it lists the groups! Baffling. I have all groups set to be shown in the directory.
Comment #17
moshe weitzman commentedi believe that i found and fixed the problem here. Views changed how it exports and imports Views with respect to menus, and provided poor support to modules like og that supply default views.
It seems that sites that used a recent version of Views were seeing bad behavior. i just re-exported the the og Views which define menu items and saved them to the views_default_views() hook in og_views.inc. i think that the new exported Views are compatible with older versions of Views, but thats untested.
I would appreciate if folks tell me if this fixes their problem. Make sure you are not overriding the default views supplied by og. also make sure you empty the views cache after replacing your copy of OG with the HEAD release at http://drupal.org/node/95202 (wait 12 hours to get it so it is repackaged). you can empty this cache at admin/build/views/tools. if you went wild creating your own menu items and/or aliases to fix this problem, you might want to delete those too.
Comment #18
Anonymous (not verified) commentedIt works for me!
Thanks Moshe!
Comment #19
rconstantine commentedConfirmed. The 'groups' menu item returned.
Comment #20
ShutterFreak commentedSubscribing to this issue.
Thanks for the update!
Comment #21
somebodysysop commentedI downloaded and installed version 3.1. Same error. Should I be using 3.x-dev (which is dated earlier) instead?
Comment #22
Christefano-oldaccount commentedYes, SomebodySysop.
Comment #23
somebodysysop commentedInstalling og-5.x-3.x-dev finally resolved problem for me. Thanks!
Comment #24
gracearoha commentedI was also having the same problem with the og/all until i downloaded 5.x-3.x-dev.
But another problem that i was having with the og module and am still having with this latest build is that if i choose any of the nodes from the groups create content menu, i receive urls such as:
node/add/image?gids[]=221
node/add/book?gids[]=221
Note this does not occur when i go to create content outside the groups. and i do have clean urls enabled
Could it be a related issue?
Anyone else having the same?
Comment #25
ShutterFreak commentedThe "?gids[]=12345" part in the URL puts the content already in the given group. If it is not added to the node creation URL, you explicitly need to choose the group(s) the node will belong to on the node creation page.
Regards,
Olivier
Comment #26
(not verified) commented