[ic] I would need some ideas in how to accomplish this multilingual project -> Racke

Kevin Walsh interchange-users@interchange.redhat.com
Wed May 15 20:58:01 2002


> > > > ActionMap Catalog <<EOR
> > > > sub {
> > > > 	my ($action, $class, $what, $spec) = split ('/', shift);
> > > >
> > > > 	$CGI->{mv_like_field} = 'category';
> > > >
> > > > 	$class = 'CDROM' if $class eq 'DVD';
> > > >
> > > > 	if ($class eq 'CDROM' || $class eq 'Video') {
> > > > 		if ($what eq 'Producer') {
> > > > 			$CGI->{mv_like_field} = 'producer';
> > > > 		} elsif ($what eq 'Star') {
> > > > 			$CGI->{mv_like_field} = 'category3';
> > > > 		}
> > > > 	} else {
> > > > 		# other categories have only one level of qualification
> > > > 		$spec = $what;
> > > > 		$CGI->{mv_like_field} = 'category';
> > > > 		$class = 'Novelty' if $class eq 'Novelties';
> > > > 	}
> > > >
> > > > 	$CGI->{mv_todo} = 'search';
> > > > 	$CGI->{mv_nextpage} = 'results_new';
> > > > 	$CGI->{mv_profile} = 'catalog';
> > > > 	$CGI->{mv_coordinate} = 1;
> > > > 	$CGI->{mv_search_field} = 'class';
> > > > 	$CGI->{mv_searchspec} = "$class";
> > > >
> > > > 	$CGI->{mv_like_spec} = "%$spec";
> > > > 	$CGI->{mv_column_op} = "eq";
> > > > 	$CGI->{banner_title} = $spec;
> > > >
> > > > 	$Tag->update('process');
> > > > 	return 1;
> > > > }
> > > > EOR
> > > >
> > > Could you please give me a small example how this ActionMap
> > > works (how to
> > > call it, what should I do to configure it etc).. This would
> > > save me a lot of hair ;)
> > >
> > Calling it is simple:
> >
> > <a href="[area href="/Catalog/DVD/Star/Rene Hertell"]">Rene Hertell</a>
> >
> I have been struggling with your ActionMap, and I haven't got it to work...
> So far I have got always this error:
> 
> "Limit subroutine creation: bad limit creation code in coordinated search,
> probably search group without search specification. at
> /usr/local/interchange/lib/Vend/Search.pm line 768. "
> 
> I did not find In the archives anything about this error, and for the moment
> I have no idea where to find a solution.. :(
> 
> I tried to modify the code to search in different tables with the
> mv_search_file, but that did  not help.. :(
> 
It looks to me as if this line:

    $CGI->{mv_like_spec} = "%$spec";

should be changed to this:

    $CGI->{mv_like_spec} = "\%$spec";

Try that change and see if it makes a difference.

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