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

Bug Modifying URL

Quote Reply
Bug Modifying URL
When modifying a URL with the new 2.0 Links I get the following error:

Rating (Can not be left blank)
Votes (Can not be left blank)
ReceiveMail (Can not be left blank)

Any ideas where/how to fix this? TIA
Quote Reply
Re: Bug Modifying URL In reply to
In links.def, make sure this is there:

Quote:
%add_system_fields = (
isNew => 'No',
isPopular => 'No',
Hits => '0',
Rating => 0,
Votes => 0,
ReceiveMail => 'Yes'
);
Quote Reply
Re: Bug Modifying URL In reply to
Is it with the exception of:

isNew => 'No',

I have:

isNew => 'Yes',
Quote Reply
Re: Bug Modifying URL In reply to
Is your modification being done via the user screen (Modify Resource) or the Admin screen?

If those system fields are properly specified in links.def, you shouldn't get that message. Make sure that the following appears in modify.cgi in sub process_form:

Code:
# Since we have a valid link, let's make sure the system fields are set to their
# proper values. We will simply copy over the original field values. This is to stop
# people from trying to modify system fields like number of hits, etc.
foreach $key (keys %add_system_fields) {
$in{$key} = $original{$key};
}

That code fills in the system fields with the values specified in %add_system_fields whether or not they are specified in the modify form. In fact, none of those system fields should be included in the modify form.


[This message has been edited by Bobsie (edited March 10, 1999).]
Quote Reply
Re: Bug Modifying URL In reply to
I have the same problem when I try to modify a link in Links 2.0. I checked everything, that was posted in here, but nothing changed. I use the site_html.pl to change the look of Link 2.0.

Currently I only test this script at my PC at home. I woprking with NT 4.0.

Is there anything else what I have to change to terminate this mistake.
Quote Reply
Re: Bug Modifying URL In reply to
I am doing this through the user screen and my modify.cgi program has the following:

Quote:
# Since we have a valid link, let's make sure the system fields are set to their
# proper values. We will simply copy over the original field values. This is to stop
# people from trying to modify system fields like number of hits, etc.
foreach $key (keys %add_system_fields) {
$in{$key} = $original{$key};
}
Quote Reply
Re: Bug Modifying URL In reply to
I just re-ran the update.pl script and it is fine now. I think in the past I ran update.pl and never renamed the file All set now!