The category does not get filled in by add.cgi when people omit or add the www. in the URL.
HERE IS A FIX FOR MOST OF THE PROBLEM.
if ($db_single_category) {
my %is_valid = map { $_ => 1 } &category_list;
$ENV{'HTTP_REFERER'} =~ s,/[^/]+\.[^/]+$,,;
## ADDED
$ENV{'HTTP_REFERER'} =~ s,http://www\.,http://,;
$build_root_url =~ s,http://www\.,http://,;
## CHANGED
$ENV{'HTTP_REFERER'} =~ m,$build_root_url/(.+?)/?$,i;
$is_valid{$1} ? &site_html_add_form ($1) : &site_html_add_form ();
}
HOW TO SEE IT HAPPEN
Go to any category click on add link.
If the category is listed, then go back
and remove the www or add the www or somehow change the domain name or IP address to an equivalent. Then go back and add.cgi will not have the information.
HERE IS A FIX FOR MOST OF THE PROBLEM.
if ($db_single_category) {
my %is_valid = map { $_ => 1 } &category_list;
$ENV{'HTTP_REFERER'} =~ s,/[^/]+\.[^/]+$,,;
## ADDED
$ENV{'HTTP_REFERER'} =~ s,http://www\.,http://,;
$build_root_url =~ s,http://www\.,http://,;
## CHANGED
$ENV{'HTTP_REFERER'} =~ m,$build_root_url/(.+?)/?$,i;
$is_valid{$1} ? &site_html_add_form ($1) : &site_html_add_form ();
}
HOW TO SEE IT HAPPEN
Go to any category click on add link.
If the category is listed, then go back
and remove the www or add the www or somehow change the domain name or IP address to an equivalent. Then go back and add.cgi will not have the information.