Fianlly, after getting the latest CVS integration code, I was able to get the component and module for G2 integration running. However, when I click my newly-created menu item, I see gallery with the following error above Gallery:
------------------------------
Error (ERROR_MISSING_OBJECT) : -1 GalleryUser
* in D:\Websites\senate\gallery2\modules\core\classes\helpers\GalleryEntityHelper_simple.class at line 138 (gallerystatus::error)
* in D:\Websites\senate\gallery2\modules\core\classes\GalleryCoreApi.class at line 2207 (galleryentityhelper_simple::loadentitybyexternalid)
* in D:\Websites\senate\gallery2\modules\core\classes\GalleryEmbed.class at line 186 (gallerycoreapi::loadentitybyexternalid)
* in D:\Websites\senate\gallery2\modules\core\classes\GalleryEmbed.class at line 96 (galleryembed::checkactiveuser)
* in D:\WebSites\senate\components\com_gallery2\userfuncs.php at line 24 (galleryembed::init)
* in D:\WebSites\senate\components\com_gallery2\gallery2.php at line 20 (g2helperclass::init_g2)
* in D:\WebSites\senate\index.php at line 182
----------------------------
If you'd like to see the error in action, go to studentsenate.rpi.edu and click Gallery (not Photo Gallery - that's a wrapper)... Any ideas always appreciated!
August
Posts: 430
aaugustj,
mambo is giving guest user the id of -1 and this isn't accepted by gallery.
which mambo install are you using?
you can intercept this error, by going to the function init_G2
Posts: 6
Thanks for the quick reply. I'm using mos_plus 2.1.3, which is basically a mix of phpbb and Mambo 4.5.2, I believe. I want the anonymous user to be able to access gallery, so how should I remedy this error?
Posts: 430
aaugustj,
sorry i have to adept the component to work with mos_plus, there is no simple cure here. But i'll do it in the next release.
regards,
Michiel
Posts: 6
Just curious - how is mos_plus's DB schema or code different from the regular Mambo distro? - this may be casuing more problems than just my gallery issue...
Posts: 430
aaugustj,
sorry still on my todo list, haven't sort this out yet,
regards,
Michiel
Posts: 6
Well, I hacked around the integration component for g2 and found that:
1) mos_plus, to become compatible with phpbb and mambo both, altered the structure of the mos_users table. There are many additions, but the only change is that id became user_id in the mos_users table.
2) The component makes repeated references to the mos_users table and calls for the id column of the mos_users table, that should be user_id .
I then did the following:
Went looking through the component and replaced instances of calles to id with user_id (think I did it correctly)
Then I realized the reason for my original error:
In userfuncs.php replaced if($user_id == 0){ $user_id = ''; } to
if($user_id == -1){ $user_id = ''; }
I then started using the modified component with Gallery2 Beta3...
The users integrated successfully, except their username is their email address, the hased_password field reads like:5^gOe89ea82d7eb3c7ac34be73847e3388cf ,and the email field reads like: bfc4a85f5b80469f2c9698f1be9e0458 (don't think it's supposed to). And, of course the users can't login.
Even though I use my admin username (same in mambo and g2), it won't login - it just says welcome guest.
You're welcome to take a look at my modifications to the component (probably a stupid error somewhere). It's located at: http://starbase123.com/com_gallery2.zip
Thanks for all your help.
Posts: 430
aaugustj,
your problem is that my code uses numbers to adress the user database and this user database, thxs to mos_plus, isn't the same anymore. The wrong info is synced to G2 but the right data is used when connecting to g2, because this is done through the call off $my in mambo. $my contains all the user info when logged in mambo.
So i have to right a patch for this or come up with an other solution.
regards,
Michiel