Xaraya 1.0 RC2: URL generation problem with latest Gallery2

Danny

Joined: 2003-03-24
Posts: 90
Posted: Wed, 2005-06-22 22:47

Hello all,

I have a strange problem. On 06/20 I have updated my site with Xaraya RC2+ with latest Bitkeeper, Gallery2 daily snapshot and the Gallery2 module for Xaraya in Version 0.6.5.

I have in the imageblock a strange problem. Whenever I'm inside an module or an article the pictures in the imageblock aren't shown. I have dig further and have seen, that the URL generation is a problem.

When I access my site normaly everything is working and the Picture URL look in the imageblock like this:

http://mysite/gallery2/main.php?g2_view=core.DownloadItem&g2_itemId=4221&g2_serialNumber

When I read an article the images in the imageblock aren't visible and the Picture URL are:

http://mysite/index.php/news/1389gallery2/main.php?g2_view=core.DownloadItem&g2_itemId=3216&g2_serialNumber=2&g2_GALLERYSID=c0945edd31e2d7a96d0f33a5d82b41b3

When I'm in the modules module, the pictures in the imageblock are:

http://mysite/index.php?module=modules&type=admingallery2/main.php&g2_view=core.DownloadItem&g2_itemId=4449&g2_serialNumber=2&g2_GALLERYSID=5e522f4d6aed6acbb4eaa0b101797ec3

It looks like, the URL generation isn't working properly. But now the big question, is it within Xaraya or Gallery2?

Gallery-Version = 2.0-beta-3+ Kern 0.9.25
PHP-Version = 4.3.10 apache
Webserver = Apache/1.3.31 (Unix) FrontPage/5.0.2.2635 PHP/4.3.10
Datenbank = mysqlt 4.0.24_Debian-4woody1-log
Werkzeuge = Exif, Thumbnail
Betriebssystem = Linux server01 2.6.10-xeon.64gb #1 SMP Fri May 27 17:29:05 CEST 2005 i686
Browser = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; iOpus-I-M; .NET CLR 1.1.4322)

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Thu, 2005-06-23 05:49

could you disable the xaraya short urls for G2 and check if it's working. it should.
i guess i'll have to look into xaraya short url support for the module again, it worked once, but doesn't anymore for some time.

 
Danny

Joined: 2003-03-24
Posts: 90
Posted: Thu, 2005-06-23 08:53

Thanks for your help. I have only one problem. Where can I find the option to disable xaraya short urls for G2? I didn't found a option in the Xaraya-Gallery2 Module.

Thanks, Danny

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Thu, 2005-06-23 13:43

actually, there isn't an option for that.
in version 0.6.6 (tomorrows nightly snapshot), i removed the xaraya short url support.

recommendation: activate the G2 url rewrite module, then you get G2 short urls in xaraya.

 
Danny

Joined: 2003-03-24
Posts: 90
Posted: Thu, 2005-06-23 15:09

I have activated G2 URL rewrite module. But I have no success. The problems with the false URL generation are still there.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Thu, 2005-06-23 16:53

do you have version 0.6.6 already??

 
Danny

Joined: 2003-03-24
Posts: 90
Posted: Thu, 2005-06-23 17:13

I have just looked on the download page galleryupdates.jpmullan.com. There is still the version 0.6.5.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Thu, 2005-06-23 19:10

that's what i mean. how can you tell me that it still doesn't work even if i told you that the fix is in 0.6.6? ;)
so please get the next nightly snapshot, in about 15 hours from the website. thanks.

btw: i tested the G2 rewrite short urls, and they work in embedded G2.

 
Danny

Joined: 2003-03-24
Posts: 90
Posted: Sun, 2005-06-26 11:41

Sorry, I have still no success. Also with Xaraya_Gallery2 module version 0.6.7 I can't see pictures in the imageblock.

The URL to the pictures is within Modules Module:

http://mysite/index.php?module=modules&type=adminindex.php/gallery2&g2_view=core.ShowItem&g2_itemId=4742

When I read an article, the URL in the imageblock to the pictures is:

http://mysite/index.php/news/1392index.php/gallery2?g2_view=core.ShowItem&g2_itemId=4745

