Hi All
Gallery 2.3.3, I'm getting the following error for one of my users. Any ideas?
I'm running an updateUser to correct this user's password (hashed from vBulletin). For another user, the code worked, for this user it failed.
Do the classes in the error message suggest what is missing?
Thanks
Alan
line: 90, Failed to update G2 user with extId [21]. Here is the error message from G2:
Error (ERROR_MISSING_OBJECT, ERROR_UNKNOWN) : Missing object for 3415
in modules/core/classes/GalleryStorage/GalleryStorageExtras.class at line 2075 (gallerycoreapi::error)
in modules/core/classes/GalleryStorage/GalleryStorageExtras.class at line 98 (gallerystorageextras::_identifyentities)
in modules/core/classes/GalleryStorage.class at line 298 (gallerystorageextras::loadentities)
in modules/core/classes/helpers/GalleryEntityHelper_simple.class at line 71 (mysqlstorage::loadentities)
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 375 (gallerycoreapi::loadentitybyexternalid)
in /home/sites/stdregisterforum.org.uk/public_html/gallery2.php at line 88 (galleryembed::updateuser)
in /home/sites/stdregisterforum.org.uk/public_html/gallery2.php at line 50
Posts: 5
I had the same problem. This is likely caused by your external mapping id's getting out of whack. Log into the database and view the records in the g2_externalidmap table. In my case, the external id was pointing at an invalid (deleted) entity id.
I'd recommend:
1. Write down all the user details
2. Delete the user using the Gallery GUI
3. Check if the user still exists in g2_externalidmap and then delete it (make sure you have a db backup first!)
4. Create the user again using the Gallery GUI
There may be another way to do this but as far as I can see the GalleryEmbed class does not cater for this.
Posts: 5
Just found this - much safer than deleting records from the database:
GalleryCoreApi::removeMapEntry('ExternalIdMap', array('externalId' => $id, 'entityType' => 'GalleryUser'));
Posts: 34
Thanks, I'll have a look and let you know how I get on!