[ic] search-region using label causes more-list error

Kevin Walsh kevin at cursor.biz
Fri Jul 13 15:25:42 EDT 2007


Ton Verhagen <tverhagen at alamerce.nl> wrote:
> Quoting Ton:
> >Hi All,
> >
> >I am using the following code on a page.
> >
> >Basically what I am trying to accomplish is displaying the search
> >results found in a Perl block using the [search-region] mechanism
> >including the more-list feature.
> >
> Tried another angle: used object option of search-region tag.
> Result: Still no working more-list (shows only the first 3 results).
> 
> In this example a file is created in the tmp directory
> tmp/s/session_id.cache_key
> 
> I am wondering why the more-list does not work in the example
> below. Has anyone any idea of how we can get this puppy to work?
> 
I've only had a couple of minutes' worth of look into this, so
I'll leave the testing up to you. :-)

It seems to work using your supplied page code as a test, but I
can't guarantee that it won't make a complete pig's breakfast
of every other search.  Please try it out and report your findings
back to the list.

======================================================================
--- Interpolate.pm      6 Jul 2007 10:08:58 -0000       2.282
+++ Interpolate.pm      13 Jul 2007 19:25:22 -0000
@@ -4601,7 +4601,7 @@
 
        my $obj;
 
-       if($opt->{object}) {
+       if ($opt->{object} && !($opt->{more} and $Vend::More_in_progress)) {
                ### The caller supplies the object, no search to be done
                $obj = $opt->{object};
        }
======================================================================

Also, add "more=1" to your [search-region] tag, to comply with the test
in the above patch, like this:

    [search-region object=`$Scratch->{my_search_results}` more=1 ml=3]

Good luck.

-- 
   _/   _/  _/_/_/_/  _/    _/  _/_/_/  _/    _/
  _/_/_/   _/_/      _/    _/    _/    _/_/  _/   K e v i n   W a l s h
 _/ _/    _/          _/ _/     _/    _/  _/_/    kevin at cursor.biz
_/   _/  _/_/_/_/      _/    _/_/_/  _/    _/


More information about the interchange-users mailing list