Gossamer Forum
Quote Reply
Modify/add
I've experienced several problems with the those two. When trying to modify a link the system give the following error message back:

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

I don't have any of those fields in my database so they can't be not blank. I tried to remove in the links.pm file and that didn't help. Does anybody know something about this problem.

Further more if you add a link the system
says the following:

nobody... Recipient names must be specified.

I've added a recipient.

Can somebody help me?
Quote Reply
Re: Modify/add In reply to
Code:
- Rating (Can not be left blank)
- Votes (Can not be left blank)
- ReceiveMail (Can not be left blank)

If those are not in your database, make sure you reconstruct (resync) your .def files. It's in the Admin area, under the tables.

Code:
nobody... Recipient names must be specified.

I've added a recipient.

It's trying to send mail with the confirmation message. It's looking for the Email field.

If you've really modified your database, you might need to make a few changes to the source code to get rid of that function.



Quote Reply
Re: Modify/add In reply to
Hi Pugdog
thanks for you quick reply.

Concerning the modify I've allready tried
to resync the links it doesn't help.

And concerning the add function the database
has a field called "Contact_Email" and I
think that's the standard email field. And that what the add.cgi says:

The following link is awaiting validation:

Title: ${$rec}{'Title'}
URL: ${$rec}{'URL'}
Category: $cname
Description: ${$rec}{'Description'}
Contact Name: ${$rec}{'Contact Name'}
Contact Email: ${$rec}{'Contact Email'}

That must be right how can I change it then.

Martin


Quote Reply
Re: Modify/add In reply to
Hey guys,

I hope to hear from you. Maybe
this is an error in script because
I can't get this to work. There's
no rational explanation for the
error.

Please help me.
Quote Reply
Re: Modify/add In reply to
I had to get some sleep.... I took the last 24 hours to try to catch up on much needed rest. I was begining to really, really need it.

The error you are getting is because the fields in your .def file are defined as "required" and the record you are inserting is missing values in those fields.

You need to enter a value for those fields, or make those fields non-required. You need to explcitly enter a '0' or a 'No' otherwise.

Quote Reply
Re: Modify/add In reply to
Hi again,

few things I don't really understand.

Pugdog said:
"It's trying to send mail with the confirmation message. It's looking for the Email field."

But I have the email field my links.def looks like this:

Code:
ID => ['1', 'INT', '10', '20', '1', '0', '^\d*\.?\d*$'],
Title => ['2', 'CHAR', '40', '100', '1', '', '', '5'],
URL => ['3', 'CHAR', '40', '150', '1', '', ''],
CategoryID => ['4', 'INT', '10', '20', '1', '0', '^\d*\.?\d*$', '1'],
Description => ['5', 'CHAR', '40x3', '5000', '0', '', '', '3'],
Details => ['6', 'CHAR', '40x3', '5000', '0', '', '', '3'],
Contact_Name => ['7', 'CHAR', '40', '100', '0', '', ''],
Contact_Email => ['8', 'CHAR', '40', '50', '0', '', ''],
Add_Date => ['9', 'DATE', '20', '20', '1', 'NOW', '^\d{4}\-\d{2}\-\d{2}$'],
Mod_Date => ['10', 'DATE', '20', '20', '1', 'NOW', '^\d{4}\-\d{2}\-\d{2}$'],
Hits => ['11', 'INT', '10', '20', '1', '0', '^\d*\.?\d*$'],
isNew => ['12', 'CHAR', '3', '3', '1', 'No', ''],
isChanged => ['13', 'CHAR', '3', '3', '1', 'No', ''],
isPopular => ['14', 'CHAR', '3', '3', '1', 'No', ''],
Status => ['15', 'INT', '10', '20', '1', '0', '^\d*\.?\d*$'],
Date_Checked => ['16', 'DATE', '20', '20', '0', 'NOW', '^\d{4}\-\d{2}\-\d{2}$'],
isPremium => ['17', 'CHAR', '3', '3', '1', 'No', 'Yes|No', '0']

As one can see I have an email field and the standard one. Further more the fields

- rating
- votes
- receivemail

doesn't exist in the .def file so I don't
understand how they can e needed.

Is there a way to work around the problem
with the email (it's in the add.cgi) and
the fields which doesn't exist (it's in the modify.cgi) and how.

Quote Reply
Re: Modify/add In reply to
Have you checked the "Validate" table?

Quote Reply
Re: Modify/add In reply to
Thank you Pugdog I apologize for being that stupid.
Quote Reply
Re: Modify/add In reply to
Hi again,

though my problem with the modify.cgi
has been solved have I still problems with
both the modifying and adding.

With doing either of those the program returns a "nobody... Recipient names must be specified".

My links.pm look like this
Code:
# This should be the email address where all admin notices are sent, and
# it's also the Reply-To on any outgoing mail.
$LINKS{db_admin_email} = 'editor\@spade.com';

# If you are on UNIX set db_mail_path to the location of sendmail. If you
# are on NT, set db_smtp_server to the hostname for your SMTP server.
# NOTE: Only one should be set.
$LINKS{db_smtp_server} = '';
$LINKS{db_mail_path} = '/usr/lib/sendmail -bm';

# Set email_add to 1 to mail notices when a link has been validated, set
# email_mod to 1 to mail notices when a link has been modified.
$LINKS{email_add} = 0;
$LINKS{email_mod} = 0;

I've changes it from

Code:
# This should be the email address where all admin notices are sent, and
# it's also the Reply-To on any outgoing mail.
$LINKS{db_admin_email} = 'editor@spade.com';

# If you are on UNIX set db_mail_path to the location of sendmail. If you
# are on NT, set db_smtp_server to the hostname for your SMTP server.
# NOTE: Only one should be set.
$LINKS{db_smtp_server} = '';
$LINKS{db_mail_path} = '/usr/lib/sendmail -bm';

# Set email_add to 1 to mail notices when a link has been validated, set
# email_mod to 1 to mail notices when a link has been modified.
$LINKS{email_add} = 1;
$LINKS{email_mod} = 1;

But they doesn't work. Where's the recipient email adress defined.
Quote Reply
Re: Modify/add In reply to
Code:
# email_mod to 1 to mail notices when a link has been modified. $LINKS{email_add} = 1; $LINKS{email_mod} = 1;

Well.... since you've removed the Contact_Email from the database, there is no way for links to send an email to a non-existant field -- at least the program doesn't die Smile

If you change those '1' to '0' you might be able to bypass the error.

Links is trying to send mail to an email address that doesn't exist.

Otherwise, you'll have to look in the code of the editor.cgi (I think) to remove references to those fields from being acted upon.

You probably need to kill the routine that sends mail to the person in general, if you are not collecting email addresses. The easiest way would probably be to change it to a "return;" as the first (or only) line in the subroutine, so any calls you might miss to it just bounce right back.


Quote Reply
Re: Modify/add In reply to
Hi guys,

finally I solved the problem
it was a wrong line in
$LINKS{db_mail_path} = '/usr/lib/sendmail';

really stupid mistake I had a additonal -bm
in the end and Links SQL couldn't handle it.

But thanks for all the help.