Xaraya + G2

valiant

Joined: 2003-01-04
Posts: 32509
Posted: Thu, 2005-11-10 14:03

-------------------------
xaraya:
-------------------------

state: beta, requires xaraya 1.0, G 2.1 (core version 1.0.22+). current integration module version: 0.6.13
download: http://galleryupdates.jpmullan.com/#integrations
contact: valiant

Missing features:
- Search integration
- easy tag integration to add G2 images in xaraya articles / comments
- Short URL / URL rewrite support

Things that should be improved:
- Missing G2 theme for xaraya

 
Laibcoms

Joined: 2004-04-17
Posts: 14
Posted: Mon, 2006-01-02 12:15

Hi, just installed a fresh G2, the integration of the latest G2 to Xaraya 1.0.1 (latest currently) using this module.

I am timing-out after I click update in the g2-xar module (in Xaraya) when the module synchs the xar users and g2 users.

I have 2000+ users in Xaraya ^^

Coz the synch won't finish I get the error when visiting G2

Error (ERROR_PERMISSION_DENIED)

    * in main.php at line 142 (gallerystatus::error)
    * in main.php at line 87
    * in main.php at line 80

^_^

Any possible workaround?
THanks :D

 
Laibcoms

Joined: 2004-04-17
Posts: 14
Posted: Mon, 2006-01-02 12:41

I was trying to add the G2 Sidebar block and this appeared

The following lines were printed in raw mode by module, however this should not happen. The module is probably directly calling functions like echo, print, or printf. Please modify the module to exclude direct output. The module is violating Xaraya architecture principles.

It won't show the sidebar currently eventhough the block was added.

 
nyback
nyback's picture

Joined: 2003-06-15
Posts: 9
Posted: Wed, 2006-01-04 17:10

I started to get errors after upgrading to latest xaraya. I get an error when i try ro suncronize the user data.
Any clues?

Failed to update G2 user with extId [18]. Here is the error message from G2: <br /> [Error (ERROR_MISSING_OBJECT) : Missing object for 18<ul><li><b>in</b> modules/core/classes/GalleryStorage/DatabaseStorage.class <b>at line</b> 2121 (gallerystatus::error) <li><b>in</b> modules/core/classes/GalleryStorage/DatabaseStorage.class <b>at line</b> 305 (mysqldatabasestorage::_identifyentities) <li><b>in</b> modules/core/classes/GalleryStorage.class <b>at line</b> 118 (mysqldatabasestorage::loadentities) <li><b>in</b> modules/core/classes/helpers/GalleryEntityHelper_simple.class <b>at line</b> 82 (gallerystorage::loadentities) <li><b>in</b> modules/core/classes/helpers/GalleryEntityHelper_simple.class <b>at line</b> 141 (galleryentityhelper_simple::loadentitiesbyid) <li><b>in</b> modules/core/classes/GalleryCoreApi.class <b>at line</b> 2225 (galleryentityhelper_simple::loadentitybyexternalid) <li><b>in</b> modules/core/classes/GalleryEmbed.class <b>at line</b> 331 (gallerycoreapi::loadentitybyexternalid) <li><b>in</b> /var/www/nyback.com/htdocs/xaraya/modules/gallery2/xargallery2helper.php <b>at line</b> 351 (galleryembed::updateuser) <li><b>in</b> /var/www/nyback.com/htdocs/xaraya/modules/gallery2/xargallery2helper.php <b>at line</b> 1617 (xargallery2helper::g2updateuser) <li><b>in</b> /var/www/nyback.com/htdocs/xaraya/modules/gallery2/xaradmin/updateconfig.php <b>at line</b> 82 (xargallery2helper::g2xarusergroupimportexport) <li><b>in</b> /var/www/nyback.com/htdocs/xaraya/includes/xarMod.php <b>at line</b> 884<li><b>in</b> /var/www/nyback.com/htdocs/xaraya/index.php <b>at line</b> 93<li><b>in</b> /var/www/nyback.com/htdocs/xaraya/index.php <b>at line</b> 161</ul>]
Explanation:

The procedure executed correctly, but the result failed.
Stacken:

