I did a search on the website, but did not find this issue mentioned.
I am new to swish-e, but a co-worker has used it quite a bit.
We are both stumped on this issue.
Versions:
Linux fishburn-RH9 2.4.20-20.9 #1 Mon Aug 18 11:45:58 EDT 2003 i686 i686
i386 GNU/Linux
SWISH-E 2.4.0
This is perl, v5.8.0 built for i386-linux-thread-multi
(with 1 registered patch, see perl -V for more detail)
I have a default install of 2.4.0 into /usr/bin, not /usr/local/bin.
I have created an index and swish-e works fine.
I am not trying to get the swish-cgi script working properly.
Here is the problem:
I created a .swishcgi.conf
****************
use lib '/usr/lib/swish-e/perl';
use lib qw( /usr/lib/swish-e/perl );
return {
title => 'Search AMI Channels',
swish_binary => '/usr/bin/swish-e',
swish_index =>
'/home/fishburn/dev/ami/scripts/searchtest/swishe/index.swish-e',
date_ranges => 0,
# debug_options => 'basic, command, headers, output, summary, dump',
debug_options => 'command',
template => {
package => 'SWISH::TemplateHTMLTemplate',
options => {
filename => 'swish.tmpl',
path => '/usr/share/swish-e',
die_on_bad_params => 0,
loop_context_vars => 1,
cache => 1,
},
},
select_by_meta => {
#method => 'radio_group', # pick: radio_group,
popup_menu, or checkbox_group
#method => 'checkbox_group',
method => 'popup_menu',
columns => 3,
metaname => 'site', # Can't be a metaname used
elsewhere!
values => [qw/misc mod vhosts other/],
labels => {
misc => 'General Apache docs',
mod => 'Apache Modules',
vhosts => 'Virutal hosts',
},
description => 'Override from .swishcgi.conf: ',
},
}
****************
When I run the swich.cgi script in my web browser (mozilla), I get
checkboxes instead of a drop down menu (<OPTION>).
In fact, this doesn't work either:
method => 'radio_group', # pick: radio_group,
popup_menu, or checkbox_group
I always end up with checkboxes.
So I tried changing the /usr/share/swish-e/swish.tmpl
I added the following section after the:
<TMPL_IF SORTS>
section.
<TMPL_IF SELECT_BY_META>
Added by SELECT_BY_META:
<select name="metaname">
<TMPL_LOOP SORTS>
<option value="<TMPL_VAR NAME>" ><TMPL_VAR
LABEL></option>
</TMPL_LOOP>
</select>
</TMPL_IF>
This is never displayed at all.
Yet I know this file is properly referenced since if I change:
<TMPL_IF SORTS>
Sort by:
<select name="sort">
To:
<TMPL_IF SORTS>
Sort by dave:
<select name="sort">
Sort by dave: is displayed on the web page.
Can anyone offer any advice on how I can debug this further?
Why wouldn't the:
<TMPL_IF SELECT_BY_META>
Added by SELECT_BY_META:
be displayed? I would have thought this one would work for sure.
TIA,
Dave
Received on Mon Dec 1 23:27:53 2003