I just recenctly noticed the offical confermation that Advanced Forums and OG Forums do not play nice with each other. I admin http://rwmuck.limitless.org where this has been noticed for a while, mostly with things having to do with visibility for non group members. If I mirror the site and offer ithe mirror as a test case, will this improve the chances of getting the problems with OG fixed or is it considered a low priority?

Comments

michelle’s picture

Project: Advanced Forum » OG Forum

Your question is better directed over there. The last time I checked, the incompatability was due to them not using the preprocess system.

Honestly, this is very low priority to me since I have no interest in OG Forum for my own uses. I'll accept patches once I open the 2.x branch but won't be putting much of my own time into it.

Michelle

ElleKitty’s picture

Title: OG Compatability - Can I help? » OG Compatability with Advanced Forum

Ok.

Relevant corsslink - http://drupal.org/node/359882

Will try before too long to nicely writeup the specific issues I've had people report to me.

michelle’s picture

Also look at #200291: Advanced Forum

Michelle

kaleworsley’s picture

I've made a solution for 5.x (probably would work on 6.x) by adding another custom module with the following. Basically it just sets og context after og_forum and advanced_forum have done their bit....

/**
* Implementation of hook_menu().
*/
function YOURMODULE_menu($may_cache) {
  $items = array();
  if ($may_cache) {
    $items[] = array(
      'path' => 'forum',
      'title' => t('Forums'),
      'callback' => 'YOURMODULE_magic',
      'type' => MENU_SUGGESTED_ITEM,
      'access' => user_access('access content'),
    );
  }
  return $items;
}

/**
 * Magic function to set group context for og and og_forum on group forum pages
 */
function YOURMODULE_magic($tid = 0) {
  og_forum_set_og_group_context_from_tid($tid);
  return advanced_forum_page($tid);
}

You may need to re-jigger the module weights in the system table, but it seemed to work fine for me.

If anyone uses it and finds a problem, I would really like to hear.

Kale

highvoltage’s picture

It's quite a blow to see advanced forum is unsupported here. Default drupal forums are very, very poor. I woudn't be caught dead using them. Without quality forums organic groups are crippled.

Hopefully this becomes a priority soon.

michelle’s picture

I use OG just fine without OG forum. No offence to the maintainer; obviously there's a use case for this or no one would use it. But I, personally, don't see a point in tacking a forum onto a group. So this will never be a priority for me. If it is important to you, perhaps the OG forum maintainer would be interested in being hired to make it work.

Michelle

highvoltage’s picture

Wish I could, but the exchange rate for me is obscene atm, drupal programmers cost very scary amounts of money per hour, there are many other things to pay for, and I was just expressing my surprise at this, not cracking a whip on anybody's back. Not sure what you use groups for, but generally speaking from my own experience across the net, user groups involve forums so this module is indespensible(thanks rconstantine). Operating groups without a forum format will never be as well utilized by mainstream internet users unless they don't have anywhere else to go. In my case, there are plenty of other places to go, so I need to offer a quality site.

Also, is this still in Advanced forum's issues? I posted this from the OG forum issue qeue and wasn't placing any expectations on you as advanced forum maintainer.

michelle’s picture

No, it's in OG's issue queue. But if you're looking for someone to do this, the logical people would be either me or rconstantine so I'm making my stance clear on it.

I use groups for special interest groups on my site. Like a "sci fi fan" group sort of thing. Since you can post nodes right in a group, there's no need for them to leave the group and go to the forum to post. So I don't get it. But, as I said, I'm sure there's a use case or the module wouldn't exist. :)

Anyway, at this point it's up to rconstantine if he wants to persue it so I'll step out.

Michelle

Anonymous’s picture

Title: OG Compatability with Advanced Forum » [OG FORUM COMPATIBILITY ISSUE] OG Compatability with Advanced Forum
michelle’s picture

Just curious...Why are you changing all the titles instead of just using issue tagging?

Michelle

batje’s picture

subscribe

Anonymous’s picture

Version: 6.x-1.x-dev » 6.x-2.x-dev
heacu’s picture

subscribe

eigentor’s picture

Actually the Incompatibility was quite a bit worse for me: (using OG 6.1.3, OG Forums 6.2.0rc1 and Advanced Forum 6.1.1):
I am not able to post anything to the Group forums at all. The Forum selector does not show any forum to post in, but just "Please select".
Together with other issues such as that the forum Containers are not hidden if Forum is private, I follow Michelles recommendation:

Not Using OG Forum at all. We do not have that many groups, so the thing may as well be role-based and using Forum Access.

michelle’s picture

Once I get #510772: Organic Groups pseudo forums done, that will probably be a better option for AF users. I think there's just too many incompatabilities between the two modules.

I'm inclined to won't fix this since I don't think it's ever going to happen, but this isn't my queue so I'll leave it be.

Michelle

dazweeja’s picture

StatusFileSize
new5.26 KB

I'm not across all the specific issues but I've made a patch that addresses the main issues that were affecting my installation with respect to AF and OG Forum co-existing (mainly things like maintaining correct group context and displaying breadcrumbs in what I think is a more logical fashion).

Patch (against og_forum.module 6.x-2.0-rc1) is attached for anyone who wants to try it to see if it fixes their specific issue.

The main changes I've made are setting group context in the same function as the forum page access check, setting breadcrumbs through preprocess hooks, and modifying the breadcrumb setting code.

eigentor’s picture

Status: Active » Needs review
dazweeja’s picture

@eigentor, a separate patch I posted might solve your issue with hiding private forums: #507868: OG forums are not hidden

Anonymous’s picture

If i can get two independent confirmations that an installation of OG / OG Forum (+ AF patch) does not result in any additional problems for ordinary users then i'll confirm and commit the patch to the development branch.

Best, Paul

Anonymous’s picture

Assigned: Unassigned »
highvoltage’s picture