at g2updateuser(xargallery2helper.php:354)

Array
(
[0] => 18
[1] => Array
(
[uid] => 18
[uname] => marianneviik
[name] => marianne
[email] =>

[pass] => 3bcaf9c54750292bd576f833275c9c5a
[state] => 3
[date_reg] => 1118227713
)

)

at g2xarusergroupimportexport(xargallery2helper.php:1617)
at gallery2_admin_updateconfig(updateconfig.php:82)

Array
(
[0] => Array
(
)

)

at xarmodfunc(xarMod.php:884)

Array
(
[0] => gallery2
[1] => admin
[2] => updateconfig
)

at xarmain(index.php:93)

 
Laibcoms

Joined: 2004-04-17
Posts: 14
Posted: Tue, 2006-01-24 12:02

Any updates? Comments from the author?

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Tue, 2006-01-24 14:41

no updates, no.
i'll work on a new integration version that works with the current nightly snapshot / G2.1 as soon as possible, but i'm busy right now.

 
Laibcoms

Joined: 2004-04-17
Posts: 14
Posted: Tue, 2006-01-24 15:21

Ah, glad to hear that.

^_^

Hope it'll be soon tho.

 
Lakys

Joined: 2005-06-26
Posts: 55
Posted: Fri, 2006-01-27 17:55
valiant wrote:
no updates, no.
i'll work on a new integration version that works with the current nightly snapshot / G2.1 as soon as possible, but i'm busy right now.

Hello Valiant!

I have completely broken my Gallery integration within Xaraya as I upgraded to the last snapshot in order to install another module.
Is there any functional integration working with the 2.1, so I can inspire of the changes and apply them to the Xaraya integration.

Thank you!

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Fri, 2006-01-27 18:02

no, there is nothing yet.

but a quick hack is to change the GalleryEmbed::init calls in your xargallery2helper.class

1st call :
$ret = GalleryEmbed::init(array('embedUri' => '/xaraya/index.php?module=gallery2',
'g2Uri' => '/gallery2/',
'loginRedirect' => xarModGetVar('gallery2','g2.loginredirect'),
'activeUserId' => $uid, 'activeLanguage' => $g2LangCode,
'fullInit' => $fullInit));

if ($ret) {
$msg = xarML('G2 did not return a success status upon an init request. Here is the error message from G2: <br /> [#(1)]', $ret->getAsHtml());
xarErrorSet(XAR_SYSTEM_EXCEPTION, 'FUNCTION_FAILED', new SystemException($msg));
return false;
}

(i assume your xaraya is in example.com/xaraya/ and g2 in example.com/gallery2/. set embedUri => '/' if it's in example.com/ etc.

2nd call
$ret = GalleryEmbed::init( array('embedUri' => '/xaraya/index.php?module=gallery2',
'g2Uri' => '/gallery2/',
'loginRedirect' => $g2loginredirect));

 
Lakys

Joined: 2005-06-26
Posts: 55
Posted: Fri, 2006-01-27 18:09

Hehe, I cannot believe how fast you were. :D

I was just trying to figure the thing as I compared the API galleryembed.class between the 2.0 and the 2.1.

Many thanks!
I do really appreciate. :)

 
Lakys

Joined: 2005-06-26
Posts: 55
Posted: Tue, 2006-01-31 23:07

Hello,

I have a couple of new questions:
1) I am using some G2 thumbnails in articles and associate override templates:
<xar:set name="urlgallery">"/gallery/main.php?g2_view=core.DownloadItem&amp;g2_itemId="</xar:set>
<A href="#$urlgallery##$Picture1#" _target="new"><img src="#$urlgallery##$Thumbnail1#"/></A>

Where Picture1 and Thumbnail1 are NumberBox Dynamic Properties.

It is working well, but the thumbnails do not show up if the user has not already visited in the same session the Gallery module page. I suppose there must be something to be done to initialize the session with G2 from the article module. I tried to add a hook between Gallery and Articles module... no luck. Any idea how to do this easily?

2) I get this error when one's logs out:
System Error at: .\gallery\modules\core\classes\Gallery.class (Line: 303) Undefined index: plugins.dirname
any idea?

