Trouble with mapped users

jkeating

Joined: 2007-12-03
Posts: 2
Posted: Mon, 2007-12-03 20:42

Hello.

I just upgraded wordpress, gallery, wpg2 to the latest versions and have a few issues:

  • Mapped users
  • Rewrites

I am unable to enter the rewrite settings due to this error:

updateFatal G2 error
 Here's the error from G2: Error (ERROR_BAD_PARAMETER)
in modules/core/classes/helpers/GalleryEntityHelper_simple.class at line 39 (GalleryCoreApi::error) 
in modules/core/classes/helpers/GalleryEntityHelper_simple.class at line 127 (GalleryEntityHelper_simple::loadEntitiesById) 
in modules/core/classes/GalleryCoreApi.class at line 2298 (GalleryEntityHelper_simple::loadEntityByExternalId) 
in modules/core/classes/GalleryEmbed.class at line 215 (GalleryCoreApi::loadEntityByExternalId) 
in /var/www/htdocs/wp-content/plugins/wpg2/wpg2embed.inc at line 102 (GalleryEmbed::checkActiveUser) 
in /var/www/htdocs/wp-content/plugins/wpg2/wpg2managerewrites.inc at line 130
in /var/www/htdocs/wp-content/plugins/wpg2/wpg2managerewrites.inc at line 57
in ??? at line 0
in /var/www/htdocs/wp-includes/plugin.php at line 164
in /var/www/htdocs/wp-admin/admin.php at line 49

I installed xdebug and stepped through it with a debugger and found that it fails in the g2_login function:


$ret = GalleryEmbed::isExternalIdMapped($user_ID, 'GalleryUser');
if (!$ret) {
  list ($ret, $user) = GalleryCoreApi::loadEntityByExternalId($user_ID, 'GalleryUser');
}

if ($ret) {
  g2_create_user($user_ID);
}

Perhaps I broke something when I upgraded, but I don't know enough of the internals and don't have time to go through more details... so for some reason it enters g2_create_user and fails. Perhaps someone can point me in the correct direction?

Thanks.

Jon

 
ozgreg
ozgreg's picture

Joined: 2003-10-18
Posts: 1378
Posted: Mon, 2007-12-03 21:27

Hiya jkeating,

Most likely your external mapping has gone a little strange, navigate to your Wordpress / Gallery2 Users tab under Wordpress Admin -> Users and that should restore the Wordpress to Gallery2 Mapping hopefully correcting the error..

____________________________________
Wordpress / Gallery2 (WPG2) Plugin, , WPG2 Documentation, WPG2 Demo

 
jkeating

Joined: 2007-12-03
Posts: 2
Posted: Mon, 2007-12-03 21:36

Thanks for the quick reply. When I go to Gallery2 Users in Wordpress, I get this:

Fatal G2 error:

No error details or anything. Any ideas?

Thanks,
Jon

 
ozgreg
ozgreg's picture

Joined: 2003-10-18
Posts: 1378
Posted: Tue, 2007-12-04 01:59

It sounds like your g2_ExternalIdMap table is completely corrupted and cannot be recovered. You will need to manually clear this table via a database tool (phpmyadmin). After you cleared this table, revisit the Gallery2 Users Tab and WPG2 will auto rebuild User Mappings for you..

____________________________________
Wordpress / Gallery2 (WPG2) Plugin, , WPG2 Documentation, WPG2 Demo