G2embed: engine works, but no images are displayed !

Creating and modifying plugins.
bogus
Regular
Posts: 12
Joined: Thu Jun 29, 2006 9:17 pm

G2embed: engine works, but no images are displayed !

Post by bogus »

I tried to embed gallery2 into serenpidity using the g2embed-plugin.

I can browse, login, add images, etc., but I see no images in the embedded gallery, just their alternate texts !

Here's my setup:
- apache2 on suse-linux 9.3
- serenpidity 1.0
- gallery-2.1.1a, without mod_rewrite
(- not accessable from the web atm.)

Might be a mod_rewrite-issue, but i had no success with gallery2's rewrite-module.

Anyone experienced the same effects and has a solution for me ?


btw. WrapURL works, but I would prefer using g2embed, because of its disappearing sidebar when You click on an image !
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: G2embed: engine works, but no images are displayed !

Post by garvinhicking »

Hi!

Can you check the link that refers to the images? It seems the path is indeed getting mixed up.

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
bogus
Regular
Posts: 12
Joined: Thu Jun 29, 2006 9:17 pm

Post by bogus »

my links to the images look like this:

https://server/blog/index.php?/pix.html&g2_itemId=92

https://server/blog/index.php?/pix.html ... alNumber=2


Another thing I see now is that gallery2's CSS styles are not applied in the embedded version... but as I saw in one of Your other posts (http://www.s9y.org/forums/viewtopic.php?t=5744) that including g2's css into s9y's css-stylesheet might help ? Is that right ?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

No, not the link to images, but the content of the <img src=XXX> tag itself. What happens if you call that URL directly in your browser, and how does that URL look like?

It's hard to help in this case when the URL is not online, so you'll need to do that "grunt work" for me *g*

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
bogus
Regular
Posts: 12
Joined: Thu Jun 29, 2006 9:17 pm

Post by bogus »

an album-link:

Code: Select all

<a href="/blog/index.php?/pix.html&g2_itemId=126">
<img src="/blog/index.php?/pix.html&g2_view=core.DownloadItem&g2_itemId=128&g2_serialNumber=2" id="IFid2" class="ImageFrame_image giThumbnail" alt="album1" longdesc="" height="150" width="150">
</a>
an image-link:

Code: Select all

<a href="/blog/index.php?/pix.html&g2_itemId=92">
<img src="/blog/index.php?/pix.html&g2_view=core.DownloadItem&g2_itemId=93&g2_serialNumber=2" id="IFid2" class="ImageFrame_image giThumbnail" alt="bla" longdesc="blafasel" height="150" width="150">
</a>
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

What happens when you call the URL

http://yourserver/blog/index.php?/pix.h ... alNumber=2

?

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
bogus
Regular
Posts: 12
Joined: Thu Jun 29, 2006 9:17 pm

Post by bogus »

my browser gets a jpeg-image, but it's actually only this text-string:

Code: Select all

http://server/blog/index.php?/pix.html&g2_view=core.DownloadItem&g2_itemId=128&g2_serialNumber=2
Firefox renders the string as image, IE displays a broken image... :?
hamba
Regular
Posts: 8
Joined: Sun Jul 02, 2006 7:58 pm

Post by hamba »

Hi

I'm have the same problem

My gallery is in a subdomain
http://gallery.example.com

and I have serendipity also in its own subdomain for testing
http://test.example.com

the gallery is showing up within s9y but with no images only text and the image blocks for the thumbnails which is clickable to go into the sub album or actual image

I had a look at the html source code and this is what it looks like

Code: Select all

<a href="/gallery.html?g2_itemId=11032">
<img src="/index.php?/main.php&g2_view=core.DownloadItem& \ g2_itemId=16908&g2_serialNumber=12&g2_GALLERYSID=945b3d8fd9f2fd4e038fa89f6577a3e1" width="100" height="100" id="IFid3" class="ImageFrame_none giThumbnail" alt="Weird and Funny" longdesc=""/>
</a>
The \ is to break the line so it doen't tretch the forum
it is actually all one line :wink:


in my apache error log file I get alot of errors
here is that

Code: Select all

