Hello,
first of all, its a very great module. I got it working so far, but encountered a serious problem. I have Drupal 6.16, a couple of registered Drupal users and a "fresh" phpBB3 installation (latest version: 3.0.7-PL1).
When I log in to Drupal with a user account, it is created correctly within phpBB3.
When I log out, I am logged out everywhere. Passwords are synched nicely at the beginning (I have not tried to change it though).
Select master registration system:
(X) Drupal master
phpBB master
When I create phpBB groups and add a phpbb user into that group manually, the corresponding roles in Drupal are checked. If a user is not within a group, an even set role within drupal is unset.
(Is it correct to initially create phpBB groups manually, where I want to have my users in?)
But I would like to have it the other way round: When I add a role to a Drupal user, I want him/her to be put into the corresponding phpBB group.
Is there a setting I have overseen?
Futhermore I tried to have a look into the code and see if it's probably related to the php 5.3 bug. I am using php 5.3.1, which is known to cause lots of Drupal modules to make warnings / errors.
So far I have not found a php warning, but when I print out the variable "sync", it's always set to "PHPBB_SYNC_TO_DRUPAL".
What is the requirement to have it set to PHPBB_SYNC_TO_PHPBB?
I am glad of any help / hint you (or anyone) could offer.
Best regards
Sera
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | phpbbforum_20110119.patch | 16.24 KB | Toxid |
| #8 | phpbbforum_20101208.patch | 17.53 KB | Sera |
| #3 | phpbbforum_20100618.patch | 17.42 KB | Sera |
| #1 | 6.x-2.0-BETA12.patch | 3.79 KB | Sera |
| #2 | 6.x-2.0-BETA12-v2.patch | 4.32 KB | Sera |
Comments
Comment #1
Sera commentedHello everyone,
I guess I found the error.
In the section where users are added to the groups it was checked, if the groups are empty and only if thats the case, the group was added. Of course there ARE groups, so that if-clause was misleading.
Furthermore when I created a user, the initial Drupal roles were NOT synched, when the user was created. I added a check, if the user is new (in phpBB), and if, the groups are added with the first synch. The variable is called $is_new_user
Also I found out, that one foreach-loop was not always getting an array as argument, thus throwing errors. I also fixed that.
Please see the attached patch. Now if DRUPAL is set as master, the phpBBgroups are added (or removed) correctly as soon as the user account is edited in DRUPAL. Also initial Drupal roles are synched to phpBB and the users are put into the regarding groups.
I have not tested, if the patch destroys anything when phpBB is set as master system, so please test it before use.
--> I also noticed, if Roles are deleted from DRUPAL, the users stay within the phpBB group. One has to either first remove the role to be deleted from all users (thus they are correctly thrown out of the group) and THEN delete the role itself. Or one has to remove the users from the phpBB group directly within the forum.
I dont know if that's working as intended, but will not investigate that further.
Comments / questions / etc are welcomed.
Best regards
Sera
PS: That's my first patch. So I don't know if I did everything correct.
PPS: I forgot to change: line 1677 from
if (!isset($new_roles[$rid])) {to
if (isset($new_roles[$rid])) {DON'T USE THE ATTACHED PATCH. Please see patch in #2!
Comment #2
Sera commentedPlease use this attached patch instead of the previous one (but still test it first). Somehow I can not delete the previous one from my post.
The bugfix herein fixes the bug, that as soon as a user is added, all roles which he hadn't initially were set, and all which he had, were unset. Now it should work correctly again: a user which had the role X, still has the role X after he was added to phpBB Forum via sync.
Comment #3
Sera commentedOkay, I noticed that somehow the query which master was set, wasn't done correctly (or partly ignored). At some places it was set manually (not by me...).
I fixed that, so I am always calling the _phpforum_set_user_data function with $sync = PHPBB_SYNC_TO_MASTER (which can be both), when I am outside the function. Inside it makes the query and depending on which variable was set by the user within the configuration of the phpbbforum module, it calls itself with $sync = $syncto (which is then either the option that phpbb is the master, or drupal is the master).
For debugging options I inserted some more brackets at if-clauses, and some more comments, to which the brackets belong. [The loops and complex if clauses are really very tricky...]
So now it syncs correctly, and ignores changes from the slaves. It only syncs changes from the master system.
Please test this before you are using this at a live site!
Patch is attached.
PS: Please note that the uid =1 isn't synced. This seems to be intended! So that the super admin in drupal can be another person than the super admin in phpbb.
Comment #4
muhleder commentedUsing the latest patch, looking good so far. Will report if we find any issues.
Comment #5
snailian commentedI'm using the latest patch as well. I'm still having difficulty with Drupal roles transferring to PHPBB groups. Adding a Drupal role works as it should, but removing a Drupal role does not remove the user from the PHPBB group. I am going to try and debug the problem - I'll share my findings.
Comment #6
Snet89 commentedI have a sync issue with the latest patch. It is a remove issue, where when i remove a user from a group and place them in another, the removal never happens.
This should be a simple change of processing order, where the removal-from-group action happens before the addition-to-group action.
Comment #7
Sera commentedDue to the new release from 24th november, I have to test how far (or not) the release candidate has included the fixes. Somehow I can't find any notes about that.
If it's not included, I will try to port the patch and have a look to the removal issues. Thank you for pointing that out.
Best regards
Sera
Comment #8
Sera commentedHello everyone,
as the initial problem still exists with the new release of this module, I ported the patch to version 6.x-2.0-rc1 (only the number of the lines, where code-fixes were made, changed). (I hope I created the patch file correctly, somehow I always mix the commands for creating a patch file up...)
@snailian: I can't re-create this problem. Right now I have a group called "Project members" in phpBB, and a corresponding role called "Project member". When I add this role in Drupal to a person, he/she appears correctly in the "Project members" group in phpBB. When I remove the role in Drupal, he/she disappears in the "Project members" group in phpBB.
Did you configure the phpbbforum Module correctly to sync the role with the group? Which php Version do you use? And from which user do you wanted to remove a group? It does not work for the administrator account though (uid=1, this is inteded, I guess).
I need to have more information here. Nevertheless I will try to add/remove several roles/groups at the same time and do some more testing. [Edit: works with 3 groups without a problem.]
@Snet89: What exactly do you want to synch? From Drupal to phpBB? Or vice versa? If Drupal is the master, the changes you made in the groups in phpBB are only temporary and will be overwritten as soon as the next sync process started. You need to change the Drupal roles, if you want to move a person from one group into another (if Drupal is the master).
I need also more information here.
-----------------------------------
Feedback to the patch is still welcome and more review is needed.
vb, I dont know if you read this, if you need more information from my side to include this into an official release, please don't hesitate to ask. I am still new into such deep bugfixing.
Best regards
Sera
Comment #9
CAHbl4 commentedI'm writing a module for synchronize roles through the API (EVE Online). To save the new role I am using the function user_save (). Module phpbb does not synchronize these changes to the forum and when I go to user profile, he synchronizes the role back from the forum. How I can fix this? I need only synchronization of roles from site to forum.
P.S. Sorry for bad English.
Comment #10
Toxid commentedI used this patch before to get phpbbforum to synch passwords correctly. Before the patch, passwords were synched phpbb -> drupal only. I got the same problem now that I upgraded to the latest phpbbforum module. Passwords won't synch from drupal to phpbb.
I tried using your patch, Sera, but it wouldn't apply. So I applied it manually and created a new patch file.
EDIT: Found the problem, it wasnt related to this patch.
Comment #11
vb commented>vb, I dont know if you read this, if you need more information from my side to include this into an official release, please don't hesitate to ask.
Sera, thanks for patch. I have read the issue only yesterday and before that i run the code thru the coder.
So i cannot review the patch just before RC2 which was already prepared for release.
I saw it a bit and have made some improvements in group sync. It is synced from phpBB3 and when i am adding or deleting roles in user profile. Other cases i did not test. Please test and submit cases in which it does not work in RC2.
Comment #12
Sera commentedHello vb,
I tested now RC2 (Drupal is set to be the Master).
For existing users:
* roles added are synced correctly (one or more at the same time)
* roles deleted are synced correctly (one ore more at the same time)
Adding AND deleting roles (e.g. add two roles, take one existing away) at the same time does not work though.
When adding (or removing) a user to (or from) a group in the phpBB forum the user will get (or loose) the regarding right in Drupal also (while Drupal is still configured to be the Master). I think this is still a glitch.
When configuring Drupal to be the master, I would expect Drupal to ignore changes made within the phpBB forum.
Examples:
Setup:
Master: Drupal
Role 1 synced to Group 1
Role 2 synced to Group 2
Example 1 (correct):
User: has no roles yet
Drupal: User receives Role 1
phpBB Forum: Role 1 is synced, User is added to Group 1
Example 2 (this is how it should work)
User: Role 1
phpBB Forum: User is added to Group 2
Drupal: There is no resync, thus the User does NOT receive Role 2! With the next sync (Drupal -> phpBB) the user should be removed from group 2 again!
Example 3 (this is how it should work)
User: Role 1
phpBBForum: User is removed from Group 1
Drupal: There is no resync. The user should not loose Role 1. With the next sync (Drupal -> phpBB) the user should be added into group 1 again.
Example 4 (status quo right now)
User: Role 1
phpBB Forum: User is added to Group 2
Drupal: Resync. User gets Role 2!
Example 5 (status quo right now)
User: Role 2
phpBB Forum: User is removed from Group 2
Drupal: resync: User looses Role 2, while it was set within Drupal before
Comment #13
fizk commentedPlease reopen if this is still an issue with 6.x-2.0-rc6.
Comment #14
agileware commentedUsing 6.x-2.0-rc6 and drupal master:
Add role to user in drupal: Group assigned to user in phpBB
Remove role from user in drupal: Group NOT removed from user in phpBB.
No role-group synchronisation occurs from phpBB -> drupal.
The specific roles and group are synced on the configuration page and syncing is enabled.
Comment #15
Skidz commentedUsing 6.x-2.x-dev w/drupal master: Same behaviour as #14 above. Will try and apply patch from #10 to this version and report back.
Comment #16
Skidz commentedNot possible to apply the patch. The module seems to have been completely reorganized (and to a large extent, rewritten). I'm unable to find the corresponding lines of code. many functions have changed names, etc.
Back to the drawing board... :-(
Comment #17
ilya commentedI'm having a hard time with the like issue as well.
My problem is the module doesn't sync with logintoboggan. I have logintoboggan set up to issue a temporary "awaiting authorisation" role until the user validates the e-mail address. After the validation logintoboggan issues an "authenticated" role + I've modded it to issue additional "forum authenticated" role (aded it just for the purpose of syncing roles to the phpBB module). I've also set roles sync as following:
"awaiting authorisation" in Drupal - "new user" in phpBB
"forum authenticated" in Drupal - "registered user" in phpBB
The expected result is that until the user confirms the e-mail address, he won't be able to post anything on the forum. However after the confirmation the new role isn't synced to phpBB.
Although if I assign the role manually, it does sync. But I still get the same result as #14.
Comment #18
Skidz commentedHas anyone ever found a solution to this issue ?
My Drupal roles sync just fine to phpBB, but once a role is assigned to a user in phpBB, it can only be removed in phpBB. Removing a role from a user in Drupal has no effect on the user in phpBB.
I'd be willing to pay someone to fix this issue...
Comment #19
demon326 commentedI don't think there will be a solution, since the module is pretty dead... no new bugfixes and reply on issue's.
The sad thing is, that this the only module that bridges both systems.
Comment #20
Skidz commentedThe future of this module looks pretty bleak...
http://fizk.net/blog/technology/phpbb-forum-integration-complete-rewrite-needed
Comment #21
demon326 commentedI gave up on this module a week ago and it forced me to switch to a other forum software that has a more stable bridge.
There is NO future for this module in its current form, its dead.
Comment #22
Skidz commentedSo what did you go with ?
I had a brief e-mail exchange with one of the maintainers. I think there is a door open for things to happen, but someone (or a group of someone's) would need to poney up some serious sponsorship dollars for that. My organization has very modest means and could probably contribute, but certainly not to the extent required for a major overhaul...
Comment #23
demon326 commentedI just went with IPB(175$ one time http://www.invisionpower.com/), there are two bridges out there that just connect the users and nothing more, both do have there bugs on the drupal side, but i don't think there game breaking... Send me mail via profile if you like to see here more.
Comment #24
Skidz commentedI looked into IPB before implementing phpBB. The bridge modules are very basic. They do significantly less integration than the current phpBB bridge does. IMHO, as far as forum sw goes, phpBB, plus a couple mods, provides 90% of the functionality of IPB....
If it works for you, great !
Comment #25
vb commentedSkidz, I will investigate what happens with group sync in D6.
Comment #26
Skidz commentedThank you Vadim. That would be awesome !