[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[ic] Opening multiple browsers, more paging does not function correctly inside query
> >
> > 3. Go to browser A and click on the next page and the results for
> > browser B's second page will be shown.
> >
> > It's as though the more links point to the resultset for the last search
> > made instead of the search being viewed even though the url's are
> > different. Any ideas of what can cause this scenario? Is there any
> > debugging tips for a situation like this?
> >
> > Below is the relevant part of my code (with html snipped):
> > [snip]
> >
> This has nothing to do with your search code an everything to do with
> browsers, I think. You can see in your links above that both windows have
> the same session ID. To IC, this makes them appear as one window. The last
> thing that window B does sets values to be consulted for the next action of
> window A and visa-versa. If you want them to behave separately, they need
> separate session ID's. This should be a simple as a) turning off all cookie
> support in your browser, or b) opening your new window by launching a
> second instance of your browser application instead of selecting 'new
> window' from the file menu of the first instance.
>
While that is all true, and sound advice, this patch should cause a
different hash key to be generated for each distinct query and therefore
fix the problem:
---------------------------------------------------------------------------
*** Interpolate.pm 18 Mar 2002 20:18:59 -0000 2.9.2.15
--- Interpolate.pm 2 Jun 2002 16:02:14 -0000
***************
*** 5215,5220 ****
--- 5215,5221 ----
}
my ($query, $opt, $text) = @_;
$opt = {} if ! $opt;
+ $opt->{hash_munge} ||= $query;
$opt->{prefix} = 'sql' unless $opt->{prefix};
if($opt->{more} and $Vend::More_in_progress) {
undef $Vend::More_in_progress;
***************
*** 5453,5459 ****
if($opt->{ml} and ! defined $obj->{mv_matchlimit} ) {
$obj->{mv_matchlimit} = $opt->{ml};
$obj->{matches} = scalar @{$obj->{mv_results}};
! $obj->{mv_cache_key} = generate_key(substr($page,0,100));
$obj->{mv_first_match} = $opt->{fm} if $opt->{fm};
$obj->{mv_search_page} = $opt->{sp} if $opt->{sp};
--- 5454,5460 ----
if($opt->{ml} and ! defined $obj->{mv_matchlimit} ) {
$obj->{mv_matchlimit} = $opt->{ml};
$obj->{matches} = scalar @{$obj->{mv_results}};
! $obj->{mv_cache_key} = generate_key($opt->{hash_munge} . substr($page,0,100));
$obj->{mv_first_match} = $opt->{fm} if $opt->{fm};
$obj->{mv_search_page} = $opt->{sp} if $opt->{sp};
---------------------------------------------------------------------------
If anyone can see a problem with that patch then please let me know.
--
_/ _/ _/_/_/_/ _/ _/ _/_/_/ _/ _/
_/_/_/ _/_/ _/ _/ _/ _/_/ _/ K e v i n W a l s h
_/ _/ _/ _/ _/ _/ _/ _/_/ kevin@cursor.biz
_/ _/ _/_/_/_/ _/ _/_/_/ _/ _/