[ic] mv_action_map search question

Mike Heins interchange-users@interchange.redhat.com
Thu Jan 31 12:18:38 2002


Quoting Brian Kosick (briank@nacs.net):
> Hello list,
> 
>          I'm trying to create an search map.  I had one working a while 
> ago, but now it is broken.  I couldn't figure it out, so created a new very 
> very simple one to test it out.  I'm using 4.8.3, perl 5.6.1, 
> RH7.1.  Here's the simple search
> 
> <form action="[area search]" METHOD=POST>
> <INPUT TYPE="hidden" NAME="mv_search_map" VALUE="
>          mv_searchspec=search1
>          ">
> <INPUT TYPE="hidden" NAME="mv_search_field" VALUE="ac_color">
> <INPUT Type="TEXT" NAME="search1" VALUE="">
> <INPUT TYPE="submit" VALUE="[L]Search[/L]">
> 
> </form>
> 
> ^^^This returns every item in the database.  And causes an error message of 
> "No search string specified" to be entered in the error log.

I cannot confirm this. Tested on 4.8.3 with your exact form and did not
observe this. It also works on 4.9.

When I add 

	::logGlobal("search_map: " . ::uneval($ref));

near the bottom of Vend::Scan::parse_map, I see:

10.10.10.6 Gnhs3Dwk:10.10.10.6 - [31/January/2002:12:07:27 -0500] testing /cgi-bin/testing/search.html parse_map: {
>   'mv_search_field' => 'ac_color',
>   'mv_cache_key' => '3693fb21732988d3bfb3a3688558b885',
>   'mv_searchspec' => [
>     'junky'
>   ],
>   'mv_session_id' => 'Gnhs3Dwk',
>   'search1' => 'junky'
> }
>

That is what it should be, and the search returns empty with the
bad field name. When I change the field name to a valid "description"
for the demo, then it works as expected -- "neverbe" as a search
term returns empty, and "Tool" returns two items.

Must be something else going on....

-- 
Red Hat, Inc., 3005 Nichols Rd., Hamilton, OH  45013
phone +1.513.523.7621      <mheins@redhat.com>

Few blame themselves until they have exhausted all other possibilities.
 -- anonymous