| Author |
Message |
smg
Beginner


Joined: Jul 21, 2008 Posts: 15
|
Posted: Mon Sep 29, 2008 5:12 pm Post subject: Remove old gallery-only users fails |
|
|
Hi.
I've upgraded to phpbb3. When trying to synchronize (and delete) users I get
deleteUserItems failed for 930. Here is the error message from G2:
Error (ERROR_PERMISSION_DENIED)
in modules/core/classes/helpers/GalleryUserHelper_medium.class at line 169 (gallerycoreapi::error)
in modules/core/classes/GalleryCoreApi.class at line 544 (galleryuserhelper_medium::assertsiteadministrator)
in modules/core/classes/helpers/GalleryUserHelper_medium.class at line 185 (gallerycoreapi::assertuserissiteadministrator)
in modules/core/classes/GalleryCoreApi.class at line 556 (galleryuserhelper_medium::deleteuseritems)
in /home/html/phpBB3/includes/acp/acp_gallery2.php at line 947 (gallerycoreapi::deleteuseritems)
in /home/html/phpBB3/includes/functions_module.php at line 471 (acp_gallery2::main)
in /home/html/phpBB3/adm/index.php at line 74 (p_master::load_
If I synchronize with keep as is I get synchronizied from phpbb3 to gallery:
7 group(s) processed for import to Gallery 2 from phpBB.
7 group(s) already mapped to Gallery 2.
0 new group(s) succeeded import to Gallery 2 from phpBB.
13 user(s) processed for import to Gallery 2 from phpBB.
12 user(s) already mapped to Gallery 2.
1 new admin user(s) mapped to Gallery 2.
1 new user(s) succeeded import to Gallery 2 from phpBB.
I'd really like to be able to delete those users... |
|
| Back to top |
|
|
AdBot
|
| Post subject: Remove old gallery-only users fails |
|
|
|
|
|
| Back to top |
|
 |
smg
Beginner


Joined: Jul 21, 2008 Posts: 15
|
Posted: Mon Sep 29, 2008 5:28 pm Post subject: Re: Remove old gallery-only users fails |
|
|
... and it seems that the map between gallery users and phpbb3 users is broken because:
I'm able to access gallery from the main gallery button in phpbb3, but my user's list has no users with gallery link and the g2img don't find my test user's gallery.
(I'm using a custom phpbb3-style and norwegian language settings.)
I think perhaps this may be a gallery2-related problem since the gallery has become more and more sluggish. It is quite large, but not that large... |
|
| Back to top |
|
|
jettyrat
Moderator


Joined: Nov 28, 2005 Posts: 1047
|
Posted: Mon Sep 29, 2008 6:09 pm Post subject: Re: Remove old gallery-only users fails |
|
|
What version of Gallery?
I suspect some security stuff from G2.3 may have been back-ported to 2.2.6, but not sure. I had to change some things in the integration to make the delete user option work for G2.3
I don't have G2.2.6 installed so can't test at the moment.
If the mapping is out of sync, you can delete all the entries in the externalidmap table and sync the users again (make a backup first). The users won't have a link to their gallery until they visit the embedded gallery at least once. |
|
| Back to top |
|
|
smg
Beginner


Joined: Jul 21, 2008 Posts: 15
|
Posted: Tue Sep 30, 2008 12:05 am Post subject: Re: Remove old gallery-only users fails |
|
|
This is gallery 2.2.5 (soon to be upgraded if all goes well) - but I don't use the newest integration pack either. I use an integration pack downloaded sometime this summer (? When 2.2.5 and 3.0.2 whas the newest) So it should be compatible with my running versions.
I'll have a look into the table you mentioned.
In the middle of the night - my head buzzing - I had another tought:
I work with at split server configuration (1: webserver, 2: mysqlserver) and at the present behind a .htaccess which allow access based on IP... I've not configured the .htaccess file to allow for access between the servers. In my opinion it shouldn't be necessary, but I'll give that a try as well. |
|
| Back to top |
|
|
smg
Beginner


Joined: Jul 21, 2008 Posts: 15
|
Posted: Tue Sep 30, 2008 7:47 am Post subject: Re: Remove old gallery-only users fails |
|
|
Progressing - step by step.
After deleting all records from externalidmap and running the synch again - and logging in my user... I can see the gallery button in the memberlist by my account. The strange thing is - I didn't get the same message regarding galleryusers not present in phpbb this time (only for galleryAdmin). Last time it was about 100 stk. I've found some of them (aprox 10) among my phpbb3users - so I guess I've imported some of them.
Later I've deleted those from both user tables though the acp and galleryadmin UIs. The size of the bases seems plausible - 2003 gallery users and 2096 phpbb3 users. I assume that the differende in numbers are due to groups, bots etc.
Still I got some problems.
1) Is there any way to manually update the table that the memberlist and profile reads in order to get the gallerybutton for users with gallery in place before they access the gallery themselves? I did check for "export users now" under synchronize.
2) The g2img plugin don't work. It doesn't find my album in the gallery ... I get the button on posting.php. I get the popup. But It times out and ends with the message (translated from norwegian) "No more images in this album. Please choose another album from the navigation". The window is empty with one button "about g2image" and two links "expand all" and "collapse all". These links does not do anything, and the status bar shows javascript "error on page".
BTW: I use urlrewrite, and that - at least - seems to work. |
|
| Back to top |
|
|
jettyrat
Moderator


