[Mailman-Users] Mailman and htdig - blank search page

Mark Sapiro mark at msapiro.net
Tue Aug 24 06:12:17 CEST 2010


On 8/23/2010 2:23 PM, Scott Race wrote:
> I think I am having a problem with the htdig seach templates.  On my
> old installation, I had a bunch of .html files in /etc/htdig -
> short.html, wrapper.html, etc....those files do not exist on my new
> installation.


IIRC, I had the same problem when I updated htdig from 3.1.6 to 3.2.0b6


> I copied them over from the old server to the new, rebooted, but same
> issue with a blank search page.  I checked the /etc/htdig/htdig.conf
> file and it says the common directory is /usr/share/htdig - that
> directory does not exist for me.
> 
> So I hacked my .conf file in /usr/local/mailman/htdig to point
> directly to the templates that I copied over:
> 
> 
> template_map: Long long /etc/htdig/long.html \ Short short
> /etc/htdig/short.html
> 
> template_name: short
> 
> 
> I do indeed get search results now.  The results are not pretty -
> images don't appear and a few other problems - but - I get
> something.
> 
> Any basic tips to fix my templates or maybe what might be wrong with
> my common_dir variable?


You need a common_dir. It doesn't matter what its name is. Mine is
/opt/www/share/htdig, but what ever it is it needs to contain things
similar to mine

[mark at sbh16 ~]$ ls -l /opt/www/share/htdig
total 6072
-rw-r--r-- 1 root root      76 Dec 26  2008 bad_words
-rw-r--r-- 1 root root  922950 Dec 26  2008 english.0
-rw-r--r-- 1 root root    5756 Dec 26  2008 english.aff
-rw-r--r-- 1 root root     190 Dec 26  2008 footer.html
-rw-r--r-- 1 root root     877 Dec 26  2008 header.html
-rw-r--r-- 1 root root     194 Dec 26  2008 long.html
-rw-r--r-- 1 root root    1390 Dec 26  2008 nomatch.html
-rw-r--r-- 1 root root 2228224 Dec 26  2008 root2word.db
-rw-r--r-- 1 root root      67 Dec 26  2008 short.html
-rw-r--r-- 1 root root   14480 Dec 26  2008 synonyms
-rw-r--r-- 1 root root   90112 Dec 26  2008 synonyms.db
-rw-r--r-- 1 root root    1261 Dec 26  2008 syntax.html
-rw-r--r-- 1 root root 2899968 Dec 26  2008 word2root.db
-rw-r--r-- 1 root root    1087 Dec 26  2008 wrapper.html
[mark at sbh16 ~]$

You also need the graphics in the directory accessed by HTDIG_FILES_URL.
In my case, this directory is /opt/www/htdocs/htdig/, HTDIG_FILES_URL is
the default '/htdig/' and I have

Alias /htdig/ "/opt/www/htdocs/htdig/"

in httpd.conf. The contents of this directory are

[mark at sbh16 ~]$ ls -l /opt/www/htdocs/htdig/
total 124
-rw-r--r-- 1 root root  781 Dec 26  2008 button10.gif
-rw-r--r-- 1 root root 1527 Dec 26  2008 button10.png
-rw-r--r-- 1 root root  755 Dec 26  2008 button1.gif
-rw-r--r-- 1 root root 1428 Dec 26  2008 button1.png
-rw-r--r-- 1 root root  785 Dec 26  2008 button2.gif
-rw-r--r-- 1 root root 1518 Dec 26  2008 button2.png
-rw-r--r-- 1 root root  745 Dec 26  2008 button3.gif
-rw-r--r-- 1 root root 1404 Dec 26  2008 button3.png
-rw-r--r-- 1 root root  786 Dec 26  2008 button4.gif
-rw-r--r-- 1 root root 1534 Dec 26  2008 button4.png
-rw-r--r-- 1 root root  780 Dec 26  2008 button5.gif
-rw-r--r-- 1 root root 1519 Dec 26  2008 button5.png
-rw-r--r-- 1 root root  791 Dec 26  2008 button6.gif
-rw-r--r-- 1 root root 1538 Dec 26  2008 button6.png
-rw-r--r-- 1 root root  796 Dec 26  2008 button7.gif
-rw-r--r-- 1 root root 1522 Dec 26  2008 button7.png
-rw-r--r-- 1 root root  784 Dec 26  2008 button8.gif
-rw-r--r-- 1 root root 1529 Dec 26  2008 button8.png
-rw-r--r-- 1 root root  784 Dec 26  2008 button9.gif
-rw-r--r-- 1 root root 1526 Dec 26  2008 button9.png
-rw-r--r-- 1 root root  587 Dec 26  2008 buttonl.gif
-rw-r--r-- 1 root root 1328 Dec 26  2008 buttonl.png
-rw-r--r-- 1 root root  576 Dec 26  2008 buttonr.gif
-rw-r--r-- 1 root root 1329 Dec 26  2008 buttonr.png
-rw-r--r-- 1 root root 1822 Dec 26  2008 htdig.gif
-rw-r--r-- 1 root root 2857 Dec 26  2008 htdig.png
-rw-r--r-- 1 root root 1315 Dec 26  2008 search.html
-rw-r--r-- 1 root root   53 Dec 26  2008 star_blank.gif
-rw-r--r-- 1 root root  151 Dec 26  2008 star_blank.png
-rw-r--r-- 1 root root   89 Dec 26  2008 star.gif
-rw-r--r-- 1 root root  195 Dec 26  2008 star.png
[mark at sbh16 ~]$

In addition, you need a template from which the individual
archives/private/LIST/htdig/LIST.conf files are made. The patches
install this in $prefix/templates/en/htdig.conf.txt. I do not change
this but rather make a sitewide edited template in
$prefix/templates/site/en/htdig.conf.txt. Attached is a patch to make my
version.

The differences between my version and the base are

- addition of common_dir - adjust to suit

- removal of redundant slash following %(htdig_url)s

- collapsing of the button1.gif through button10.gif names to button%%d.gif

Note that editing this template only affects subsequently created lists
or archives subsequently rebuilt with "bin/arch --wipe". For existing
lists, you either have to rebuild the archive or edit the
$var-prefix/archives/private/LIST/htdig/LIST.conf file.

-- 
Mark Sapiro <mark at msapiro.net>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: htdig_conf.txt.patch.txt
URL: <http://mail.python.org/pipermail/mailman-users/attachments/20100823/e8c2b4f7/attachment.txt>


More information about the Mailman-Users mailing list