G2 + Xaraya integration problem

southwej

Joined: 2005-09-01
Posts: 4
Posted: Thu, 2005-09-01 14:21

I have tried getting G2 integrated with Xaraya without success. When inside Xaraya portal and I click on Gallery2 link, it takes me to the embedded G2 and shows me all the links and photos on the G2 home page. All the links have the incorrect information.

example:
http://intranet/index.php?module=gallery2 (shows correct web page and photos)
links on G2 page
http://intranet/E:/xaraya/html/index.php?module=gallery2&g2_view=core.SiteAdmin&g2_return=http%3A%2F%2Fintranet%2Findex.php%3Fmodule%3Dgallery2&g2_returnName=album

All the links (photo links included) show the location of Xaray in the link (E:/xaraya/html/) which of course does not work.

G2 worked great in stand alone mode. Xaraya works well except for G2 integration. What I have done wrong or what should I be looking for to solve the problem?

System Info:
Windows 2003 SP1
PHP 4.4
MySQL 4.1.1
Xaraya 1.0.0-rc2-1
Gallery2 2.0-rc-2

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Thu, 2005-09-01 14:24

have you accessed xaraya with e:/xaraya/html/ instead of http://intranet/ when configuring the path in xaraya admin menu -> gallery2?

 
southwej

Joined: 2005-09-01
Posts: 4
Posted: Thu, 2005-09-01 15:20

e:/xaraya/html/ is the source location of xaraya and I have not accessed it via the drive letter. The settings in the xaraya gallery2 module are:

Relative Url to G2: gallery/
G2 Include path: e:\gallery2\
Show Sidebar: yes

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Thu, 2005-09-01 16:07

i guess this "E:/xaraya/html/index.php" thing is what xaraya returns in your case as what we use as embedPath.
it is what xaraya returns for xarServerGetBaseURI().
i can't do anything about it if your xaraya / webserver is misconfigured.

you could hack

function xarServerGetBaseURI()
which is at the end of xargallery2helper.class in the gallery2 module of xaraya to return a correct value though.
or you could fix your webserver / xaraya.

 
southwej

Joined: 2005-09-01
Posts: 4
Posted: Fri, 2005-09-02 01:31

xarServerGetBaseURI() is returning '/'. I tried different values for xarServerGetBaseURI() (example setting xarServerGetBaseURI() to '/myvalue/') and I would get http://intranet/myvalue/e:\xaraya\html\..... I'm unsure where the "e:\xaraya\html\" is originating still. Anything else I can try?

Thanks,
Jim

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Fri, 2005-09-02 07:09

ah, wait. if it's returning '/', then that's perfect.
i assumed xarServerGetBaseURI() is the problem, but obviously it isn't.

then it must be embedUri = 'E:/xaraya/html/index.php?module=gallery2'.

in xargallery2helper.class around line 819:

// get the name of the xaraya entry point file (usually index.php)
$scriptName = preg_replace('|/([^/]+/)*|', '', $_SERVER['PATH_TRANSLATED']);

obviously PATH_TRANSLATED returns a wrong value in your case. or not what i expect. i acknowledge that perhaps i should check more than just PATH_TRANSLATED. but for the lack of development time at the moment, please just fix your system manually by replacing this line with
$scriptName = 'index.php';

 
southwej

Joined: 2005-09-01
Posts: 4
Posted: Fri, 2005-09-02 11:06

I tried something similar last night, but it didn't change anything. I tried your solution and still getting http://w2k3:89/E:%5Cxaraya%5Chtml%5Cindex.php?module=gallery2&g2_view...... I did think the fix would work when I looked at what PHP was returning for PATH_TRANSLATED (e:\xaraya\html\index.php), but it has not.

I just tried something which gets rid of the "e:\xaraya...." I turned off sidebar in the gallery2 module config menu. Something in the sidebar functions is adding the extra information. Where should I look for sidebar functions in the gallery2 modules?

Thanks for all the information you have provided so far.

Jim

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Fri, 2005-09-02 11:29

http://w2k3:89/E:%5Cxaraya%5Chtml%5Cindex.php?module=gallery2&g2_view......

doesn't make sense at all.
also, if the sidebar is shown inside the g2 page and not as a special xaraya block, there's no way it could have an influence on such things.

i'd still say it's the path_translated thing.