Of course I have flushed the cache within Xaraya and IE. So there shouldn't be any leftovers from the Xaraya_Gallery2 module version 0.6.5.

Can you look after this issue? Are the imageblocks working, when you are within an article or any other module?

Danny

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sun, 2005-06-26 12:17

have you completely uninstalled (not just deactivated) the xaraya gallery2 module?

it works for me, i've reinstalled the xaraya gallery2 module, configured it. activated short urls in admin -> base -> modify config.
tested with g2 urlrewrite module on and off.

tested it with g2 0.9.26, but that shouldn't make a difference though. xaraya base module version 0.1.0.

 
Danny

Joined: 2003-03-24
Posts: 90
Posted: Sun, 2005-06-26 13:08

Sorry, it didn't work. I have done everything you said. For some reasons it didn't work.

It makes no matter, wheter short URL support is enabled or deactivated within Gallery2. The results are the same.

Now, also when I login fresh the Imageblock doesn't work. The URL to the picture within the Imageblock are:

http://mysite/index.phpindex.php/gallery2?g2_view=core.ShowItem&g2_itemId=3092

Where is the URL generation mechanism? In which file is it? Perhaps I should reload the particular file again to the server?

In Base module I have activated both short URL support and enable short URL for base modules.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sun, 2005-06-26 13:36

lets first check the state without short urls. simplify the problem, solve it, and then take a look at short urls.

can you take a look at the values in the database?
in xar_modules, see what xar_id the gallery2 module has
then go to xar_module_vars and take a look at all vars of with the xar_modid = the xar_id you looked up before.

these are my values, what are yours?

xar.minCoreVersion 1.0.0
g2.minCoreVersion 0.9.24
SupportShortURLs 0
configured 1
g2.basefile index.php/gallery2
g2.loginredirect /xaraya/index.php?module=roles&func=register
g2.includepath /var/www/localhost/htdocs/gallery2/
g2.relativeurl ../gallery2/

 
Danny

Joined: 2003-03-24
Posts: 90
Posted: Sun, 2005-06-26 13:55

Thanks for your help. My data are:

g2.minCoreVersion 0.9.24
xar.minCoreVersion 1.0.0
g2.sidebarInside 0
SupportShortURLs 0
configured 1
g2.basefile index.php/gallery2
g2.loginredirect /index.php?module=roles&func=register
g2.relativeurl gallery2/
g2.includepath /is/htdocs/gallery2/

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sun, 2005-06-26 14:08

ok, when you deactivate short urls in admin -> base -> modify config:
then g2.basefile should be index.php?module=gallery2. so please deactivate short urls now.
make sure that the g2 url rewrite module is deactivated too.

could you then tell me which urls work and which not?

- urls in embedded g2: example for showitem / downloaditem url
- urls in xaraya imageblock block instance when xaraya is displaying embedded g2
- urls in xaraya imageblock block instance when xaraya is displaying another xaraya module, e.g. base

when upgrading the xaraya gallery2 module, have you replaced xaruser/main.php and xargallery2helper.class with the new files?

could you check what xarServerGetBaseURI() returns in your xaraya/G2?
i use it in /modules/gallery2/xargallery2helper.class function init.
e.g. instead of calling GalleryEmbed::init in this function, just print xarServerGetBaseURI(); exit;

 
Danny

Joined: 2003-03-24
Posts: 90
Posted: Sun, 2005-06-26 21:20

When upgrading, I usually delete all files and upload the new one. I deactivated short URL within Xaraya and in Gallery2.

Meanwhile I deleted all Gallery2 files and uploaded the latest nightly build of Gallery2.

But the problem persists. When I login fresh the Imageblock works. The URL for the picture looks fine:

http://mysite/index.php?module=gallery2&g2_view=core.ShowItem&g2_itemId=3218

But as soon, as I use another module, like Article, Modules or something else the Imageblock doesn't work.

Also it is not working, when I are within Gallery2 showing the Gallery2 albums. The albums are working perfectly. But the Imageblock doesn't work. This is the URL to the picture, when I view a Gallery:

http://mysite/index.php/gallery2?g2_view=core.ShowItem&g2_itemId=3080index.php?module=gallery2&g2_view=core.ShowItem&g2_itemId=4350