[Mon Jul 03 00:31:05 2006] [error] [client 212.99.206.8] File does not exist: /usr/local/www/test/favicon.ico, referer: http://test.example.com/index.php?/gallery.html&g2_itemId=23844
[Mon Jul 03 00:31:21 2006] [error] [client 212.99.206.8] script '/usr/local/www/test/main.php' not found or unable to stat, referer: http://test.example.com/gallery.html?g2_itemId=37
[Mon Jul 03 00:31:21 2006] [error] [client 212.99.206.8] File does not exist: /usr/local/www/test/modules, referer: http://test.example.com/gallery.html?g2_itemId=37
[Mon Jul 03 00:31:21 2006] [error] [client 212.99.206.8] File does not exist: /usr/local/www/test/modules, referer: http://test.example.com/gallery.html?g2_itemId=37
[Mon Jul 03 00:31:21 2006] [error] [client 212.99.206.8] File does not exist: /usr/local/www/test/themes, referer: http://test.example.com/gallery.html?g2_itemId=37
[Mon Jul 03 00:31:21 2006] [error] [client 212.99.206.8] File does not exist: /usr/local/www/test/themes, referer: http://test.example.com/gallery.html?g2_itemId=37
[Mon Jul 03 00:31:21 2006] [error] [client 212.99.206.8] File does not exist: /usr/local/www/test/themes, referer: http://test.example.com/gallery.html?g2_itemId=37
[Mon Jul 03 00:31:21 2006] [error] [client 212.99.206.8] script '/usr/local/www/test/main.php' not found or unable to stat, referer: http://test.example.com/gallery.html?g2_itemId=37
[Mon Jul 03 00:31:21 2006] [error] [client 212.99.206.8] script '/usr/local/www/test/main.php' not found or unable to stat, referer: http://test.example.com/gallery.html?g2_itemId=37
[Mon Jul 03 00:31:21 2006] [error] [client 212.99.206.8] File does not exist: /usr/local/www/test/themes, referer: http://test.example.com/gallery.html?g2_itemId=37
[Mon Jul 03 00:31:21 2006] [error] [client 212.99.206.8] script '/usr/local/www/test/main.php' not found or unable to stat, referer: http://test.example.com/gallery.html?g2_itemId=37
[Mon Jul 03 00:31:21 2006] [error] [client 212.99.206.8] script '/usr/local/www/test/main.php' not found or unable to stat, referer: http://test.example.com/gallery.html?g2_itemId=37
[Mon Jul 03 00:31:21 2006] [error] [client 212.99.206.8] script '/usr/local/www/test/main.php' not found or unable to stat, referer: http://test.example.com/gallery.html?g2_itemId=37
[Mon Jul 03 00:31:21 2006] [error] [client 212.99.206.8] script '/usr/local/www/test/main.php' not found or unable to stat, referer: http://test.example.com/gallery.html?g2_itemId=37
[Mon Jul 03 00:31:21 2006] [error] [client 212.99.206.8] script '/usr/local/www/test/main.php' not found or unable to stat, referer: http://test.example.com/gallery.html?g2_itemId=37
[Mon Jul 03 00:31:21 2006] [error] [client 212.99.206.8] script '/usr/local/www/test/main.php' not found or unable to stat, referer: http://test.example.com/gallery.html?g2_itemId=37
[Mon Jul 03 00:31:21 2006] [error] [client 212.99.206.8] script '/usr/local/www/test/main.php' not found or unable to stat, referer: http://test.example.com/gallery.html?g2_itemId=37
[Mon Jul 03 00:31:21 2006] [error] [client 212.99.206.8] script '/usr/local/www/test/main.php' not found or unable to stat, referer: http://test.example.com/gallery.html?g2_itemId=37
[Mon Jul 03 00:31:21 2006] [error] [client 212.99.206.8] File does not exist: /usr/local/www/test/images, referer: http://test.example.com/gallery.html?g2_itemId=37
[Mon Jul 03 00:31:21 2006] [error] [client 212.99.206.8] File does not exist: /usr/local/www/test/themes, referer: http://test.example.com/gallery.html?g2_itemId=37
[Mon Jul 03 00:31:21 2006] [error] [client 212.99.206.8] script '/usr/local/www/test/main.php' not found or unable to stat, referer: http://test.example.com/gallery.html?g2_itemId=37
[Mon Jul 03 00:31:21 2006] [error] [client 212.99.206.8] File does not exist: /usr/local/www/test/images, referer: http://test.example.com/gallery.html?g2_itemId=37
I hope this info will be helpfull to someone
Cheers
hamba

