Gossamer Forum
Quote Reply
Modify Bug
The modify form/template input is not adhering to the "Not Null" field.

Tested this with Description and a custom Keyword field and both are passing through to links with such fields left blank.

A bit of a pain when it comes to validating changed links.

This isn't particular to my setup as the GT demo shows the same behavior.

Eraser:
Insight Eye
http://www.insighteye.com/
Quote Reply
Re: [Eraser] Modify Bug In reply to
Has this been identified as a bug yet.

I still have Modify fields like: URL/Title/Description and any custom fields passing through without error when they are not filled out. All are set to Not-Null: Yes.

I could whip up some form error JScript code for this, but that's not the point.

Thank you.


~ ERASER


Free JavaScripts @ Insight Eye

Last edited by:

Eraser: Nov 23, 2001, 7:48 AM
Quote Reply
Re: [Eraser] Modify Bug In reply to
Look in your .def file...that is what is used to check NULL or NOT Null, not directly with MySQL and its column attributes.

You should use 1 for NOT NULL rather than 0 in the DEF file.
========================================
Buh Bye!

Cheers,
Me

Last edited by:

Heckler: Nov 23, 2001, 10:08 AM
Quote Reply
Re: [Eraser] Modify Bug In reply to
What version are you using? 2.1.0 seems to work fine.

Last edited by:

PaulW: Nov 23, 2001, 10:20 AM
Quote Reply
Re: [PaulW] Modify Bug In reply to
I have all those set to Not Null: Yes - using 2.05. As per my old post, It didn't work with 2.04 either.

~ ERASER


Free JavaScripts @ Insight Eye
Quote Reply
Re: [Eraser] Modify Bug In reply to
Actually you are right.

I have Title set to NOT NULL: Yes but when I modify a link and leave the Title blank it doesn't give an error.

This is with 2.1.0.

Last edited by:

PaulW: Nov 23, 2001, 10:25 AM
Quote Reply
Re: [PaulW] Modify Bug In reply to
Take at look at the demo, this also displays this behaviour.

And I cant believe I'm the only one who spotted this problem - jeez, doesn't anyone test their website before launching them like I do.

~ ERASER


Free JavaScripts @ Insight Eye
Quote Reply
Re: [Eraser] Modify Bug In reply to
Mine is just a test installation which I rarely use except...errm to test Cool

Comes in handy for threads such as this.
Quote Reply
Re: [Eraser] Modify Bug In reply to
I test my sites on different test servers before uploading files to my public/production server.

I believe that GT follows that procedure as well. It could be that for purposes of the Demo, that GT/Alex decided to make it as easy as possible for users to test it, by making NULL columns rather than requiring a bunch of columns...

Again, I think the problem is with the definition files (.def) not within the table structure in MySQL.

This same "problem" has been around since Links SQL v.1.X...basically, you have to make sure that the .def files are properly defined.
========================================
Buh Bye!

Cheers,
Me
Quote Reply
Re: [Heckler] Modify Bug In reply to
I don't think that is the issue Eliot as I'm experiencing it with a brand new installation.

Also it is a _bad_ idea to manually edit the defs with Links SQL 2+ - that is what the admin script is there for. You only need to edit defs with older versions.
Quote Reply
Re: [Heckler] Modify Bug In reply to
Eliot, my comment about testing was only in jest - not directed towards GT. And Paul you are quite correct in that the whole idea of the new system is designed so we don't need to edit files directly like the old days. Although I may need to do this if a fix is not forthcoming as this issue is holding back the release of my new project.

~ ERASER


Free JavaScripts @ Insight Eye
Quote Reply
Re: [Eraser] Modify Bug In reply to
Have you re-sync'd just to be safe?

Even if the def file is wrong then I don't think that would matter as mysql would spew an error if the column was NOT NULL (I think)
Quote Reply
Re: [Eraser] Modify Bug In reply to
Hi,

Thanks for the bug notice. This happened due to a change in GT::SQL, and worked in 2.0.3 I believe. To fix, edit admin/Links/User/Modify.pm and just before line 204:

# Check that it's valid:
$db->_check_update ($new, { ID => $new->{ID} })

add:

Code:
# Make sure not nulls are not null (check update doesn't handle this anymore).
my %not_null_cols = $db->not_null;
foreach my $col (keys %not_null_cols) {
if ($not_null_cols{$col}) {
unless (defined $new->{$col} and ($new->{$col} ne '')) {
return { error => Links::language('ADD_NOTNULL', $col), Category => $category, LinkID => $lid };
}
}
}

Let me know if that fixes it for you (it's fixed locally here).

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] Modify Bug In reply to
Hi Alex,

You might like to know the update has no effect either on my system or on your demo I have tested(if you fixed it there). Also to note the reject email is not being sent - again only when a modify request is made. For me personally, it's not an urgent matter as incomplete submissions are not accepted anyway.

Thanks.

~ ERASER


Free JavaScripts @ Insight Eye

Last edited by:

Eraser: Nov 26, 2001, 1:36 PM