Thank you!
ps: I am using the G2 2.1 and Xaraya 1.0.2

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Tue, 2006-01-31 23:49

1) that's only an issue if your images are not public

2) has been fixed yesterday in cvs.

 
Lakys

Joined: 2005-06-26
Posts: 55
Posted: Wed, 2006-02-01 01:05

Thank you Valiant.

But how can I do it if I wish to keep the picture private?

The only method is to use the Xaraya G2 roles/privilege? And to switch the Embedding-only to on? (I find practical to access it out of Xaraya as I get errors with some administration functions).

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Wed, 2006-02-01 01:31

this has nothing to do with xaraya privileges. you say your g2 item (image) is private (no view permission for the g2 everybody group).

s what you need is to make sure GalleryEmbed::init is called before the user visits.

there are 2 solutions:
1.
in the beginning, the gallery module for xaraya hooked in into xaraya's login event. we removed that under the assumption that we only want to create a g2 session for xaraya users that actually visit g2.
you want that feature:
you'd need to modify the gallery module for xaraya to add that hook again and to call GalleryEmbed::login on such events

2.
inszead of your URL hack, use the imageblock with the blocks=specificItem itemId=$id . imageblock does the login stuff in the background.

 
Lakys

Joined: 2005-06-26
Posts: 55
Posted: Wed, 2006-02-01 10:22
valiant wrote:
in the beginning, the gallery module for xaraya hooked in into xaraya's login event. we removed that under the assumption that we only want to create a g2 session for xaraya users that actually visit g2.
you want that feature:
you'd need to modify the gallery module for xaraya to add that hook again and to call GalleryEmbed::login on such events

It seems to be a great solution.

I have uncommented function gallery2_eventapi_OnUserLogin($value) in xareventapi.php.
Which module is handling "xaraya's login event"? I tried to hook into the roles module, but it is not working.

