[ic] More list error
Mike Heins
mike at perusion.com
Thu Jul 8 11:35:51 EDT 2004
Quoting Stefan Hornburg (Racke) (racke at linuxia.de):
> On Wed, 7 Jul 2004 15:09:10 -0400
> Mike Heins <mike at perusion.com> wrote:
>
> > Quoting Mike Heins (mike at perusion.com):
> > > Quoting Dan Bergan (danb at champonline.com):
> > > > Mike Heins wrote:
> > > >
> > > > >Quoting Dan Bergan (danb at champonline.com):
> > > > >
> > > > >
> > > > >>If I go back to the previous page, then refresh the page, then click on
> > > > >>the more links everything will work fine. So, it seems like the session
> > > > >>is expiring and the more link is no longer valid.
> > > > >>
> > > > >>
> > > > >
> > > > >You have hit it on the head.
> > > > >
> > > > >
> > > > Phew! I'm not crazy... I was worried there for a while. Thanks, Mike!
> > > >
> > > > I don't feel that I need to give the customer the actual "more" page,
> > > > but I would like something better than an internal server error. Is
> > > > there any way to detect an expired session and then direct them to a
> > > > "session expired" page where they can start browsing again?
> > >
> > > If it is a server error, then we should probably fix this behavior.
> > >
> > > >
> > > > I guess I could just change my apache internal server error page to say
> > > > that the session has expired and have a link to start browsing the
> > > > catalog again. But, would there be a way to keep this within Interchange?
> > > >
> > >
> > > I think what needs be done is to handle this such that it only
> > > returns a search error and not a server error.
> >
> > This does not cause a server error on the "standard" catalog
> > that comes with 5.3. I guess I don't know how to duplicate it,
> > so I can't fix it.
>
> It would be still a nice addition to pass the information that
> the session has been expired to the catalog/page level, may be
> as a special event. Any ideas about how to implement that ?
>
I am not sure we can detect the difference between that without
a file test.
We could, I suppose, change Vend::Search::more_matches to do:
my $obj;
eval {
$obj = Vend::Util::eval_file($file);
};
- $@ and return $s->search_error("Object saved wrong in $file for search ID $id.");
+ if($@) {
+ if(! -f $file) {
+ my $msg = "Session has expired, search paging failed.";
+ Vend::Tags->error({ name => 'search_expire', set => $msg});
+ return $s->search_error($msg);
+ }
+ else {
+ my $msg = errmsg(
+ "Object saved wrong in %s for search ID %s",
+ $file,
+ $id,
+ );
+ logError($msg);
+ return $s->search_error($msg);
+ }
+ }
The presence of a search_expire error would tell that.
--
Mike Heins
Perusion -- Expert Interchange Consulting http://www.perusion.com/
phone +1.765.647.1295 tollfree 800-949-1889 <mike at perusion.com>
For a successful technology, reality must take precedence over public
relations, for Nature cannot be fooled. -- Dick Feynman
More information about the interchange-users
mailing list