Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

Weird Search URL problems...

Quote Reply
Weird Search URL problems...
Got a bit of a weird one here. For some reason, the 'next' links are not showing up correctly;

<< EDITED AFTER I FOUND A FIX >>

...note how they go to places like;

http://domain.com/search.cgi?isValidated=Yes;query=seattle;d=1&nh=2

... which obviously doesn't exist :( (missing cgi-bin)

The template codes are;

Code:
<%if next%>
<!-- Next/Previous links if spanning pages. -->
<tr><td colspan=2 align=right><%body_font%>
<small>Pages: <%next%></small>
</td></tr>
<%endif%>

Anyone got any ideas? Unsure

TIA

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!

Last edited by:

Andy: Feb 4, 2004, 4:17 AM
Post deleted by Payooo In reply to

Last edited by:

Payooo: Feb 4, 2004, 3:38 AM
Quote Reply
Re: [Andy] Weird Search URL problems... In reply to
BTW, this is the output from a <%GT::Template::dump%> on <%next%>;

1 <a href="search.cgi?isValidated=Yes;query=seattle;d=1&nh=2">2</a> <a href="search.cgi?isValidated=Yes;query=seattle;d=1&nh=3">3</a> <a href="search.cgi?isValidated=Yes;query=seattle;d=1&nh=4">4</a> <a href="search.cgi?isValidated=Yes;query=seattle;d=1&nh=5">5</a> <a href="search.cgi?isValidated=Yes;query=seattle;d=1&nh=6">6</a> <a href="search.cgi?isValidated=Yes;query=seattle;d=1&nh=7">7</a> <a href="search.cgi?isValidated=Yes;query=seattle;d=1&nh=8">8</a> <a href="search.cgi?isValidated=Yes;query=seattle;d=1&nh=9">9</a> <a href="search.cgi?isValidated=Yes;query=seattle;d=1&nh=10">10</a> <a href="search.cgi?isValidated=Yes;query=seattle;d=1&nh=11">11</a> <a href="search.cgi?isValidated=Yes;query=seattle;d=1&nh=12">12</a> <a href="search.cgi?isValidated=Yes;query=seattle;d=1&nh=13">13</a> <a href="search.cgi?isValidated=Yes;query=seattle;d=1&nh=14">14</a> <a href="search.cgi?isValidated=Yes;query=seattle;d=1&nh=15">15</a> ... <a href="search.cgi?isValidated=Yes;query=seattle;d=1&nh=2">[>>]</a>

Note that is only pointing to search.cgi?isValidated=Yes;query=seattle;d=1&nh=xx

Frown

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Weird Search URL problems... In reply to
I managed to fix it by editing /admin/Links/Users/Search.pm, and modifying line 181 from;

Code:
$url =~ s/([;&?]?)nh=(\d+)/($1 and $1 eq '?') ? '?' : ''/eg;

to

Code:
$url =~ s/([;&?]?)nh=(\d+)/($1 and $1 eq '?') ? '?' : ''/eg;
$url = $CFG->{db_cgi_url} . "/" . $url;

Dirty.. but it works :) I'm not quite sure why it wasn't working on its own, but hey.. at least I have a working copy now :)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Weird Search URL problems... In reply to
Hello Andy,

I had the same problem.

I had added a meta in search_results.html :

<base href="http://www.mysite.com">

That worked for me.

Mick

Last edited by:

mick31: Jan 13, 2005, 12:51 AM