ps: PM me if you want the real domain name
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Bogus:

Please use a tool like "wget" to get the exact dump of that file. Inspect it with an editor; check if there are empty linebreaks or error messages inside the binary file.

It might be that you edited a language file or other PHP file that sends empty spaces before the actual output starts...

hamba: Yes, please mail me your domain name. What is that "main.php" script from? This seems to be where most errors come from! It's not a serendipity file...

Best regards,
GArvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
hamba
Regular
Posts: 8
Joined: Sun Jul 02, 2006 7:58 pm

Post by hamba »

The main.php file comes from the gallery

an example will be http://gallery.example.com/main.php

you get redirected from the index.php file to the main.php
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

I think this happens due to a bug of Gallery. We also had this in this thread: http://www.s9y.org/forums/viewtopic.php ... sc&start=0 (partially in german, sorry).

The problem is this: The embed plugin configures the "g2_embedURL" parameter, which defines the URL that is used to show the serendipity panel. Links to other pages should thus use this g2_embedURL plus the additional GET paremters that are used by gallery to access followup pages.

But to access images, the path must be set directory to s9y.

On your host, an image link looks like this:

http://localhost/index.php?/main.php&g2 ... lNumber=62

However, the right one would be:

http://localhost/gallery/main.php?g2_vi ... lNumber=62

So the problem is that the gallery script used a "index.php?/..." script to wrap around the <img> tags instead of straightly putting out the full path to it's main.php script.

I have had very bad experience with reporting issues like these to the gallery team, and didn't ever get any response. So I'd kindly like you to ask them to help you out in this issue. Maybe there is a parameter that needs to be passed to the Embed-Script of Gallery so that it spews out the right URL? Or it might be a bug which returns the wrong URL...

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
hamba
Regular
Posts: 8
Joined: Sun Jul 02, 2006 7:58 pm

Post by hamba »

I created a post over at g2
http://gallery.menalto.com/node/51223

I hope we can get this bug sorted
bogus
Regular
Posts: 12
Joined: Thu Jun 29, 2006 9:17 pm

Post by bogus »

@garvin:
There are no EMPTY linefeeds neither at the beginning, nor in the img-tags.

Sorry for the delay, I was on a business trip for a few days.
bogus
Regular
Posts: 12
Joined: Thu Jun 29, 2006 9:17 pm

SOLVED: G2embed: engine works, but no images are displayed !

Post by bogus »

Yeah, I found a solution for my problem !

I just replaced one string "g2Uri" with "g2uri" on line 122 of serendipity_event_g2embed.php !

line 122 before my change - this was not working for me:

Code: Select all

'g2Uri' => $this->get_config('g2Uri'),
here is my change:

Code: Select all

'g2Uri' => $this->get_config('g2uri'),
Now, my s9y+g2embed+gallery2-site works like a charm ... :lol: ... strike!

Here're my specs... just for the record:
- apache2-2.0.53/php4-4.3.10 on SuSE-Linux-9.3, installed via rpm
- gallery2-2.1.1a-full, without mod_rewrite
- serendipity-1.0, without mod_rewrite
- serendipity_event_g2embed.php / 1.2 / Tue Jun 20 07:31:23 2006
- database: postgresql-8.0.3

@garvin: thanks for your support anyway... respect!
@hamba: might be Your solution too, try it and let us know... :P

Regarding the missing CSS-styles I mentioned some posts before, there was no need to include gallery2's css-styles into s9y's css-stylesheet... gallery2's css-styles are correctly applied in my g2embedded version, f.e. g2's motives/themes.

Now I'm having a great day.... bye :wink: !
hamba
Regular
Posts: 8
Joined: Sun Jul 02, 2006 7:58 pm

Post by hamba »

Hi bogus

I changed that but it has no effect on my gallery

can you maybe post your whole serendipity_event_g2embed.php
maybe you changed some else to.

I'm still getting all those apache errors :?

for some weird reason its asking for /usr/local/www/test/main.php
where it should be /usr/local/www/gallery2/main.php
Post Reply