It has taken a week for a customer to realize this, and me a couple of hours. Is the kind of nasty error messages that turn customers crazy.
"Internal error processing your data. Please contact website administrators."
function og_forum_form_validate does following validation:

if ($group && og_forum_is_admin($group) && (in_array($form_values['parent'], _og_forum_ogterms($group)) || $form_values['tid'])) {

  $error = false;

}

If error still TRUE, the confusing message is shown.

og_forum_is_admin($group) is the confusing part, if user is not supposed to have access, he should not be able to access the form. So, the link "add forum" should never appear. Anyhow, perhaps would help adding a separate validation about access right and then display a message: "You have not access to add forums."

Blessings!

CommentFileSizeAuthor
#6 Picture 6.png33.48 KBrootwork
#2 og_forum.patch1.14 KBaaron1234nz

Comments

Anonymous’s picture

Does anyone have any time to help out here ?

Thanks Paul

aaron1234nz’s picture

StatusFileSize
new1.14 KB

Please find attached the patch to fix this.
The issue is not with og_forum_is_admin($group) but the 'administer forums' permission

Basically this can be used to show the 'manage' links, but this permission is not checked when the _validate function is called

aaron1234nz’s picture

Status: Active » Needs review
Anonymous’s picture

@Aaron

If you have the time would you mind confirming this is a problem with D6 and post a patch ?

Best, Paul

Anonymous’s picture

Status: Needs review » Closed (fixed)

Please reopen if you see any problem on 6.x-2.x-dev.

Thanks Paul

rootwork’s picture

Title: Confusing error message in og_forum_form_validate » "Internal error processing your data" when editing or adding forum, from og_forum_form_validate
Version: 5.x-2.x-dev » 6.x-2.2
Priority: Normal » Critical
Status: Closed (fixed) » Active
StatusFileSize
new33.48 KB

I'm still seeing this in 6.x-2.2, which has the same date as the most recent 6.x-2.x-dev.

It's unclear to me which permissions are generating this error, since all forum-related and taxonomy-related (as well as their OG-related modules) permissions are being granted -- including the "admin own group forums" permission added in the patch above:

FORUM
- administer forums
- create forum topics
- delete any forum topic
- delete own forum topics
- edit any forum topic
- edit own forum topics
OG_FORUM
- admin own group forums
- make forums public
OG_VOCAB
- add own group vocabulary
- administer own group vocabulary
- edit own group term
- edit own group vocabulary
TAXONOMY
- administer taxonomy

But I suspect it IS a permission error, since site administrators aren't running into this problem.

See screenshot below of error in editing forum; same error appears when attempting to add a new forum.

szantog’s picture

sorry for my english
I started debug this.
On og_forum.module line 1112 og_forum_is_admin($group) is false, so the $error stay true.
I will continue within some week.. But if the maintainer has some time, it wouldn't be hard to resolve it.

on line 788 need to change if && to ($user->uid == 1 || user_access('administer forums')) return TRUE;

but I think it need another if-then with another role to return true.
If I will finish it, I will contribute a patch.

vegantriathlete’s picture

Version: 6.x-2.2 » 6.x-2.x-dev
Issue summary: View changes
Status: Active » Closed (won't fix)