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!
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | Picture 6.png | 33.48 KB | rootwork |
| #2 | og_forum.patch | 1.14 KB | aaron1234nz |
Comments
Comment #1
Anonymous (not verified) commentedDoes anyone have any time to help out here ?
Thanks Paul
Comment #2
aaron1234nz commentedPlease 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
Comment #3
aaron1234nz commentedComment #4
Anonymous (not verified) commented@Aaron
If you have the time would you mind confirming this is a problem with D6 and post a patch ?
Best, Paul
Comment #5
Anonymous (not verified) commentedPlease reopen if you see any problem on 6.x-2.x-dev.
Thanks Paul
Comment #6
rootworkI'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.
Comment #7
szantog commentedsorry 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.
Comment #8
vegantriathlete