It's patches like this that make me wish i wasn't so ignorant on the development side of things. Could somebody be kind enough to upload the patched files here so i could help test them? Tried to figure out patching before... failed.

robertdjung’s picture

subscribe

dazweeja’s picture

StatusFileSize
new6.2 KB
new72.38 KB

New version of patch against og_forum.module 6.x-2.x-rc2 attached.

One known issue is that when advanced_forum is enabled, forum containers which are hidden by og_forum.module 6.x-2.x-rc2 are now displayed. I haven't had time to investigate how to override this - possibly at the theme level?

@highvoltage, patched copy of og_forum.module (6.x-2.x-rc2) attached - you'll need to change filename from og_forum.txt to og_forum.module

dazweeja’s picture

StatusFileSize
new6.39 KB

Fixed issue where comment form loses group context when displayed on separate page.

Anonymous’s picture

If your on Mac / Linux patching is very straightforward ..

http://snipplr.com/view/9759/applying-and-reversing-a-patch/

Anonymous’s picture

Status: Needs review » Fixed

I have committed this to the development branch as the patch appears to have no affect on an installation without AF.

It's also very nicely done!

@dazweeja
Thanks for helping out with AF integration it's much appreciated :-)

Best, Paul

michelle’s picture

Congratulations! When I last looked at OG Forum, the problems looked nearly unresolvable. I guess things have come a long way since then. I still don't use OG Forum but I'm glad there's a solution for those that do.

Michelle

highvoltage’s picture

Status: Fixed » Needs review

EDIT: Ok, spoke too soon. Forgot to clear cache! Only problem I encountered was that the group tabs disappear while viewing the forums(intended?).

"If your on Mac / Linux patching is very straightforward .."

Im not, sadly. Windows. I don't know the first thing about command line.

dazweeja’s picture

StatusFileSize
new619 bytes

Updated patch against latest og_forum.module 6.x-2.x-dev to fix problem where hidden containers are displayed when AF is enabled (see #23).

I think that takes care of the main issues with OG Forum-Advanced Forum integration.

dazweeja’s picture

StatusFileSize
new695 bytes

Minor update on #29. Use this one instead.

Anonymous’s picture

Status: Needs review » Fixed

Thanks, i have committed the changes to the development branch and will release a further RC3 shortly.

Best, Paul

gensuperman’s picture

Well, the Advanced Forum is still not compatible with OG Forums. What occurs is that when Advanced Forum and Chaos Tools are active with OG Forum, the OG Forum recognizes the Advanced Forum settings perfectly (too perfectly)... But, when you try and post a new topic within the Organic Group (of anyones group) the "Post a new forum topic" link points directly to the sites Main Forum "Vocabulary/Taxonomies" and not to the users own organic group forum "Vocabulary/Taxonomies". I had to deinstall the Advanced Forum and Chaos Tools, in order to get the "Post a new Topic" link to correctly show the Organic groups Forums "Vocabularies/Taxonomies" for each organic group forum.

That's too bad. I was really hoping for a bit more style and the Advanced Forum definitely would have went beautiful with OG Forums.

Oh well... you win some and you LOSE some.

gensuperman’s picture

Status: Fixed » Needs review
dazweeja’s picture

@gensuperman, what versions of OG Forum and Advanced Forum are you using? I'm using OGF 6.x-2.0-rc3 and AF 6.x-1.1 and it works fine. On my installation, the link to post a new topic is a button labelled 'New Topic' (courtesy of AF) and it correctly links to http://somedomain.com/node/add/forum/?gids[]=

Did you empty your caches after upgrading to RC3 (the easiest way is to install the Devel module and use its 'Empty cache' link)?

dazweeja’s picture

My link was stripped out, it was:

http://<somedomain.com>/node/add/forum/<current_forum_id>?gids[]=<current_group_id>
gensuperman’s picture

WARNING:

I want to make this quite clear to any one that attempts what Dazweeja recommended in regards to clearing out the cache with Devel.

This warning is in regards to site owners that have shared hosting and that have a general 1MB limit on their "'max_allowed_packet"'s. If you decide to install the "Administration Menu" module along with the Devel Module, you might run into this situation where your website will become totally corrupted.

"Warning: Got a packet bigger than 'max_allowed_packet' bytes query: INSERT INTO drupal_watchdog."

I have attempted trying to install "db_tweaks";"Fastpathe_fscache" and many other modules to get this fixed. But, the error still persists. I was able to change the limit on my side from 1MB to 1GB, but the error still exists.

Regardless of trying to clear the cache, or updating or removing these modules, the error still persists and reports with 60 pages worth of other errors on each and every page of the website.

I had my website 90 percent done and spent 30 days and 30 nights on it, and now the website is so corrupted that I am unable to even log into it.

So, Just a heads up to the folks that recommend clearing out the cache, as it will obviously lead them to use devel and probably will lead them to use "administration menu" modules.

I'm not saying that anyone is at fault for this, I just want people to understand about the Max_allowed_packet issue/bug and how serious this is.

dazweeja’s picture

@gensuperman, what is the rest of that warning (or as much as you can copy)? It will indicate which module is calling the watchdog insert.

A quick workaround for your problem might be to comment out the body of the watchdog function in bootstrap.inc, eg:

function watchdog($type, $message, $variables = array(), $severity = WATCHDOG_NOTICE, $link = NULL) {
/*  global $user, $base_root;

  // Prepare the fields to be logged
  $log_message = array(
    'type'        => $type,
    'message'     => $message,
    'variables'   => $variables,
    'severity'    => $severity,
    'link'        => $link,
    'user'        => $user,
    'request_uri' => $base_root . request_uri(),
    'referer'     => referer_uri(),
    'ip'          => ip_address(),
    'timestamp'   => time(),
    );

  // Call the logging hooks to log/process the message
  foreach (module_implements('watchdog', TRUE) as $module) {
    module_invoke($module, 'watchdog', $log_message);
  }*/
}

You'll lose watchdog logging but your site will be usable. Devel is stable and Administration Menu is buggy so if I had to guess I'd say it's a bug with AM.

It's necessary to clear caches all the time when upgrading modules especially those using theme and preprocess functions. The most convenient way is to use the Devel module. It looks like you've found a serious bug with one of your modules so you should definitely log it with the maintainers when you find out which one it is. It's unlikely to be related to OG Forums though.

gensuperman’s picture

Well, I was able to disable the watchdog as you mentioned, but, the other list of errors appear. Now, keep in mind that the watchdog errors no longer appear at the top, but a box that is all in "red" appears in the center of the website. It goes on for about 60 pages and takes about 2 minutes to fully load.

The Errors begin Like:

"user warning: Got a packet bigger than 'max_allowed_packet' bytes query: UPDATE drupal_cache_menu SET data = ..."

and the middle of it all talks about : Loading functions, page arguments, access arguments, access callback, router path, menu name, weights, trails, rules and much more.

It is too much to copy.

However at the very end of the error, which you have to scroll for awhile it reads:

"in /home/account/public_html/includes/cache.inc on line 109."

It is the only time it mentions a Line Error anywhere in the large error list.

I opened up the cache.inc file and on line 102-113 it reads:

function cache_set($cid, $data, $table = 'cache', $expire = CACHE_PERMANENT, $headers = NULL) {
  $serialized = 0;
  if (is_object($data) || is_array($data)) {
    $data = serialize($data);
    $serialized = 1;
  }
  $created = time();
  db_query("UPDATE {". $table ."} SET data = %b, created = %d, expire = %d, headers = '%s', serialized = %d WHERE cid = '%s'", $data, $created, $expire, $headers, $serialized, $cid);
  if (!db_affected_rows()) {
    @db_query("INSERT INTO {". $table ."} (cid, data, created, expire, headers, serialized) VALUES ('%s', %b, %d, %d, '%s', %d)", $cid, $data, $created, $expire, $headers, $serialized);
  }
}

Line 109 was - db_query...

I also don't think OG Forums had anything to do with this issue, however, this all started when I wanted to get Advanced Forums to work with my OG Forums version. The only thing that didn't work with that was that the "Create a new topic" link was not going to the right forums. So, dazweeja recommended to clear the cache in the above posts, which might solve the issue and to get the Devel Module. I got the Devel Module, but I couldn't figure out how to clear the cache with Devel, as there were no existing settings for Devel that mentioned clearing the cache. So, I personally read that Administration Menu Module is an easier way to clear all the cache.

Once I installed the Administration Menu Module, then I get all these errors that I am talking about now.

Obviously, I won't be the only person that runs into this issue and I also won't be the only person that runs Drupal on a shared hosting service that limits the max packets to 1MB. If people that have this issue and they have a shared hosting plan using 1MB max packet limits and if they try to install Devel/and administration menu module to be able to clear the cache to get the Advanced Forum to show the "Create a Topic" links properly, then they will be in the same boat.

I agree that there is a MAJOR error in the Administration Menu Module. But, I can not pinpoint the error. Nor, do I truly know or understand why Administration Menu Module caused this error. I just hope that nobody else runs into my situation... Otherwise, the only recourse is to entirely redo the website. So far I'm holding off from redoing the website until someone finds a fix. It would take me weeks to redo my website.

EDIT: I had edited the cache.inc file and I slashed out the following:

//  $created = time();
//  db_query("UPDATE {". $table ."} SET data = %b, created = %d, expire = %d, headers = '%s', serialized = %d WHERE cid = '%s'", $data, $created, $expire, $headers, $serialized, $cid);
//  if (!db_affected_rows()) {
 //   @db_query("INSERT INTO {". $table ."} (cid, data, created, expire, headers, serialized) VALUES ('%s', %b, %d, %d, '%s', %d)", $cid, $data, $created, $expire, $headers, $serialized);
 // }
}

