Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Bug Links SQL ???

Quote Reply
Bug Links SQL ???
Hello,

Andy, the problem does not come from your script (User_Edit_Profile.)

I have just discovered that the problem is present in Links SQL.

Situation 1.

I record a new user since the sector of administration.
The obligatory fields are: Username Password Email.

If I do not give information in the fields, Links SQL give an error message.
For example: Invalid format for username.

Situation 2.

a) I record a new user since the sector of administration.
I filled all fields and I validate the recording.

b) Then, I modify the recording of the user.
I remove the data for Password and email.
No error message is turned over and the recording is validated without email and Password.

Why no error message ?

c) I removed fields username, Password and email.
Links SQL gives the error:

A fatal error has occured:
GT::SQL::Table (4662): Wrong argument passed to this subroutine. Usage: No primary key passed to modify! at /home/server/cgi-bin/LinksSQL/admin/Links/Table/Users.pm line 107.
Please enable debugging in setup for more details.


I believe that it is a bug of Links SQL (?).

Your opinion ?

How to solve this problem ?

Thank you for your assistance.

Mick

Last edited by:

mick31: Nov 1, 2004, 12:30 PM
Quote Reply
Re: [mick31] Bug Links SQL ??? In reply to
Hello,

I do not understand why in situation 2 (modification of the entry), LinksSQL does not give an error message.

situation-3.gif
situation-4.gif

The value for Not Null is well 'Yes' for Username Password Email.

It does not take account of Not Null.

That can be a problem with my installation only?

An idea?

Mick

Last edited by:

mick31: Nov 1, 2004, 1:41 PM
Quote Reply
Re: [mick31] Bug Links SQL ??? In reply to
You can't update the username (that is one of the required fields). This is used to reference the update (i.e update this profile, for user xxx .. where Username = xxx).

Hope that explains well enough :)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Bug Links SQL ??? In reply to
Thank you Andy for your answer.

I understand for field username (it is the key).

But, why the fields Password and Email does not give an error if they are empty ?
It seems that the modification of the entry does not take account of Not Null.

An idea?

Mick
Quote Reply
Re: [mick31] Bug Links SQL ??? In reply to
Try adding this;

Code:
if ($IN->param('Email') !~ /.+\@.+\..+/ || length($IN->param('Email')) < 10) {
error_msg("You email address doesnt seem to be valid...)");
}

...just above;

Code:
$DB->table('Users')->update( $add, { Username => $user } ) || &error_msg($GT::SQL::error);

Hope that helps.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Bug Links SQL ??? In reply to
Hello Andy,

That seems very well to function.
It is a good solution.Smile

Gossamer should look at the problem ...

Thank you Andy

Last edited by:

mick31: Nov 2, 2004, 11:30 AM