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
Posts: 32509
have you accessed xaraya with e:/xaraya/html/ instead of http://intranet/ when configuring the path in xaraya admin menu -> gallery2?
Posts: 4
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
Posts: 32509
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.
Posts: 4
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
Posts: 32509
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';
Posts: 4
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
Posts: 32509
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.