It has gotten rid of all the rest of the errors, but I am not entirely sure what this will cause or what other horrible thing is about to occur because of me slashing these out. Is there a better way to handle this and what will this cause?

rsm08’s picture

subscribe

gensuperman’s picture

Ok, I have got my website back to the way it was. Although, watchdog had to be disabled as per dazweeja's suggestion above. I have been able to use db_tweaks and I have been able to change the max packets from 1 MB to 1 GB. Although, most people just recommend 32MB will do the trick just fine, so I will probably end up changing that. FSpathe did not fix the issue and the errors originally showed up as Javascript errors, such as:

"Cannot modify header information - headers already sent by (output started at /home/account/public_html/includes/database.mysqli.inc:128) in /home/account/public_html/includes/common.inc on line 328."

Once, I turned off watchdog, these errors stopped appearing, but the max_packet errors continued, until I slashed out the above mentioned "db_query". I honestly have no idea what watchdog does or what effects that will have in logging, nor do I know what will happen by slashing out the db_query command in the cache.inc file (as mentioned in the above post).

The real issue was with the Administration Menu, it somehow "tried" to put into memory the entire admin menu panel and among other things, and went over the 1 MB max packet shared hosting limit. This is obviously a major bug caused by Administration Menu.

I couldnt find the setting to clear the cache after installing Devel module as Dezweeja mentioned in the above posts. But, I did find the place in the admin area that says "performance" which has a clear all cache button. However, I am not caching any pages at this time. So, that obviously wasn't the primary issue with Advanced Forum versus OG Forum. The Performace/Clear Cache section probably already existed before installing Devel. But, I'm not sure.

Anyways, after I got my website back to normal, I then cleared the cache from the Performance Area in the Admin Area. Then I checked for updates and ran cron. Then I ran the clear cache again. Although, I am not caching any pages or anything on the site at this time.

I reinstalled Advanced Forum and Chaos Tools. Because, Advanced Forum requires Chaos Tools to be installed.

