Gossamer Forum
Home : Products : Links 2.0 : Installation -- Unix :

Help with Error: Date Field is Blank

Quote Reply
Help with Error: Date Field is Blank
Everytime that I try to add a listing to my links program, it gives me an error saying:

Date (Can not be left blank)

It is not filling in the date in the results either. Is there a way I can get the date working again? Thanks.
-Greg
Quote Reply
Re: Help with Error: Date Field is Blank In reply to
Are you getting this error on the admin screen or the user Add a Link screen?

In either case, make sure that this line is in the %db_def array of links.def:

Code:
Date => [3, 'date', 15, 15, 1, \&get_date, ''],


[This message has been edited by Bobsie (edited July 05, 1999).]
Quote Reply
Re: Help with Error: Date Field is Blank In reply to
Bobsie,
In the admin section the date is always filled in correctly. The problem is that when the user tries to add a link the error always appears
Date (Can not be left blank)
The problem is that I also have the line:

Date => [3, 'date', 15, 15, 1, \&get_date, ''],

in the %db_def array part of my links.def section.
Is there possibly something that I could have done to make the date be left blank? Thank you for your time.
Greg
Quote Reply
Re: Help with Error: Date Field is Blank In reply to
Check add.cgi, sub process_form and make sure this code is in there:

Code:
# This will set system fields like Validated to their proper values.
foreach $key (keys %add_system_fields) {
$in{$key} = $add_system_fields{$key};
}

# Set date variable to today's date.
$in{$db_cols[$db_modified]} = &get_date;

I hope this helps.
Quote Reply
Re: Help with Error: Date Field is Blank In reply to
Bobsie,
I just can't figure out what is wrong. I did check the add.cgi, sub process_form and the script error still seems to be there. Is there possibly another line of code i could have erased by accident? Thanks for your help.
-Greg
Quote Reply
Re: Help with Error: Date Field is Blank In reply to
Have you applied any mod that might affect add.cgi?
Quote Reply
Re: Help with Error: Date Field is Blank In reply to
Bobsie,
Thanks for your help. I ended up finding the problem. Thanks for helping this forum.
-Greg
Quote Reply
Re: Help with Error: Date Field is Blank In reply to
For future reference, can you say what the error was in case someone else might be able to benefit from what you found?
Quote Reply
Re: Help with Error: Date Field is Blank In reply to
Well, I did not directly find the problem. What I did was download an new links.def and added the same fields to it. I must have deleted a line or two in the previous script because when I uploaded the new one the date appeared again. Thanks again.
-Greg