There is probably something obvious to do, but I am clueless :(

Thanks.

edit to add:
I have tried to use the random block for the second solution. I have fixed the code for the $ret, but the GalleryEmbed::getImageBlock($params) still generates some exception. I don't really know why. Probably that something has been changed in the 2.1 causing this.
I don't need the picture block but for anything else than the solution 2 you proposed.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Wed, 2006-02-01 21:39

there have been a lot of changes since 2.0, if($ret->isError()) { needs to be changed to if ($ret) { etc etc.

i'll probably release a version for g2.1 of the xaraya integration at the end of this week.

 
Lakys

Joined: 2005-06-26
Posts: 55
Posted: Wed, 2006-02-01 22:08
valiant wrote:
there have been a lot of changes since 2.0, if($ret->isError()) { needs to be changed to if ($ret) { etc etc.

i'll probably release a version for g2.1 of the xaraya integration at the end of this week.

Well, the $ret thing is not the thing blocking me. But if I can help for anything (just like beta test the version) please let me know.

I really need to have the integration working as soon as possible.

Thanks!

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sun, 2006-02-05 06:18

Announcement:

the integration module has been released in the version 0.6.13.

- works only with G 2.1 (not with G 2.0.2), to be precise, with G2 core module version 1.0.22+
- committed today small fixes to GalleryEmbed of G2 too, so get today's nightly snapshot / cvs of G2
- you can manually override embedUri / g2Uri / includePath. but the user only has to enter g2Uri, the rest is auto-detected. as is.

still missing:
- short url support. should be possible now again, but it requires some work.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Mon, 2006-02-06 09:24

@those who wish to login their xaraya users in G2 right when they login in xaraya:
open modules/gallery2/xareventapi.php and uncomment the onUserLogin function. then you must reinstall the module szch that xaraya knows about the change.

this is usually not necessary since we create only a session in G2 when a users visits a G2 site in xaraya or if the G2 imageblock is shown to the user.
but if you use non-public images in some pages of your xaraya installation e.g. by using a G2 image without the imageblock by just using the URL to the image in xaraya, then you need users to have a logged in g2 session in xaraya. and unless your users have visited a page with an imageblock or a g2 page before, they won't be logged in in g2.

why is this code commented out?
because the general assumption is that only a smaller percentile of your website visitors actually visit a g2 page and creating a session etc. costs some computing time and also costs some time in maintenance, e.g. when expiring sessions. and as long as you use the imageblock to show g2 images in your xaraya installation, it will work without this onUserLogin function.

 
geste

Joined: 2006-02-28
Posts: 5
Posted: Wed, 2006-04-05 04:48

I have just set up a fresh G2 2.1 installation and integration under Xaraya 1.01 and it all looked good (logged in as Xaraya/G2 admin account I'll call "Bob"). I added G2 to my main menu block. Great, I thought! It knows it is me! No need to sign on! (more about our auth setup later)

So I logged in using an ordinary user account (let's call that account "Eddie") and for the longest time, G2 would not display -- Xaraya would appear to go to the G2 module URL, but then (always!) move to the Roles/Account module. Weird, I thought.

So I fiddled with many things. I changed order of menu, used long URL, and changed long/short URL/path in G2 configuration page. Nothing helped. So I went into privileges and eventually added G2 admin privilieges for all users. No change.

Then it hit me: Not only was the successful "Bob" account admin level, it was also a G2 user account I created before the integration, or at least before Xaraya/G2 synched user accounts. So what I did was this: I deleted the non-admin "Eddie" account from G2 and then recreated it within G2 and -- Voila! -- G2 module now came up, but it did not seem to ID "Eddie" as anything other than anonymous user. So, I went back to configure/synch G2 (where Eddie still existed!), but now it fails with errors much like the OP reports, including "Failed to create a extmap entry for role uid [28] and entityId [43]" and "g2addexternalMapEntry". At this point, integrated G2 will not run -- "needs to be configured" -- so it is dead in water.

A little auth/auth background: I have Xaraya set up with both AuthLDAP and AuthSSO. Separate from Xaraya and before useres even see Xaraya, users have to first authenticate against an external "Pubcookie" (www.pubcookie.org) service and then our Apache server authorized them against an LDAP-derived user list (authGroupFile). So our idea is to have no subsequest sign-on/password. This works. New Xaraya user accounts are automatically created on first visit (I think AuthSSO uses HTTP REMOTE_USER and full name and email are pulled from LDAP based on UID match to REMOTE_USER).

So, I am a little mystified. My admin account "Bob" existed in Xaraya before I installed G2 and added that account, and that worked. I am a little mystified as to what to do to revive the integration at this point. I deactivated and reactivate the module, but no change. Any thoughts on a next stap or two? ....nap time, I think!

 
geste

Joined: 2006-02-28
Posts: 5
Posted: Wed, 2006-04-05 22:54

Follow-up to myself: I was able to get integrated G2 configured again. The failure message complained about not being able to change attributes for user "Eddie" noted previously. So I went and deleted Eddie both from G2 and then Xaraya and was able to configure G2 again.

Having got that running I auth/authed to Xaraya again as Eddie. As hoped, it automatically recreated the non-privileged Eddie account. However, when I attempt to go to integrated G2, I am back at square one: It will not go to G2, but drops me instead to the Xaraya Roles/Account page/module.

One observation that might be important:

I have added Xaraya menu options for both standalone and integrated G2.

Say I clear cookies and visit Xaraya menu as "Eddie" and select integrated G2 (where it fails). If I then select stand-alone G2, it says "Welcome Eddie!" -- logs me in.

If, however, I clear cookies and vist Xaraya and go directly to stand-alone G2, it does not identify me.

Sooo, even though selection of integrated G2 fails, it does accomplish something in Xaraya as far as pulling user ID into some variable such that G2 recognizes it when I redirect to standalone G2.

I am starting to ramble, but if anyone has any thoughts for troubleshooting steps, I am all ears...

Thanks,

Jim

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Fri, 2006-04-07 00:08

no idea why it redirects to the roles page. i'm not using the integration myself, but there are some users of it.
i guess it must be either a xaraya change in their code / behavior since 1.0 or your xaraya roles settings / roles module settings are special.

just a clarification:
- when you configure the integration, it creates g2 users in xaraya and the other way around and it maps users that have the same name in both applications
- after the initial configuration, never create a new user in g2 yourself since xaraya will not know about this change
- after the initial configuration, if a user gets created in xaraya, it should automatically be created in g2 as well

not sure when i have time to look into this. if you have some php / programming skills, i'd start debugging by looking at:
- xaraya/modules/gallery2/xaradminapi/createhook.php
- xaraya/modules/gallery2/xargallery2helper.class xarGallery2Helper::g2createUser

debug by adding print + exit statements... or die("message");

 
geste

Joined: 2006-02-28
Posts: 5
Posted: Fri, 2006-04-07 04:54

Thanks for your help.

With respect to your comments:

Quote:
just a clarification:
- when you configure the integration, it creates g2 users in xaraya and the other way around and it maps users that have the same name in both applications
- after the initial configuration, never create a new user in g2 yourself since xaraya will not know about this change

I probably violated this at one point and created some of my own problem. It may behoove me to start this integration a third time and pay attention to that. My PHP skills are mediocre but probably good enough to work this a bit more. Can also turn on logging to try to see what is happening when it jumps to roles (if that continues).

I guess one question is whether I can redo the integration simply with fresh G2/database and integration module install or whether the integration adds anything to Xaraya DB that I need to attend to to make sure I get a fresh start. When you say "maps the users" I probably need to figure out where that is taking place and if the mapping is stored in Xaraya anywhere.

If the problem with switching to Roles persists I will probably take that up in a Xaraya forum if I can pin it down a bit.

Thanks!

Jim

 
geste

Joined: 2006-02-28
Posts: 5
Posted: Tue, 2006-04-18 23:04
geste wrote:
Thanks for your help.

With respect to your comments:

Quote:
just a clarification:
- when you configure the integration, it creates g2 users in xaraya and the other way around and it maps users that have the same name in both applications
- after the initial configuration, never create a new user in g2 yourself since xaraya will not know about this change

Jim

Just a little follow-on to this. I reinstalled Gallery2 and integration again from scratch to make sure I didn't flub this.

I still have the problem where non-privileged users aren't transferred to integrated G2; I'm going to look at more Xaraya logging and take that up there.

One other oddity, though, that seems G2-specific: When I go into Site Admin and looks at users, I see only 3-4 of the users from Xaraya. However, if I go to my G2_User table, all 13-14 users from Xaraya are there. This would seem like a G2 bug -- can't see why it would depend on the integration and I don't see anything unusual in the Users table entries. Thoughts?

 
nyback
nyback's picture

Joined: 2003-06-15
Posts: 9
Posted: Wed, 2006-04-19 08:25

I just upgraded gallery to 2.1 and also the xaraya module.
I had to remove the gallery blocks i was using otherwise i could not get into xaraya.

But now i get

Fatal error: Call to a member function on a non-object in /var/www/nyback.com/htdocs/xaraya/modules/gallery2/xarinit.php on line 225

When i click upgrade of the gallery2 module in xaraya modules list.

I have latest xaraya 1 from monotone

/Andreas

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Wed, 2006-04-19 08:32

what's on that line?
so you have the latest gallery2 integration for xaraya? it's not in the xaraya monotone repository.

 
nyback
nyback's picture

Joined: 2003-06-15
Posts: 9
Posted: Wed, 2006-04-19 09:08

Yes, i downloaded the latest integration from here. Not CVS but the xaraya.zip

This is the code:
/* Get the current G2 core version */
list ($ret, $g2Version) = GalleryCoreApi::getPluginParameter('module', 'core', '_version');
if ($ret->isSuccess()) {
$minG2Version = xarModGetVar('gallery2','g2.minCoreVersion');
if (version_compare($minG2Version, $g2Version) <= 0) {
$status = true;
}
}

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Thu, 2006-04-20 21:16

that's a bug.
you can fix your file by changing the highlighted line to
if (empty($ret)) {

currently i can't commit a fix since we're in the transition from cvs to svn.

 
nyback
nyback's picture

Joined: 2003-06-15
Posts: 9
Posted: Fri, 2006-04-21 09:49

Thanks very much for the help. That helped to upgrade the module.
But after upgrade when i try to access the module from xaraya with index.php?module=gallery2 i get an error:

PHP: Varning

At: /var/www/nyback.com/htdocs/xaraya/modules/gallery2/xargallery2helper.php (Line: 122) init(/var/www/nyback.com/htdocs/gallery/): failed to open stream: Success

Code:

function init($ignoreConfiguration = false, $initAsUser = false, $fullInit = true)
{
// only init if not already done so
if (xarGallery2Helper::isInitiated()) {
return true;
}

if(!$ignoreConfiguration && !xarGallery2Helper::isConfigured()) {
return false;
}
require_once(xarModGetVar('gallery2','g2.includepath'));

$g2LangCode = null; $uid = null;

 
michelv

Joined: 2005-01-20
Posts: 17
Posted: Thu, 2006-07-06 18:15

I am using latest Xaraya (1.1.1) and latest Gallery and module.

I get the error in the URL: /index.php/base?code=8&exception=At:%20/www/gallery2/modules/core/classes/GalleryPhpVm.class%20(Line:%2056)%0Aiconv()%20[%3Ca%20href='function.iconv'%3Efunction.iconv%3C/a%3E]:%20Wrong%20charset,%20conversion%20from%20%60ISO-8859-1'%20to%20%60UTF-8'%20is%20not%20allowed&product=&component=&func=systemexit

Any idea what is happening here?

 
michelv

Joined: 2005-01-20
Posts: 17
Posted: Fri, 2006-07-07 12:30

Also, will the module be upgraded for the new registration process in Xaraya? Roles has been split and now "Registration" is used to register new users.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Fri, 2006-07-07 19:09

I have to look into xaraya's role module changes. thanks for the heads-up.
meanwhile this module will only work with older xaraya versions.

 
michelv

Joined: 2005-01-20
Posts: 17
Posted: Fri, 2006-07-28 07:53

Any news on this matter? Especially the error I got, should I report this as a Gallery bug?

Michel

 
nyback
nyback's picture

Joined: 2003-06-15
Posts: 9
Posted: Wed, 2006-08-30 20:01

Me also would be happy to know.
valiant: Do you know if there will be any spare time for you to upgrade the module in the close future? I have been forced to use gallery standalone on my site for very long now and i miss your module :-)

/Andreas

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Fri, 2006-09-22 17:01

Sorry for the delays.

I've installed G2 (svn version) with xaraya-1.1.2 and the 4 month old gallery2 module for xaraya (v6.1.13 from svn).

Everything worked fine, no issues.

If you have problems, please give me as much information as possible about the versions you're using and the problem you're experiencing.

BTW: I just noticed that the d/l location no longer works. You can still get the module from g2's svn repository. We're looking for an alternative location for nightly snapshots.

 
dkadish

Joined: 2006-09-13
Posts: 2
Posted: Wed, 2006-09-27 20:55

I am having an issue with name encoding in the Xaraya-G2 integration.
I am upgrading G2 and the G2 Integration module to the latest versions (2.1.2 for G2 and 0.6.13 from svn for the integration module).

The issue appears when Xaraya tried to synch its user list with the G2 list.
The problem appears to be that Xaraya uses a VARCHAR block with latin1_swedish_ci encoding to store its full user names, while G2 uses a VARBINARY block.
The Xaraya list allows for the use of "non-standard" characters like accents and umlauts, but those don't translate well to the G2 database.

The output from the Import/Export Roles page of Xaraya is

System Error
Function failed

Failed to update G2 user with extId [271]. Here is the error message from G2: <br /> [Error (ERROR_OBSOLETE_DATA) : UPDATE g2_User SET g_fullName=? WHERE g_id=? (Frank Kr&atilde;&not;&yen;r|367)<ul><li><b>in</b> modules/core/classes/GalleryStorage/GalleryStorageExtras.class <b>at line</b> 374 (gallerycoreapi::error) </li><li><b>in</b> modules/core/classes/GalleryStorage.class <b>at line</b> 304 (gallerystorageextras::saveentity) </li><li><b>in</b> modules/core/classes/GalleryEntity.class <b>at line</b> 317 (mysqlstorage::saveentity) </li><li><b>in</b> modules/core/classes/GalleryUser.class <b>at line</b> 212 (galleryentity::save) </li><li><b>in</b> modules/core/classes/GalleryEmbed.class <b>at line</b> 402 (galleryuser::save) </li><li><b>in</b> /home/httpd/html/km4dev/modules/gallery2/xargallery2helper.php <b>at line</b> 351 (galleryembed::updateuser) </li><li><b>in</b> /home/httpd/html/km4dev/modules/gallery2/xargallery2helper_advanced.php <b>at line</b> 824 (xargallery2helper::g2updateuser) </li><li><b>in</b> /home/httpd/html/km4dev/modules/gallery2/xargallery2helper.php <b>at line</b> 890 (xargallery2helper_advanced::g2xarusergroupimportexport) </li><li><b>in</b> /home/httpd/html/km4dev/modules/gallery2/xaradmin/updateconfig.php <b>at line</b> 150 (xargallery2helper::g2xarusergroupimportexport) </li><li><b>in</b> /home/httpd/html/km4dev/includes/xarMod.php <b>at line</b> 886</li><li><b>in</b> /home/httpd/html/km4dev/index.php <b>at line</b> 93</li><li><b>in</b> /home/httpd/html/km4dev/index.php <b>at line</b> 161</li></ul>]
Explanation:

The function executed correctly, but the result was a failure.
Stack:

at g2updateuser(xargallery2helper.php:354)

Array
(
[0] => 271
[1] => Array
(
[uid] => 271
[uname] => frankrae
[name] => Frank Kr�mer
[email] => frank@**********.***
[pass] => a8d2670efa0a349edd4a2a55fde5d554
[state] => 3
[date_reg] => 1062173260
)

)

at g2xarusergroupimportexport(xargallery2helper_advanced.php:824)
at g2xarusergroupimportexport(xargallery2helper.php:890)
at gallery2_admin_updateconfig(updateconfig.php:150)

Array
(
[0] => Array
(
)

)

at xarmodfunc(xarMod.php:886)

Array
(
[0] => gallery2
[1] => admin
[2] => updateconfig
)

at xarmain(index.php:93)


This is the info that Gallery spits out

Gallery version = 2.1.2 core 1.1.0.2
PHP version = 4.3.10 apache
Webserver = Apache/1.3.33 (Unix) PHP/4.3.10
Database = mysql 5.0.22-standard, lock.system=flock
Toolkits = ArchiveUpload, Exif, Gd
Acceleration = none, none
Operating system = Linux sandbox2 2.4.20-28.8 #1 Thu Dec 18 12:53:39 EST 2003 i686
Default theme = matrix
Locale = en_US
Browser = Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.7) Gecko/20060921 Ubuntu/dapper-security Firefox/1.5.0.7

I am using Xaraya v 1.0.0-rc3

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Wed, 2006-09-27 21:09

the character collation differences might be an issue.
but g2 doesn't use varbinary. it uses varchar for text like usernames.

varbinary is only used in the upgrade code of g2.0 -> g2.1. but in the end, the column should be varchar again.

maybe it needs additional code in the gallery2 module for xaraya to convert between the two charsets.
but better don't mix them. xaraya should be used in utf8 as well.

 
Danny

Joined: 2003-03-24
Posts: 90
Posted: Wed, 2007-04-11 15:07

Hi,

Xaraya 1.1.2 and Gallery 2.2.1 runs fine, but I have a problem with Xaraya with integrated Gallery 2.2.1. I can even not run as admin the configuration of Gallery 2 within Xaraya. The following URL are generated:

http://www.test.net/index.php/base?code=2&exception=At:%20/is/htdocs/JIMII31Z7Q/www/modules/gallery2/xargallery2helper_advanced.php%20(Line:%20175)%0Afile_exists()%20[%3Ca%20href='function.file-exists'%3Efunction.file-exists%3C/a%3E]:%20open_basedir%20restriction%20in%20effect.%20File(/embed.php)%20is%20not%20within%20the%20allowed%20path(s):%20(/tmp:/bin:/usr:/is/htdocs/JIMII31Z7Q)&product=&component=&func=systemexit

I can't understand it. Of course is embed.php within the allowed path. it is in /is/htdocs/JIMII31Z7Q/www/gallery2.

Can somebody help me?

Thanks in advance,

Danny

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sun, 2007-04-15 14:27

Danny

Sounds like your webhost changed the configuration. Or you installed G2 / xaraya in different locations than before.

> open_basedir restriction in effect. File(/embed.php)

Or...

Question:
Is /embed.php the right path to G2? I don't think so. That would mean that embed.php is in the root of your filesystem, which it certainly is not.
It should be something like /home/youraccount/public_html/gallery2/embed.php or so.

--------------
Documentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage

 
Danny

Joined: 2003-03-24
Posts: 90
Posted: Sun, 2007-04-15 17:50

Hi Valiant,

thanks for your help. I don't know what the Hoster changed. But for your question, embed.php is in the same dir as index.php, config.php from the Gallery2 Installation.
Speaken in absolute paths Gallery2 with embed.php / index.php is in /is/htdocs/JIMII31Z7Q/www/gallery2, the Xaraya installation is in /is/htdocs/JIMII31Z7Q/www, so the modules directory is /is/htdocs/JIMII31Z7Q/www/modules.

But as written before, Xaraya and Gallery2 works fine - standalone. But the integration doesn't work, I'm not able to configure the Gallery2 modul within Xaraya.

Thanks for your help,

Danny

 
Lakys

Joined: 2005-06-26
Posts: 55
Posted: Thu, 2008-05-15 14:18

I don't know whether it could help anyone, but I think it should be mentioned here.

I was finalizing my website using an integration between G2.2.1 and Xaraya 1.1.3 and had an issue I could finally fix.

Description of the issue:
G2 and Xaraya were working fine for anonymous, (some) old and admin users.
New (and some other) users could not see the image block.
Access to the G2 module in Xaraya causes an exception (Module function roles_user_register does not exist.) because of a redirection from G2 to a missing register function in Xaraya.

Explaination:
User synchronization code was working fine. However, for some reasons, user created in G2 were not added to the G2 Everybody group.
It results them to have mostly no right to do anything and the errors encountered.

Fix:
In gallery2 folder in xaraya, add at line 250 in file xargallery2helper.php

    list($unused, $xarMemberships) = xarGallery2Helper::xarGetAncestors(array('uid' => $xarUser['uid']));
    $ret = GalleryEmbed::addUserToGroup($uid, $xarEverybodyGroup['uid']);
    if ($ret) {
	$msg = xarML('Failed to add g2 user with extid [#(1)] to g2 everybody group', $uid);
	xarErrorSet(XAR_SYSTEM_EXCEPTION, 'FUNCTION_FAILED', new SystemException($msg));
	return false;
    }

It is entirely possible that the problem is only specific to my installation (and multiple upgrades of G2 and Xaraya).

Edit: added the line to retrive the EverybodyGroup.

____________
Xaraya and G2 Integration website

 
Lakys

Joined: 2005-06-26
Posts: 55
Posted: Mon, 2009-01-19 18:28

Hi,

I am still maintaining two Xaraya web applications integrated with the latest G2 (2.3). It works well.
I have already migrated successfully one to the latest version 1.1.5, and now to Xaragami Cumulus (1.1.6).

I have made a few fixes (just like the one above).

I would really like to make some further evolutions and to use a source code repository at Xarigami.com.

Valiant, would you allow me to make it?

Thanks.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Mon, 2009-01-19 19:03

thanks for stepping forward to maintain this package.
you're welcome to submit any changes for the xaraya integration. i'll gladly review it and submit it.

for code reviews, please use:
http://reviews.gallery2.org/

thanks!

--------------
Documentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage

 
Lakys

Joined: 2005-06-26
Posts: 55
Posted: Mon, 2009-01-19 20:59

Thank you Valiant for your quick response,

I shall validate my changes and submit them there then.