I then tried it again, by going into any OG Group, and having an already existing og forum with that og group. When I clicked on "Create a New Topic" it takes me to the "Create a new forum topic page", but, it requires that I choose taxonomies(Categories) from the Main (non og) forum only. If I uninstall Advanced Forum and Chaos Tools, everything goes back to normal, and when I click on "Create a New Topic" at that point, then it uses the OG forums as intended, where it shows the forum that the topic is suppose to go into.

At this point, I do not believe that this is an issue with clearing out the cache or with Devel or with advanced forum or even with the administration menu. If I had to guess, there is a bug with the OG Forum module.

However, since nobody else is speaking up or experiencing this issue, I will have to look into this further to see if maybe there a conflict with a different module or to see why when I click on "Create a New Topic" using Advanced Forum that it requires using the taxonomies/forums only from the Main Site Forum and not from the OG Forums as intended.

Maybe somebody else will run into this issue and be more help than I can be.

dazweeja’s picture

@gensuperman, you mentioned a dependency on Chaos Tools so it seems like you are using Advanced Forum 6.x-2.0-alpha1 (or 6.x-2.x-dev). You do realise that alpha software is not fit for production use, ie. it's normally just for people involved in the development of the software or those that want to help out with testing? Did you see where it says in bold on the Advanced Forum home page - right after D6 1.x - "If you are on D6, you should be using this version!". I don't have the time to patch OG Forum to work with alpha software - I doubt that anyone who contributes patches to OG Forum does - and it would be a waste of my time anyway. AF could be entirely rewritten overnight - which is fine, it's alpha software after all - and I'd have to start my patch from scratch.

OG Forum 6.x-2.0-rc3 should work against the recommended, production version of AF, which is 6.x-1.1. If it doesn't, please post your issues in this thread.

Regarding your other unrelated issues, I would uninstall Devel and Administration Menu (through the Uninstall tab on the Modules page after unchecking them from the list of enabled modules) and then get try and get your watchdog and caching working again. The watchdog is not essential - although you won't get updates in your Status Report without it - but caching is important or your website will crawl to a halt. There's different levels of caching - the caching you can turn off in the Admin settings - and the caching of themes, menus, etc., which you can't turn off and is essential for a production Drupal install.

If you're happy using the button in the Performance tab to clear caches that's fine. Otherwise you can install the Devel module again (just Devel - not the associated modules). To get the Devel menu to show up, you have to set Devel permissions and then go into your Blocks page and move the Devel block into a visible region (like the left sidebar for example). It sounds like this was the step you were missing last time.

By the way, I have never recommended to anyone to install the Administration Menu module. It's convenient but it's buggy and, most importantly, it's entirely unrelated to Devel.

Lastly, any module code that alters the menu (including tabs) or interacts with the theme layer requires one or more caches to be cleared before you will see any effect. I didn't design the caching system in Drupal (obviously) but that's the way it is. You can usually achieve the same thing by disabling and then re-enabling the module but that takes a long time in D6 so having a link to clear the cache right there in the sidebar as Devel supplies (along with a bunch of other useful links) is a simple and convenient solution. On the occasions that I don't explicitly mention to clear the caches, there's almost always a reply immediately after that the patch did nothing even though I know it works. I honestly don't tell people to clear caches for my own amusement.

gensuperman’s picture

Oh.... Dazweeja, I want to say thank you so much for all your help and assistance in this regards. You were exactly right, that I was using the Advanced Forum Dev module. I just didn't think about trying the Non Dev version of Advanced Forum, and I am truly sorry for the headache that I put everyone through.

From what I just tested, it doesn't seem that Advanced Forum 6.x-2.x-dev works well with OG Forum 6.x-2.x-dev. I haven't tested the Advanced Forum 6.x-2.0-alpha1 yet, but since it is based upon the same 2.x structure, I can only presume that the conflict will be in that version too.

The Advanced Forum 6.x-1.1 works fine with OG Forum 6.x-2.x-dev, and from what I can tell there is no conflicts in either of those versions.

The primary issue with Advanced Forum 6.x-2.x-dev versus OG Forum 6.x-2.x-dev is that Advanced Forum 6.x-2.x-dev forces the New Forum Topic Creation to only accept "Main" Forum categories. The Advanced Forum 6.x-2.x-dev will not work with OG Forums and does not show any proper OG Forums in each OG Group. So, there is definitely a confliction going on there.

I can fully understand that idea of not fully supporting other module authors dev modules. That makes complete sense. However, I am sure that there will be more people like me that will immediately go for the Dev modules for the latest and coolest code. I mean Advanced Forum 6.x-2.x-dev is beautifully done, and you can see a definite difference between Advanced Forum 6.x-1.1 to 6.x-2.x-dev. But, I am happy that OG Forums 6.x-2.x-dev is at least working with Advanced Forum 6.x-1.1.

But... I would like to make one recommendation. Could you "please" put somewhere on the OG Forum module page, "May Not be compatible with Advanced Forum Dev versions." So, other people don't fall into this same mess. I am in complete agreement that the full concentration should be toward already complete and viable modules. That makes perfect sense. But, people need to know that although OG Forums functions great with Advanced Forum 6.x-1.1, that it doesn't do so great with Advanced Forum 6.x-2.x-dev module. That is just a suggestion.

Anyways, about the issue about the watchdog and db_query issue that I was mentioning in earlier posts:

I have finally fixed the issue, thanks to you dazweeja. I want to personally thank you for helping me with that. I was so frusterated and worried that I was going to have to redo my website.

Anyways, for the people that run into this "max_packet" issue let me briefly explain what happened and how to fix it. Maybe, another post should be made somewhere else on drupal, but for now, I will make it here.

If you guys run into the max_packet issue, it will of course make your watchdog go wacky with errors displayed on all your pages and then db_query will list with at first 10 pages of errors and will continue to grow and will be displayed on all your pages as well.

