[ic] Problem with 'aq' column op

Ron Phipps rphipps at reliant-solutions.com
Thu Jun 10 20:21:09 EDT 2004


> From: Mike Heins
> Sent: Thursday, June 10, 2004 2:29 PM
> 
> Quoting Ron Phipps (rphipps at reliant-solutions.com):
> > Hello,
> >
> > I'm on IC 5.0.0, Perl 5.6.1, MySQL.  I'm running a custom store.  I
have
> > the following search profile:
> >
> > __NAME__ keyword_search
> > mv_search_page=search_results
> > mv_searchtype=db
> > mv_coordinate=yes
> > mv_search_file=products
> >
mv_return_fields=sku,title,image,short_description,long_description,msrp
> >
_price,free_batteries,free_shipping,mfgr_id,import_type,option_type,hcpc
> > s_code
> > mv_sort_field=title
> > mv_search_field=:long_description:short_description:title:sku
> > mv_column_op=aq
> > mv_search_field=user_inactive
> > mv_searchspec=0
> > mv_column_op===
> > mv_search_field=import_inactive
> > mv_searchspec=0
> > mv_column_op===
> > mv_matchlimit=10
> > __END__
> >
> > I enter the word 'canes' into the search box and hit enter.  14
products
> > are returned as expected.  After the result is returned if I hit
refresh
> > on my browser some times it works and other times I receive the
> > following in the error log and no results are returned:
> >
> > store /search.html search error: Limit subroutine creation: Bad
code:
> > syntax error at (eval 519) line 8, near "] aqcanes "
> >
> 
> This is probably a bug in save_more (can't save the query subroutine
in
> Storable) that was fixed sometime before IC5.2.
> 

I've had a chance to look into this some more and it's a good
possibility it's a Perl bug.  I'm only seeing this when running in RPC
mode, low and high mode does not produce the error.  The line of code
that I think shows the problem is the following in Search.pm, map_ops:

$c->[$i] = $s->{mv_numeric}[$i]
                                ? $numopmap{$o}
                                : $stropmap{$o};


For a valid search $stropmap{$o} returns:

stropmap=[
  sub { "DUMMY" },
  'aq'
]

For an invalid search it returns:

stropmap=[
  'aq'
]

It's missing the dummy sub for the calling of create_text_query.  This
is called in get_limit.

It appears that %stropmap is not initializing correctly when in RPC
mode.  I will test out some different RPC settings to see if this can be
fixed without upgrading perl.

Thanks,
-Ron



More information about the interchange-users mailing list