Joined: Nov 28, 2005 Posts: 1047
|
Posted: Tue Sep 30, 2008 9:48 am Post subject: Re: Remove old gallery-only users fails |
|
|
First, be careful deleting users from the gallery admin. For some reason deleting users from gallery does not delete them from the externalIdMap and that can cause problems for the integration. If you have to do it that way, you should also make sure there is no entry for that user id in the externalIdMap table.
There are ~50 bot users in the default phpbb installation, but the integration also does not export inactive users so that can cause a user count difference as well.
I've been thinking about writing a utility function to go in and compare the gallery users against the phpbb users and check the health of the externalIdMap table and look for problems with synchronization. Something an admin could run any time.
As to your problems,
1. There is currently no way to update the users gallery id without them visiting gallery at least once. The value is stored in the 'user_gallery' field of the phpbb_users table and the integration only checks it when the particular user visits the embedded gallery. It would take a custom function to update that for all users at once. Maybe I could add that to the utility function as well. I could probably whip something up for you if you really need it and I knew exactly what integration version you are using. We would just need to loop through all the users and call the mapGalleryLink function in g2helper for each one.
2. The g2image plugin is no longer used in the integration. Ive written a new one specifically for the integration, but it won't be available until G2.3 is final. It sounds like yours is pointing at a bad album id, just guessing. Does the gallery album id link that shows up in your profile work and point to a valid album of yours? If you use firefox with the firebug plugin installed, you can read the javascript error. |
|
| Back to top |
|
|
smg
Beginner


Joined: Jul 21, 2008 Posts: 15
|
Posted: Tue Sep 30, 2008 12:27 pm Post subject: Re: Remove old gallery-only users fails |
|
|
I found an error (or two ) with my integration that broke the connection between gallery and phpbb when deleting users...
But I emptied the externalIdMap after deleting the users and re-ran the synch with no errors so I think that worked out well.
1) If there is no way - then it's the way it is. No problem.
BTW - the version I'm running (hopefully ) is 2008-02-26- Version 1.0.1.
2)The gallery link shows up in memberlist&profile without problems. It points correctly to my user's album. My user must have the correct user_gallery value as far as I can tell.
But - I'm running my phpbb-tables with prefix "phpbb3_", not the standard "phpbb_" - could that be the source of the problem? I'v updated the statements in the core integration accordingly, but could there be anything special with the code for g2img? |
|
| Back to top |
|
|
jettyrat
Moderator


Joined: Nov 28, 2005 Posts: 1047
|
Posted: Tue Sep 30, 2008 12:54 pm Post subject: Re: Remove old gallery-only users fails |
|
|
| The g2image from that integration is written by a third party and is not specific to phpbb3, so I doubt the table prefix is the issue. The 1.0.1 code I have does not start in the users album automatically. Are you using the mod from here [nukedgallery.net]? |
|
| Back to top |
|
|
smg
Beginner


Joined: Jul 21, 2008 Posts: 15
|
|
| Back to top |
|
|
jettyrat
Moderator


Joined: Nov 28, 2005 Posts: 1047
|
|
| Back to top |
|
|
smg
Beginner


Joined: Jul 21, 2008 Posts: 15
|
|
| Back to top |
|
|
jettyrat
Moderator


Joined: Nov 28, 2005 Posts: 1047
|
Posted: Tue Sep 30, 2008 2:57 pm Post subject: Re: Remove old gallery-only users fails |
|
|
I don't think you have to do anything in the acp, just add the correct edits to the files.  |
|
| Back to top |
|
|
smg
Beginner


Joined: Jul 21, 2008 Posts: 15
|
Posted: Tue Sep 30, 2008 3:09 pm Post subject: Re: Remove old gallery-only users fails |
|
|
Done that - didn't help.
Added the debug output and got:
user_gallery is: 91103
In addition to the earlier mentioned error messages.
BTW - I got root access to both the sql server and the webserver. I can't se anything in the apache error log... and I don't know where to look for sql errors. |
|
| Back to top |
|
|
jettyrat
Moderator


Joined: Nov 28, 2005 Posts: 1047
|
Posted: Tue Sep 30, 2008 3:19 pm Post subject: Re: Remove old gallery-only users fails |
|
|
So is gallery id 91103 the id of your album? Is that the same id that works in you profile gallery link?
According to that info, this should take you to your album: http://your_site/phpbb3_path/gallery2.p ... emId=91103 |
|
| Back to top |
|
|
smg
Beginner


Joined: Jul 21, 2008 Posts: 15
|
Posted: Tue Sep 30, 2008 3:33 pm Post subject: Re: Remove old gallery-only users fails |
|
|
And do you know - the worst thing is that I'm quite able to se my gallery by that link... !!!
If you PM me the IP you're using now (www.myip.no) then I'll PM you username/password and site address (and add you to the .htaccess file).
I haven't any other browser than IE installed so I can't see what's wrong with th .js... |
|
| Back to top |
|
|
|
|
|
|
|