The best way to solve this issue was to temporarily disable the Watchdog reports, by doing what dazweeja explained earlier in this thread. Then I had to temporarily disable my db_query in the cache.inc as also mentioned in this thread by me earlier. Once the errors are gone, then clear out the cache. Now, make sure that you have changed your Max_packets from 1MB to something much higher. Otherwise, you will get those errors back. Now, go back and turn on the watchdog reports and then go back and turn on the db_query. Keep in mind that if you keep the db_query off in the cache.inc, then you will get verification and validation errors if you try and do certain things on your website (like file uploading). Now, clear out the cache again.

At least that is the exact steps that I took to solve my issue. I nolonger have any errors reporting, and watchdog and dq_query seems to be reporting normally.

Whelp, that was fun. Lets have tea.

sun’s picture

Component: Miscellaneous » Code
Category: support » bug
Status: Needs review » Needs work

This is not sufficient.

michelle’s picture

@sun: Eh? Why are you making this a bug report? I don't consider incompatibility between two modules to be a bug. And what, exactly, are you saying is not sufficient?

Michelle

sun’s picture

Title: [OG FORUM COMPATIBILITY ISSUE] OG Compatability with Advanced Forum » OG Forum incompatible with Advanced Forum
Assigned: » sun
Status: Needs work » Needs review
StatusFileSize
new22.8 KB

The previously committed patches were not sufficient.

This module relies on heavy assumptions and certain circumstances to work. It does not have to. And/but while it does, it also implements features that do not belong into this module. It should not do that.

That (also) leads to an incompatibility with Advanced Forum (but not limited to).

Attached patch fixes this.

And. Yes, I'm serious.

michelle’s picture

LOL! Your patch is almost as big as the module. Well, hopefully it fixes things up for folks. I've never used nor intend to use OG Forum. I'm just an interested observer since folks are trying to get it to work with AF.

Michelle

gensuperman’s picture

@sun,

could you please explain what fixes or changes that you made to the og forum module, just in laymen terms, as some of us folks are hesitant to test works that weren't created by the original author of module. Also, please just let us know how this fixes plan on making Advanced Forum versus OG forum compatible... which versions are you comparing or fixing to make them compatible, etc.

I am a bit weary to test patches that weren't authorized to be ok by the original author of the this specific Module.

Could someone also please test this out. I really don't want to destroy my website.

sun’s picture

It's the other way around: This patch removes the parts of og_forum that break your site and re-implements the originally intended functionality you installed og_forum for.

This patch should apply cleanly against 6.x-2.0-RC3 (equaling CVS HEAD currently) and has been tested with Advanced Forum 6.x-1.1.

gensuperman’s picture

@sun : Oh. I was trying to get Advanced Forum 6.x-2.x-dev to work with OG Forum 6.x-2.x-dev, are those the fixes that you made on your patch listed on #45? Because, that was the entire issue that I was having that I mentioned above.

Because, I know that Advanced Forum 6.x-1.1 already works fine with OG Forums 6.x-2.x-dev.

Its the Advanced Forum 6.x-2.x-dev versus OG Forum 6.x-2.x-dev that doesn't work with each other as I mentioned in #42 above. There most likely is a confliction somewhere in the OG Forum 6.x-2.x-dev module.

sun’s picture

I quickly scanned the code of Advanced Forum 2.x and it looks like this patch will solve compatibility with AF 1.x as well as 2.x. As mentioned before, it solves compatibility with most modules that override the 'forum' path.

Without this patch, og_forum tries to override the entire page callback and output of the path 'forum' - duplicating many functions of Forum module. Advanced Forum does the same, but in a better and more reliable way, so it always "wins". However, og_forum does not have to override the page callback nor anything else for the path 'forum' to do its stuff. This patch entirely removes those overrides and re-implements the functionality in a non-breaking way.

sun’s picture

Status: Needs review » Reviewed & tested by the community

This patch has been extensively tested and deployed to a large-scale production site.

Marking RTBC to draw some more serious attention.

highvoltage’s picture

*worships*

I had almost come to the conclusion this issue would never be solved.

Skirr’s picture

Status: Reviewed & tested by the community » Needs review

It would be great to see this patch in new release. Hope, it wont take long.

Skirr’s picture

Status: Needs review » Reviewed & tested by the community

Ooops. Didn't meant to change the status.

dazweeja’s picture

StatusFileSize
new23.15 KB

@sun, completely agree that there was a lot of duplication in the code so it's great that you found the time to clean it up. However, the code that creates a 'Forums' tab on the Group home page was removed by your patch and I'd like to see it reinstated. It was put there in response to a feature request #498354: Forum as a group tab? and I think it was a good addition (for the reasons stated in the initial request). I've rerolled your patch with the relevant function put back if you'd care to take a look. It's just a load function for the 'node/%og_forum_group_type/forum' menu item on line 97 on your patched module:

function og_forum_group_type_load($arg) {
  $node = node_load($arg);
  if (og_is_group_type($node->type)) {
     global $user;
     $tid = og_forum_get_forum_container($arg);
     if (og_forum_is_public($tid) || (is_array($user->og_groups) && array_key_exists($arg, $user->og_groups)) || $user->uid == 1 || user_access('administer forums'))
       return 'forum/'.$tid;
     else
       return FALSE;
  }
  return FALSE;
}
highvoltage’s picture

