URLs with "g2_return" in them don't work...

Oldiesmann
Oldiesmann's picture

Joined: 2005-05-18
Posts: 150
Posted: Thu, 2005-09-29 23:34


Gallery version: 2.0 Core 1.0.0
PHP version: 5.0.4 Apache
PHPInfo Link: http://www.oldiesmann.us/test.php
Webserver: Apache 1.3.33
Database: MySQL 4.0.25 Standard
Activated toolkits: Gd, ImageMagick
Operating system: Linux
Browser: Firefox 1.0.7

I am noticing a pattern with the links in my G2 - if a link has a "g2_return" in it, then I have to remove it in the address bar or I won't get off the current page until I do.

Example:
When trying to edit some items, the G2 Site Admin link looks like this:
http://smf.oldiesmann.us/galleryproject/index.php?action=gallery&g2_view=core.SiteAdmin&g2_return=http%3A%2F%2Fsmf.oldiesmann.us%2Fgalleryproject%2Findex.php%3Faction%3Dgallery%26g2_view%3Dcore.ItemAdmin%26g2_subView%3Dcore.ItemEditCaptions%26g2_itemId%3D70&g2_returnName=edit+captions

If I click the link directly, the URL is updated but I never leave the current page. If I remove the big g2_return string at the end, then it works just fine. Is there a particular reason for this? I'm using the SMF integration (that I'm working on)... What exactly is this and how do I prevent it from showing up?

 
ssmayes2002
ssmayes2002's picture

Joined: 2005-09-29
Posts: 1
Posted: Thu, 2005-09-29 23:46

I am in the wedding industry. I can use advice on changing the format for photos and wedding albums. A Jpeg won't go in my album. How do I change the picture to anothr format to place it in my album?

 
shocksll
shocksll's picture

Joined: 2005-06-22
Posts: 352
Posted: Fri, 2005-09-30 00:12

Are you behind a firewall or anything that does URL Normalization (double encoded urls)? I've seen some issues before with M$'s ISA Server with that option turned on the web filter.

Steve Lineberry

 
shocksll
shocksll's picture

Joined: 2005-06-22
Posts: 352
Posted: Fri, 2005-09-30 00:13
ssmayes2002 wrote:
I am in the wedding industry. I can use advice on changing the format for photos and wedding albums. A Jpeg won't go in my album. How do I change the picture to anothr format to place it in my album?

What does this have to do with his problem? If you have an issue please start another thread.

 
Oldiesmann
Oldiesmann's picture

Joined: 2005-05-18
Posts: 150
Posted: Fri, 2005-09-30 14:41

I am behind a firewall, but I wouldn't think that would have anything to do with it. It's weird - anytime it's got "g2_return" in the URL, it won't work, but as soon as I remove that from the URL, it works fine. I am thinking maybe it has something to do with the integration...

The Oldiesmann
SMF Support Specialist

 
Oldiesmann
Oldiesmann's picture

Joined: 2005-05-18
Posts: 150
Posted: Mon, 2005-10-10 22:04

Any updates on this issue? I recently switched hosts and am now on php 4.4.0, but am still having the same problem. Any link that has "g2_return" in the URL won't work.

The Oldiesmann
SMF Support Specialist

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Tue, 2005-10-11 07:47

well, we have seen this issue only for certain integrations (mambo until now, smf too?) and only for certain users of this integrations.
it must have something to do with double urlencoding / decoding since when G2 is given the control, it already receives the wrong GET arguments, the error happened before.
you have to find out whether the GET arguments are already corrupted when your CMS / forum starts (in your index.php right at the beginning).

 
Oldiesmann
Oldiesmann's picture

Joined: 2005-05-18
Posts: 150
Posted: Tue, 2005-10-11 15:50

It seems that I'm not having this problem anymore. As soon as I added integrated session IDs to the setup, the problem stopped... Not sure why though.

The Oldiesmann
SMF Support Specialist

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Tue, 2005-10-11 16:02

as far as i can remember, we had the same issue in g2 standalone too. (return url issues)
it was solved by putting the return url always at the end of the complete URL string.
so if your change implies the same transformation, that could be the "reason".

 
Oldiesmann
Oldiesmann's picture

Joined: 2005-05-18
Posts: 150
Posted: Tue, 2005-10-11 20:07

No, that change doesn't actually do anything to the URL. It seems those URLs only work if there's not already a "g2_return" string in the URL. What do I need to do to fix this issue?

The Oldiesmann
SMF Support Specialist

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Tue, 2005-10-11 20:54

what issue?
two g2_return GET args in a single URL? don't think that exists.
and generally, g2_return is required. you can't just leave this away.

 
Oldiesmann
Oldiesmann's picture

Joined: 2005-05-18
Posts: 150
Posted: Tue, 2005-10-11 22:57

The issue is, if I click on a URL that has a "g2_return" string in it, it won't work if the URL of the current page already has a g2_return string in it. The URL gets updated, but the content stays the same. You said you thought the issue was fixed by moving the g2_return string to the end of the URL, so I was asking how I could do that.

The Oldiesmann
SMF Support Specialist

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Wed, 2005-10-12 11:18
Quote:
The issue is, if I click on a URL that has a "g2_return" string in it, it won't work if the URL of the current page already has a g2_return string in it.

could you describe an example?
e.g. by saying which links to click to get this situation etc.
or by pasting all involved urls...

 
Oldiesmann
Oldiesmann's picture

Joined: 2005-05-18
Posts: 150
Posted: Mon, 2005-10-17 19:11
 
neil1228

Joined: 2005-08-12
Posts: 18
Posted: Sat, 2006-07-08 20:43

I know this is an old topic, but I'm having the same problem. Did you find a solution or workaround? Thanks!

Gallery version = 2.1.1 core 1.1.0.1
PHP version = 5.1.2 cgi
Webserver = Apache/1.3.34 (Unix) mod_gzip/1.3.26.1a mod_fastcgi/2.4.2 mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 FrontPage/5.0.2.2635 mod_ssl/2.8.25 OpenSSL/0.9.7a PHP-CGI/0.1b
Database = mysql 4.1.14-standard, lock.system=flock
Toolkits = Gd, NetPBM, Exif, Thumbnail, Ffmpeg, Getid3, ImageMagick
Acceleration = none/3600, none/900
Operating system = Linux
Default theme = matrix
Locale = en_US
Browser = Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.4) Gecko/20060508 Firefox/1.5.0.4

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sat, 2006-07-08 21:14

g2_return URLs usually do a HTTP redirect.
this doesn't work in an embedded G2 if you start outputting HTML / data before you call GalleryEmbed::handleRequest().

 
Oldiesmann
Oldiesmann's picture

Joined: 2005-05-18
Posts: 150
Posted: Tue, 2007-01-30 20:03

Hate to bump an old topic again, but it's still not working in G2 2.2 RC1...

From the main embedded gallery, I click on "Edit Album" (correct page loads and "Back to Album" is added in the sidebar)
I then click on "Site Admin" (page reloads with correct URL; "Back to Edit Album" added to sidebar; everything else is the same as previously (page title, interface, etc.)).

No data or HTML is output prior to calling HandleRequest.
---------------------
The Oldiesmann
SMF Project Manager
SMF+G2 Integration Project - Beta3 Coming Soon