Gossamer Forum
Home : Products : Links 2.0 : Discussions :

Possible bug in add_error.html?

Quote Reply
Possible bug in add_error.html?
When a user leaves the category blank when adding a site, the add_error.html returns the blank category select box and in text next to it the whole list of possible categories. Does this happen for anyone else? Or have I messed up the add_error.html file?
Quote Reply
Re: Possible bug in add_error.html? In reply to
Which version of Links is this? If v2, are you using templates?

------------------
Bob Connors
bobsie@orphanage.com
www.orphanage.com/goodstuff/
Quote Reply
Re: Possible bug in add_error.html? In reply to
Sorry, should know by now to add version number info!

Using Links 2 and templates.

Here is what it shows in the line for displaying in add_error.html.
Quote:
<tr><td align="right" valign="top">Category:</td>
<td><%Category%> <input type=hidden name=Category value="<%Category%>">

It displays just fine if a category is selected.
Quote Reply
Re: Possible bug in add_error.html? In reply to
I've fixed this in the distribution. Edit add_error.html and remove:

<input type=hidden name="Category" value="<%Category%>">

completely. Then edit site_html_templates.pl and change in sub site_html_add_failure replace the $category or .. line with:

Code:
$in{'Category'} ?
($in{'Category'} = qq~<input type=hidden name="Category" value="$in{'Category'}">$in{'Category'}~) :
($in{'Category'} = &build_select_field ("Category"));

Thanks!

Alex