Hmm, could we get the patched module to give it a try? The maintainer has never been very active with this module(that i've witnessed), so I think that unless somebody provides the patched files, those of us who can't apply patches won't get a shot at it for a very long time. Would be hugely appreciated, and maybe with more people trying it out the maintainer will notice it.

dazweeja’s picture

StatusFileSize
new56.31 KB

Here you go, highvoltage. Attached is patched og_forum.module (remove .txt extension). Patched with sun's patch and then 'Forums' tab functionality added back in as per #55.

BTW applying patches is very easy. This page has links to instructions for both Windows and Mac:

http://drupal.org/node/60108

highvoltage’s picture

Thank you, dazweeja! You've been very helpful with this module. Thanks to sun too for getting down to business and sorting out the inadequacies, so glad this module is finally getting somewhere.

Set it up tonight, and fooled around a bit. Didn't experience any problems so far fiddling around with existing groups. Looking great. Gotta sleep. @_@

gensuperman’s picture

Status: Reviewed & tested by the community » Needs work

Whelp, I am very disappointed in this newly updated module that was from sun. The new updated module from sun did not address the issue with Advanced Forum 6.x-2.0-alpha1 or 6.x-2.x-dev. The bug still exists in the 2x version of the Advanced Forum. As I mentioned before in #42 of this thread, the Advanced Forum 2x versions cause the "new topic" link in OG Forums to be over written. The Advanecd Forum 2x version links to the sites "Main" forums and not to the "OG Forums" for that specific group.

I am very happy to see that the OG Forums was nicely updated as more than 20,000 KB of information was removed from the OG forum module. So, this will obviously stream line the OG Forums and probably make it faster as per the patched post on #57 by Sun and dazweeja.

However, the Advanced Forum 2x version must be different in some way than the Advanced Forum 6.x-1.1 version. Somehow the Advanced Forum 2x version continues to overwrite the OG Forums "New Topic" link in each OG Group to point directly and only to the Sites Main "Forum" module. So, when you go and create a "New Topic" using "CTOOLS, Advanecd Forum 2x, and Sun's and Dazweeja's #57 OG Forum Version" then it has that bug. But, if you remove the CTOOLS and add in the Advanecd Forum 6.x-1.1 version and then add Sun's/Dazweejas #57 patch OG Forum Version, then it works properly. As the "New Topic" link will then point correctly to the "OG Forum(s)" for that specific group.

So, my guess is that it is not an issue with OG Forum at this point, but with Advanced Forum 2x.

I am happy that the OG Forum module has been cleaned up, that will obviously help with site speed, etc.

But, for now, the #57 Suns/Dazweeja version of the OG Forum module does not work properly with the Advanced Forum 2x series.

There could also be an issue with the DEV version of the CTOOLS. But, I strongly doubt that would be the cause.

I think you guys/gals are getting close to solving this issue. But, for now, us site owners are left with using the Advanced Forum 6.x.1-1 version versus the #57 patched version of the OG Forum, until someone actually figures out why this is happening.

It really is no big deal, i guess. But, hey.. I also enjoy coding on my spare time, and it truly bothers me when I can't get a piece of code working properly.

sun’s picture

Status: Needs work » Reviewed & tested by the community

did not address the issue with Advanced Forum 6.x-2.0-alpha1 or 6.x-2.x-dev

I see two release strings here, and both refer to in-development versions. This patch fixes compatibility with the current, stable releases.

Please open a separate issue for AF 2.x compatibility. To be more precise, your issue is not even related to AF 2.x, but rather related to CTools. So, please go and create a separate issue for that. Thanks.

Anonymous’s picture

Reviewing the patch ...

Anonymous’s picture

@Sun

Thanks for removing the redundancies in this module and implementations of hook_menu_alter() & og_forum_db_rewrite_sql
Your work has been committed into CVS and i have have released a new RC4 for further testing.

I guess when we come to moving to D7 AF will more than likely be based upon the 2.x branch so you may want to scratch an
itch now and investigate the compatibility of OGF and AF at the bleeding edge and maintain the momentum that we have
going here. I will leave this bug report open to resolve this final issue.

Best, Paul

michelle’s picture

Yes, I can guarantee the D7 port will be based on 2.x. 1.x will be deprecated within the next few months and I won't have time to get 3.x stable before begining the port.

Michelle

highvoltage’s picture

oh wow the module has been updated. I thought it was rconstantine maintaining this, not paulbooker. I guess I ought to take back the comment about maintainership inactivity then. <_< Sorry.

gensuperman’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +link, +group, +image, +icon, +Forum, +icons, +text, +style, +missing, +advanced forum, +groups, +OG, +forums, +advanced
StatusFileSize
new57.82 KB

I'm about to pull out my hair here.

You guys/gals have gotten this to be soooo close. But, every time you go and edit something, something else gets lost or a new bug is created in OG Forum Versus Advanced Forum.

I am currently using :

OG 6.x-2.x-dev (2009-Aug-19)
OG Forum 6.x-2.x-dev (2009-Aug-18)
Advanced Forum 6.x-1.1

Now, while using the latest and up to date code from the "Sun,Dazweeja and paulbookers", the icons and images/graphics go missing when the Advanced Forum 6.x-1.1 is installed. Most Likely the OG Forums code was accidentally stripped of the linking for these icons to work with Advanced Forum OR the Advanced Forum is now no longer compatible with OG Forum 6.x-2.x-dev (2009-Aug-18).

So, there is definitely a major bug or something was stripped from the OG Forum 6.x-2.x-dev (2009-Aug-18) version that shouldn't have been.

I have attached an image of what it looks like with the bug. There is no doubt in my mind that OG Forum is the cause at this point.

Information:

Advanced Forum Settings:

- Advanced forum style: Blue_Lagoon (Doesn't matter which style you use, still happens)
- Image directory: BLANK "DEFAULT"; (Leads to default images directory in that themes Advanced Forum style)
- Use graphical buttons for links : YES
- Treat all site comments like forum posts : Uh, NO
- Use topic navigation : YES

As you will be able to tell from the attached image that now all the icon images are missing, and replaced with just text.

We're obviously going backwards here. *Pulls hair out*

michelle’s picture

Issue tags: -link, -group, -image, -icon, -Forum, -icons, -text, -style, -missing, -groups, -OG, -forums, -advanced

@gensuperman: Please don't pollute the freetagging system by creating nonsense tags. The only one that serves any purpose there is "advanced forum" because there could be other issues created in this queue having to do with AF so I've deleted the rest.

Michelle

gensuperman’s picture

Okay, I figured it out. It took some testing to see where the problem was as I mentioned on #65 in this thread in regards to :
"The icon images were not showing up in the og forum".

The problem was that I had previously installed Advanced Forum 6.x-2.x-dev with Chaos Tools (CTOOLS) and then I realized that these two modules were not compatible with : Suns/Dazweeja/Paulbookers OG Forum 6.x-2.x-dev (2009-Aug-18) versions.

So, I removed CTOOLS and I just installed the Advanced Forum 6.x-1.1 (2009-Jul-01) version right over the existing Advanced Forum 6.x-2.x-dev folder on my site.

To my amazement, I found that by doing this, it leads to major conflicts between left over folders from the Advanced Forum 6.x-2.x-dev version versus the overwriting Advanced Forum 6.x-1.1 (2009-Jul-01) version.

It seems that if you do NOT "DELETE/REMOVE" the existing Advanced Forum 6.x-2.x-dev folder before adding the Advanced Forum 6.x-1.1 (2009-Jul-01) version folder, then you will be left with remaining folders from the 6.x.2 dev version of the Advanced Forum. Which leads to broken icons and images. Probably because the CTOOLS may not be installed at the time or the CTOOLS module was removed or just because of conflicts between left over 6.x.2 dev files within the Advanced Forum 6.x-1.1 (2009-Jul-01) version folder.

So, I just deleted the Advanced Forum folder and re-added the Advanced Forum 6.x-1.1 (2009-Jul-01) folder to the site. This has corrected everything and the icons and images now reappear.

I also went a step further and tested the 6.x-1.x-dev (2009-Aug-23) Advanced Forum version in the same manner and the images and icons show up nicely now.

I am positive that others will find themselves in this same trap and predicament. So, just a fair warning to users out there, if you are moving between "MAJOR" versions in such a manner as I did, then you may have to delete that Advanced Forum folder and then upload that Advanced Forum folder. Otherwise, there may be loose files/folders that will remain that will lead to conflicts.

@Michelle : I enjoy the work you do. However, I really think I need to get something off my chest. Almost many of my posts in this thread has been that Advanced Forum 6.x-2.x-dev (2009-Aug-23) version is "NOT" compatible with OG Forum. Now, this may not seem like a serious issue right now. But, please understand that there will be more people like me... Wanting to test the latest and the best in code. Your Advanced Forum 6.x-2.x-dev (2009-Aug-23) version most likely does not work because it relies highly on Chaos Tools (CTOOLS) and I'm sure that maybe I should bring this up with Chaos Tools Module author later... But, maybe OG Forum and Advanced Forum 6.x.2 dev will work together in Drupal 7. I don't know... But, the fact remains is that people are mostly using the Drupal 6.13 version and there is no doubt in my mind that Organic Groups is "HIGHLY" popular, which will lead to "OG Forums" modules to become a popular choice as well for us users. So, what I am trying to say is that maybe... just maybe... you might want to take the time to consider reworking your Advanced Forum 6.x.2 dev version to work with "OG Forum", instead of "OG FORUM" trying to work with your module. I'm not trying to be rude... I am merely stating the obvious that your own Advanced Forum 2 version could become useless if it doesn't work with the "MOST" popular modules. Now, maybe you mostly intended for Advanced Forum to work with just the Drupal Main Forums. Which is fine... But, because of the popularity of the Organic Groups Module and the popularity of the OG Forum, it is highly possible that if your Advanced Forum doesn't function or work with these popular modules that your own module could quickly become obsolete.

Regardless, for now, many of the developers have found a working combination to your Advanced Forum and that is what all this thread is about. Getting OG Forum to work with Advanced Forum. I believe that SUN, Dazweeja and Paulbooker and others have done a beautiful job in getting that resolved. But, "Michelle", if you plan on creating newer code such as the Advanced Forum 6.x.2 version, then you "may" want to consider making sure it is compatible with other "popular" modules. Otherwise, it could lead to this mess and believe me I have been racking my brain for the past few days trying to figure this one out.

@Everyone : Phew... Well, now that's off my chest, I'm sorry if I seemed harsh or disrespectful.. You all have done beautiful work on these modules and I am happy and pleased using them successfully on my site. I look forward to following all your work and I will try and help pitch in with testing them and I am a coder myself. So, I will try and pitch in where it is warranted.

Thanks.

Gen. Superman

michelle’s picture

@gensuperman: You should always delete the existing folder before untarring the new one. Every single time. By untarring over the top of the old one, you leave behind files that don't exist in the new version and that can cause all sorts of weird and hard to track down problems.

As to me spending time on OG Forum, consider what you're asking. I don't use OG Forum. I have no plans to ever use OG Forum. I've had a few high profile developers tell me the approach it's taking isn't a good idea, though recent improvements may have changed that. Even so, I still have no need to use it because I would much rather have my groups' "forum" as a tab on the group itself and not connect it to the forum module. So, in addition to the hundreds of hours I spend for free working on AF, you want me to spend even more time, for free, to work on a module I have no use for. Well, that's not going to happen. If the folks who use both AF and OGF find problems in AF and supply a patch, I will certainly get it in AF if at all possible. It would be great for the people who use both to have it working. But it's going to have to be the people who want to use both who get it going. It's not my itch to scratch.

Oh, an as for the whole who should work with whom and my module becoming obsolete... Consider that AF has 6 thousand users and OGF has 900. I'm not in any way saying those 900 people are unimportant but your suggestion that AF will be obsolete if it doesn't work with a module that has less than 1/6th user base doesn't really hold water.

Michelle

dazweeja’s picture

@Michelle: From my perspective - I'm not a maintainer of this module, I've just committed some patches over the last month to make it work with AF among other things - I think you are doing a great job with AF and I think you should just continue to develop it however you wish and in accordance with Drupal best practices (just as you are doing now). If all modules are written according to Drupal best practices there shouldn't be any issue getting them to work together and I expect when AF 6.x-2 has a final release it will be trivial for someone who is contributing code to OGF (such as myself or someone else here) to get OGF and AF to play nicely together. I think even the fact that you are willing to spend time staying up to date with OGF (such as your involvement in this thread) is commendable. By the way, "I would much rather have my groups' "forum" as a tab on the group itself" actually describes how OGF functions now. It's really just another layer on the Forum module that does things like automatically create one or more associated forums when an OG is created (and links them to the OG through a tab on the group's home page) as well as providing another level of forum access based on group membership, eg. hiding forums/restricting access from non-group members if necessary. Also regarding your statement "I've had a few high profile developers tell me the approach it's taking isn't a good idea, though recent improvements may have changed that": the first part may have been true in the past - I can't comment on this because I came pretty late to the game - but since Paul's worked on the module some more, I patched it to use preprocess functions, and then Sun stripped out all the legacy-style code and made some other important changes, I think the approach now is sound. I don't want to take anything away from Paul here though - he's done the bulk of the work writing code, doing code review, answering support requests, etc., for this module so he should be congratulated.

@gensuperman: I understand your position but people just don't have the time to get dev modules working together. We all have jobs and imagine spending hours getting your dev module to work with another dev module only to have the other module change overnight and render all your time wasted. But module creators need the flexibility to make drastic changes overnight - that's what alpha and beta stages are all about. The benefit of open-source is that if someone really wants to add some functionality, they can create a patch and offer it up to everyone else. It may not get committed but at least others can take advantage of the functionality if they require it. If you really want to get a grasp on how time some developers offer up to the community for the benefit of others (and free of charge), take a look at sun's issue queue: http://drupal.org/project/user/sun

michelle’s picture

@dazweeja: The approach I'm taking doesn't mix OG and forum.module at all. It's simply adding a tab to the group that displays group posts in a manner that mimics a forum. That may not be ideal for everyone and that's fine, that's where OGF comes in for folks who want more, but it works for my needs and means I have no reason to ever use OGF. I'm not sure exactly what the people I talked to were objecting to so it's quite possible that it's since been fixed. But the approach of connecting OG and forum.module directly isn't one I'm interested in personally.

To get back on track, I wouldn't worry about getting OGF to work with AF 2.x yet. I had hoped to release 2.0 by September but that's slipped badly. I'm still working towards alpha 2 at this point and it's not ready for use. Once it gets to beta/RC it will be more stable and folks trying to get it to work together won't be chasing such a moving target.

Michelle

ptoly’s picture

For what it is worth:

OG 6.x-2.x
OG Forum 6.x-2.x-dev (2009-Oct-28) Patched with #57
Advanced Forum 6.x-2.x-dev (2009-Oct-26)

Still overwrites the OG Forums new topic link on my site.

Still in early testing but Advanced Forum 6.x-1.x with the above seems to work.

botum’s picture

subscribe

AntiNSA’s picture

Priority: Normal » Critical

HAs thee been any progress with this issue? 4 months later? Do thwey work together or not?

abaddon’s picture

well, from what i see the stable 6.x-2.2 version seems to have the same code as -dev, im using stable
there is at least some functionality broken in this integration, because both modules want to alter the forum_page callback in hook_menu_alter, gladly advanced forum wins, i think og forum uses that just for some redirection and it works fine without it too

my only problem with them right now is that og forum doesnt seem to pick up advanced forum's styling or at least part of it
to fix it ive patched og_forum's hook_menu to use advanced_forum_page() instead of forum_page() for the last 2 page callbacks it declares

ill post here if i find anything else wrong, as ill be using it on an active group site, i would also change priority from critical as it doesnt cause any damage..

poprocks’s picture

subscribe

Anonymous’s picture

Thanks for all the great work being done here.

@sun

Is it possible to start a new bug that explains where we are right now and close this bug. The current bug it getting long
and i suspect is scaring people off from helping out

Best,
Paul Booker
Appcoast

michelle’s picture

AFAIK the only problem is that the links clobber each other which is waiting on #768348: Use hook_link & alter for manipulating node/comment links

Michelle

sun’s picture

Status: Needs work » Closed (fixed)

Sure thing! Seems like we need to pester Gábor a bit more to finally commit #374463: Alter comment links.

kompressaur’s picture

subscribing

AntiNSA’s picture

Status: Closed (fixed) » Needs work

so do we have a patch to fix this yet? why close it?

michelle’s picture

Status: Needs work » Closed (duplicate)

Because there's other more specific issues for it. There, marked it dupe.

Michelle

AntiNSA’s picture

Duplicate of what ? I am getting to the pont were I need to start getting my forum running. I really like your forums, and I like the way og forums creates a forum for each group automatically. Whats thi a dup of and whats the current status of integration people?

michelle’s picture

Scroll up to #77. It says right there.

Michelle

Wolfflow’s picture

Subscribe

Crom’s picture

subscribe

jen.c.harlan’s picture

so, I went and looked at those other issues linked to in the last couple of posts, and I still can't figure out where we are at with this...

Zsanna’s picture

When clicking on the Forum tab at the Groups' page, it just writes out an 'Array' word, when it should be the own forum of the group, but at some groups it works.

jvieille’s picture

Title: OG Forum incompatible with Advanced Forum » OG Forum incompatible with Advanced Forum 6.x.2
Priority: Critical » Normal

Long post indeed,

To summarize - please correct me if I am wrong:

  • - OG Forums works well with Advanced Forum 6.x.1
  • - OG Forums has at least one problem with Advanced Forum 6.x.2 : creating new topics from the forum itself is not possible as the OG context is not set - It is still possible by using the OG bloc detail entry "Add new topic"