As said before, the problem is in the URL generation. Example, when I read an article, then the URL for the picture in the Imageblock is:

http://mysite/index.php?ptid=1&aid=1391&module=articles&func=displayindex.php?module=gallery2&g2_view=core.ShowItem&g2_itemId=4292

Where is the URL generated in the Imageblock? And why are there 2 module calls in the URL?

I'm sorry I didn't understand your last sentence. Where can I check xarServerGetBaseURI?

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sun, 2005-06-26 21:46

this will break your gallery2 module, but we have to debug this:
on line 158 of modules/gallery2/xargallery2helper.class add:

$msg = xarML('embedPath by xarServerGetBaseURI [#(1)]', xarServerGetBaseURI());
xarErrorSet(XAR_SYSTEM_EXCEPTION, 'FUNCTION_FAILED', new SystemException($msg));
return false;

and then browse to your G2.
please post the output you get, i'm interested in the stuff after "embedPath by xarServerGetBaseURI".

could you also post a link to a phpinfo.php on your webhost?

 
Danny

Joined: 2003-03-24
Posts: 90
Posted: Mon, 2005-06-27 20:16

Thank you for your code. Here we go:

(
[0] => 2
[1] => FUNCTION_FAILED
[2] => systemexception Object
(
[msg] => embedPath by xarServerGetBaseURI []
[id] => 0
[major] => 0
[defaults] =>
[title] =>
[short] =>
[long] =>
[hint] =>
[stack] => Array
(
)

[product] => App - Core
[component] => BlockLayout
[module] =>
)

)

at xarblock_render(xarBlocks.php:102)
at xarblock_rendergroup(xarBlocks.php:259)
at include(de395e8968ab8c4cbe1f052eb26f5add.php:9)

Array
(
[0] => /mysite/var/cache/templates/de395e8968ab8c4cbe1f052eb26f5add.php
)

at xartpl__executefromfile(xarTemplate.php:1126)

Array
(
[0] =>
[1] => 1
)

at xartpl_includethemetemplate(xarTemplate.php:973)
at include(c1818f044ab9e9b759b0de52ead1e1c9.php:18)

Array
(
[0] => /mysite/var/cache/templates/c1818f044ab9e9b759b0de52ead1e1c9.php
)

at xartpl__executefromfile(xarTemplate.php:1126)

Array
(
[0] => Array
(
[bid] => 33
[type] => image
[module] => gallery2
[name] => zufallsbild
[title] => Foto
[content] => a:6:{s:6:"ibtype";i:0;s:11:"ibshowtitle";b:1;s:10:"ibshowdate";b:1;s:11:"ibshowviews";b:1;s:11:"ibshowowner";b:0;s:9:"ibheading";b:0;}
[last_update] =>
[state] => 2
[position] => 9
[bgid] => 1
[group_name] => left
[_bl_box_template] => left
[_bl_block_template] => zufallsbild
[_bl_template_base] => image
)

)

at xartpl_renderpage(xarTemplate.php:927)

Array
(
[0] => Array
(
[bid] => 33
[type] => image
[module] => gallery2
[name] => zufallsbild
[title] => Foto
[content] => a:6:{s:6:"ibtype";i:0;s:11:"ibshowtitle";b:1;s:10:"ibshowdate";b:1;s:11:"ibshowviews";b:1;s:11:"ibshowowner";b:0;s:9:"ibheading";b:0;}
[last_update] =>
[state] => 2
[position] => 9
[bgid] => 1
[group_name] => left
[_bl_box_template] => left
[_bl_block_template] => zufallsbild
[_bl_template_base] => image
)

)

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Mon, 2005-06-27 21:28
Quote:
mbedPath by xarServerGetBaseURI []

!!!! xarServerGetBaseUri() returns an empty string in your case, wtf?!
in xaraya/var/config.system.php, do you have the BaseURI set?

however, i've applied a fix. in version 0.6.8.

get it in a few hours, get tomorrows nightly snapshot of the integration, upgrade the module and it should work.

 
Danny

Joined: 2003-03-24
Posts: 90
Posted: Wed, 2005-06-29 17:12

Hello,

thank you for your help. With the newest code it works. I have BaseURI not set, because it is not necessary. Xaraya fill it out automaticly.

Danny