Closed (fixed)
Project:
Bibliography Module
Version:
6.x-2.x-dev
Component:
User interface
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
2 Oct 2009 at 20:05 UTC
Updated:
29 Mar 2012 at 02:00 UTC
Jump to comment: Most recent file
Comments
Comment #1
ghosty commentedDid this ever get fixed. I have the same issue
Comment #2
rjerome commentedTo be honest, I haven't looked into it. I'll see what I can do, but I'll have to setup OG in order to replicate it and fix it.
Comment #3
ghosty commentedI looked more into the code and found the following:
if (og_is_group_post_type($node->type) && variable_get('og_audience_required', FALSE) && !user_access('administer nodes')) {
It's inside this statement that you get the error "You must join a group before posting on this website." Looking at the statement, the following 3 conditions must be true for you to get the error:
1. The form must be in a content type assigned to an organic group and be a post.
2. The organic group audience must not be required.
3. The user must not have administer node privs.
Now I was getting your error until I saw that another module I was using, OG Audience By Type, was removing the required setting for my groups. I forced the form to require an audience type and now I do not get this error. Check to see which modules you are using that might show the same conflict.
Hope this helps.
Comment #4
fuerst commentedReason is IMHO: In
biblio_form_alter()all form elements not belonging to Biblio will be removed. That's what triggers the error because Organic Groups is missing the$node->og_groupsvariable in it'shook_nodeapi()validate section which is called once you change the Publication Type which actually is a form submit.To validate this I just changed
to
in
biblio_form_alter()(Biblio 6.x-2.0-beta3) and it worked.I don't understand yet why Biblio is removing all form elements except it's own so I did not make a patch from it.
Comment #5
fuerst commentedI guess non-biblio form elements are hidden because of esthetic reasons. It may be better to hide non-biblio form elements by denying access instead of removing them which may crash other modules like OG. Attached patch tries to solve the issue by using the #access Form API property.
Update: Uploaded the wrong patch: biblio-594520-6.patch is for Biblio 7.x-2.x-dev.
Comment #6
fuerst commentedPatch for 6.x-2.x
Comment #7
rjerome commentedGood idea, has anyone tested it with OG to see if it resolves the original issue?
Comment #8
fuerst commentedI'm afraid you will not get a response when asking for OG/Biblio related issues. AFAIK using the #access property is the proper way to hide. Hiding it that way may help other modules too, not only OG.
Comment #9
Chuckler29 commentedOriginal poster back after several years. Back in the day I hacked the module and got it working, but today someone tried the DOI import and had the same problem. I applied the switch to using #access from the patch above and it fixed the problem. Downside, is the "don't send notifications" control now appears on the first form page, but that is no big deal. FYI, I'm using Biblio 6.x-1.7 and OG 6.x-2.1
Thanks for the work on this module!!
Comment #10
fuerst commentedThanks for the report - we can set it to RTBC now.
Comment #11
rjerome commentedOK, I've pushed that change to the repository...
http://drupalcode.org/project/biblio.git/commit/5d2143c
Thanks for the feedback.
Ron.