Hi all,

I have set up the og module and created a group with a group manager and the group has it own theme, all is working fine except when I do one of the following.

If I either

- create content.
- browse created content other that, Subscribers, My subscription, Invite a friend, Manage group forums, I lose the groups theme the site reverts back to the original theme.

Any ideas

Thanks, Matt

Comments

moshe weitzman’s picture

if you create content from the group details block you should keep your theme. if not, you don't get a theme until you do a preview because we don't know what group you are authoring for ... you should be seeing theme when you browse to posts that are solely in a group that have a theme. if the post is in multiple groups, you might be getting context from a group that has no special theme ... i don't test this feature much, so is possible there is a bug.

also, please upgrade to 5.x.4. there were lots of bug fixes and nice features.

shmatty29’s picture

Ok, I have upgraded to 5.4 and stilling having the same problem, however If I disable the OG_user_roles module the theme remains when creating content and browsing.

This is a real issue as the OG_user_roles model controls who is the manager/editor/owner of the group. With out this it would appear that I cannot assign a admin / manager to the group with out giving them permission to edit all groups rather than just restricting them to there own. Unless I am missing something???

Thank, matt

moshe weitzman’s picture

Project: Organic Groups » OG User Roles
Version: 5.x-3.0 » 5.x-2.5
Component: og.module » Code
shmatty29’s picture

Sorry I am using OG module v5.4 and og_user_roles module v2.5

Thanks, matt

somebodysysop’s picture

Assigned: Unassigned » somebodysysop
Status: Active » Needs review
StatusFileSize
new5.46 KB

Had to bite the bullet and write my own og_user_roles_theme() function (actually, I copied and modified og_theme()).

Apply this patch against clean version (unpatched) of OGR 5.x-2.5. It should resolve the issue. In addition, added code so that theme is maintained in "Group forums".

Let me know if this works.

shmatty29’s picture

Worked perfectly.

MANY THANKS

Matt

p.s. have the same problem with OG_Calander 5.1.1, http://drupal.org/node/76797 do you know of a fix?

somebodysysop’s picture

StatusFileSize
new6.42 KB

This is another issue, but try this patch. Again, against clean (unpatched) download of OGR 5.x-2.5.

rconstantine’s picture

I'm getting an error saying no such function as arg(). Commenting out the call to og_user_roles_theme solves the problem.

See also: http://drupal.org/node/153772

somebodysysop’s picture

Try moving the code here, as demonstrated below:

  // Looking for this format: http://www.scbbs.com/node/add/link?gids[]=29
  // We only need to process this if the user is logged in
  if ($user->uid > 0) {
    // Bootstrap if arg() doesn't exist
    if (!function_exists('arg') && $user->uid > 0) {
      drupal_bootstrap(DRUPAL_BOOTSTRAP_PATH); // added as per this issue: http://drupal.org/node/149469
    }
    // Modification as per: http://drupal.org/node/183860
    og_user_roles_theme();

Of course, in this case, anonymous users won't see the group theme in the cases we've added.

rconstantine’s picture

Status: Needs review » Reviewed & tested by the community

Doesn't seem to break anymore, so that's good. You know, I've never had different themes per OG before. How does one do it? Is there another module? I didn't see anything in the OG settings.

somebodysysop’s picture

Enable the theme in Home » Administer » Site building -> Themes

Then, when you create/edit the group, you will see the enabled theme(s) available to select as the default theme for the group.

shmatty29’s picture

Downloaded clean version off (og_user_roles) added (patch og_user_roles.module.5.x-2.6_4.patch), worked perfectly first time.

Many thanks again

Matt

shmatty29’s picture

One problem has occurred, since adding patch (og_user_roles.module.5.x-2.6_4.patch) I am getting two WYSIWYG editor windows when creating group content. A large window and smaller window directly beneath. The small window doesn't actually do anything when submitting content. This error only occurs when creating group content not site wide content.

Any Ideas

Thank, Matt

rconstantine’s picture

That's funny. I'm not seeing the double editors editors (get it?). Anyway, I'm using TinyMCE and I tried creating several content types from within groups and there's nothing wrong that I can see. I must say, however, that I did not build the new version of og_user_roles from a clean copy. Rather, I've been editing by hand since the first patch starting with the one for the ad module, then the minutes module, then this. So maybe somehow I missed something despite my being careful.

shmatty29’s picture

StatusFileSize
new20.88 KB

LOL

The editor is only appearing twice when creating content within groups, site wide it is behaving properly.
When I disable the editor the body filled that replace the editor does not double up.

Any Ideas???

I have attached a screen shot.

Thanks, Matt

rconstantine’s picture

Have you tried exploring the page with firefox's firebug plugin? You can inspect all elements and see if there's anything strange that way. Are you using the latest versions of TinyMCE and the TinyMCE module? I am in my installation. I think there was a new version just last week.

Have you tried commenting out any code from this patch to see where the problem might be? Like try commenting out this line: og_user_roles_theme();

Speaking of that line, did you move it like the above post mentions? The patch has it in the wrong place.

shmatty29’s picture

Hi

I have updated the Tinymce editor to the latest version, 5.x-1.9. It is still showing to editors.

Regarding the movement of code in post 9, I am unsure what code needs to be moved where, could you specify what and where.

Thanks once again, Matt

shmatty29’s picture

Hi, I think I have an idea where the problem is accruing.

I have created a new post as it involves 3 different modules

http://drupal.org/node/186163

Thank, matt

rconstantine’s picture

This line: og_user_roles_theme();
was moved from a location above the quoted code to the spot indicated in the code. In other words, find that line, delete it, then insert into the place indicated in the post in #9.

shmatty29’s picture

StatusFileSize
new52.39 KB

Hi, sorry for being a bit dumb

I can only find the line og_user_roles_theme(); in one location in the code line 761 is this correct, please view attached screen dump.

I am unable to find any similarities in the patched version of the code (og_user_roles.module.5.x-2.6_4.patch ) that look like the code in post 9, so I am unsure where to move the line to???

I have also unstalled the TinyMCE Editor and loaded a diffrent editor, FCKEditor from the drupal training area on the website just to see if it was the TinyMCE editor that issues with loading two editors.
The FCKEditor replicated the same problem, it also loads two editors. It only does this when editing group event or group forum, not on any other content.

I have also done a complete reinstall of the site as I was having issues else where in the hope that it might fix this problem as well. please view http://drupal.org/node/184892 POST 10 to see what I did.

Thanks, Matt

P.S phew thank god its Friday

rconstantine’s picture

Looks like that line is in the correct spot. It used to be just below "global $user;".

It's totally crazy that you have two editors! I'm sure you're pulling your hair out. I just don't have any ideas. Have you checked your logs? Are you running devel? Are you running for inspector?

shmatty29’s picture

Hi, I ran the patch through a command prompt instead of manually patching the module this time, originally I didn't have command line access.
This has fixed the WYSISWYG errors duplication error.

Must have made a manual error some were along the line.

Once again many thanks for your help.

Matt

rconstantine’s picture

Status: Reviewed & tested by the community » Fixed
somebodysysop’s picture

Status: Fixed » Closed (fixed)

Commited changes to release OGR release 2.6.