Gossamer Forum
Home : Products : Gossamer Links : Discussions :

[Bug] : Link Property Column Delete

Quote Reply
[Bug] : Link Property Column Delete
When I try to delete the "Description" column under property, I am getting follwing error message



A fatal error has occured:
GT::SQL::Editor (1155): Unknown method 'pre_delete_column' called at GT::SQL::Editor::drop_col line 168.
Please enable debugging in setup for more details.




what could be causing it?

Vishal


Vishal
-------------------------------------------------------
Quote Reply
Re: [SWDevil.Com] [Bug] : Link Property Column Delete In reply to
Not sure, but if bug report is more helpful then here it is:



Stack Trace
======================================
Links (1247): Links::environment called at /home/GLinks-Path/admin/Links.pm line 700 with no arguments.
Links (1247): Links::fatal called at GT::Base::_generate_fatal line 743 with arguments
(GT::SQL::Editor (1247): Unknown method 'pre_delete_column' called at GT::SQL::Editor::drop_col line 168.
).
Links (1247): GT::Base::_generate_fatal called at /home/GLinks-Path/admin/GT/Base.pm line 149 with arguments
(GT::SQL::Editor=HASH(0x845af74), pre_delete_column, Description).
Links (1247): GT::Base::_AUTOLOAD called at GT::SQL::Editor::drop_col line 168 with arguments
(GT::SQL::Editor=HASH(0x845af74), Description, HASH(0x83d60d0)).
Links (1247): GT::SQL::Editor::drop_col called at GT::SQL::Admin::editor_delete_field line 1934 with arguments
(GT::SQL::Editor=HASH(0x845af74), Description).
Links (1247): GT::SQL::Admin::editor_delete_field called at /home/GLinks-Path/admin/GT/SQL/Admin.pm line 121 with arguments
(Links::Admin=HASH(0x83cdabc)).
Links (1247): GT::SQL::Admin::process called at admin.cgi line 78 with arguments
(Links::Admin=HASH(0x83cdabc), db, GT::SQL=HASH(0x823db98), cgi, GT::CGI=HASH(0x822e794)).
Links (1247): main::db_request called at admin.cgi line 56 with no arguments.
Links (1247): main::main called at admin.cgi line 24 with no arguments.



P.S. This is a fresh Install and does not have *any* links in it.

Vishal

Vishal
-------------------------------------------------------
Quote Reply
Re: [SWDevil.Com] [Bug] : Link Property Column Delete In reply to
You need the "Category deletion error" update that's available in the updates page in the admin.

PS: You shouldn't run into that bug unless you have a plugin installed that hooks into delete_category.

Adrian

Last edited by:

brewt: Apr 27, 2005, 12:59 AM
Quote Reply
Re: [brewt] [Bug] : Link Property Column Delete In reply to
But I just (few minutes before) downloaded the copy and installed it? wouldn't the latest download on GT website will be having a fixed copy?

P.S. I send you guys an email for license reset, as that is also giving me little bug :(

Vishal

Vishal
-------------------------------------------------------
Quote Reply
Re: [brewt] [Bug] : Link Property Column Delete In reply to
In Reply To:

PS: You shouldn't run into that bug unless you have a plugin installed that hooks into delete_category.


Nope.. don't have *any* plugins or anything else installed.. totally new install on a db that is used only for this.

Vishal

Vishal
-------------------------------------------------------

Last edited by:

SWDevil.Com: Apr 27, 2005, 1:01 AM
Quote Reply
Re: [SWDevil.Com] [Bug] : Link Property Column Delete In reply to
In Reply To:
But I just (few minutes before) downloaded the copy and installed it? wouldn't the latest download on GT website will be having a fixed copy?
No, we're trying to not do that, since it makes tracking which version is installed a pain. I also really hated telling people to go download the newest installer and 'upgrading' their install.

Adrian
Quote Reply
Re: [brewt] [Bug] : Link Property Column Delete In reply to
Might sound silly, but I am just little afraid of doing direct update/upload as if does not give me any control in maintaining the editied files/pages (if any) or my fears are not real?

Vishal

Vishal
-------------------------------------------------------
Quote Reply
Re: [SWDevil.Com] [Bug] : Link Property Column Delete In reply to
Well, the updates tell you which files are being updated (click on show details) and backups of your existing files are kept, and also most updates can be uninstalled, so I wouldn't worry too much about it.

Adrian
Quote Reply
Re: [brewt] [Bug] : Link Property Column Delete In reply to
Cool Thanks :) I will do the update right away :)

Vishal

Vishal
-------------------------------------------------------
Quote Reply
Re: [SWDevil.Com] [Bug] : Link Property Column Delete In reply to
Here is the note for the update


A bug in Gossamer Links could cause category deletion to fail when a plugin containing a category deletion hook is active.


But the interesting thing is, I am *not* having *any plugin* or anything else installed but GLinks 3.0.1 latest install, then why would I be having this error?

Vishal

Vishal
-------------------------------------------------------
Quote Reply
Re: [brewt] [Bug] : Link Property Column Delete In reply to
Frown
I did the update, but the bug still exists, I cannot delete the description column :(

Vishal

Vishal
-------------------------------------------------------
Quote Reply
Re: [SWDevil.Com] [Bug] : Link Property Column Delete In reply to
Oh, sorry, I misread your post. You're deleting a column, not a category. I'll have to look into that tomorrow.

Adrian
Quote Reply
Re: [brewt] [Bug] : Link Property Column Delete In reply to
Smile not a problem.. I will catch-up on this tomorrow :)

Thanks for the quick replies.

Vishal

Vishal
-------------------------------------------------------
Quote Reply
Re: [SWDevil.Com] [Bug] : Link Property Column Delete In reply to
It's a bug in GT::SQL. However, you really shouldn't be deleting system columns.

Adrian
Quote Reply
Re: [brewt] [Bug] : Link Property Column Delete In reply to
In Reply To:
It's a bug in GT::SQL. However, you really shouldn't be deleting system columns.


But I want to ... lol

Well I am expecting to have about 50 more columns for Link Properties, but want them in extact format that the website will need it and also something that will be best and less time consuming for editors..

Also, it never gave me problem with version 2.2.1...

Can this be fixed?

Vishal

Vishal
-------------------------------------------------------
Quote Reply
Re: [SWDevil.Com] [Bug] : Link Property Column Delete In reply to
Here's a patch to fix the problem:
Code:
--- library/GT/SQL/Editor.pm 2005/04/14 00:34:22 1.75
+++ library/GT/SQL/Editor.pm 2005/04/27 22:53:24 1.76
@@ -165,7 +165,7 @@ sub drop_col {

my $tmp_weight = {};
if (($self->{table}->cols->{$name} || {})->{weight}) {
- $tmp_weight = $self->pre_delete_column($name, $self->{table}->cols->{$name}) or return
+ $tmp_weight = $self->_get_indexer()->pre_delete_column($name, $self->{table}->cols->{$name}) or return
}

# Columns

However, I must warn you that deleting system columns could result in failures in upgrades in the future.

Adrian
Quote Reply
Re: [brewt] [Bug] : Link Property Column Delete In reply to
Another way to fix the problem without patching it, is to remove the weight on that column before deleting it.

Adrian
Quote Reply
Re: [brewt] [Bug] : Link Property Column Delete In reply to
In Reply To:
remove the weight on that column before deleting it.


Ha Ha... works like a charm :)


Vishal

Vishal
-------------------------------------------------------
Quote Reply
Re: [brewt] [Bug] : Link Property Column Delete In reply to
In Reply To:
Here's a patch to fix the problem:
Code:
--- library/GT/SQL/Editor.pm 2005/04/14 00:34:22 1.75
+++ library/GT/SQL/Editor.pm 2005/04/27 22:53:24 1.76
@@ -165,7 +165,7 @@ sub drop_col {

my $tmp_weight = {};
if (($self->{table}->cols->{$name} || {})->{weight}) {
- $tmp_weight = $self->pre_delete_column($name, $self->{table}->cols->{$name}) or return
+ $tmp_weight = $self->_get_indexer()->pre_delete_column($name, $self->{table}->cols->{$name}) or return
}

# Columns

However, I must warn you that deleting system columns could result in failures in upgrades in the future.


Hi

What is the best method of doing manual upgrades? What do you suggest? as I *have* to delete this column.

Vishal

Vishal
-------------------------------------------------------
Quote Reply
Re: [SWDevil.Com] [Bug] : Link Property Column Delete In reply to
If you delete a column, that means any time we make any modifications to that column or perform any operations that use that column in upgrades, it will fail. It'd be up to you to fix the upgrade scripts to work around the lack of those columns (I won't get into that). On the other hand, we've never touched the Description column.

I don't see why you have to delete the column. If you hide it and don't add it to the forms, then it won't show up anywhere.

Adrian
Quote Reply
Re: [brewt] [Bug] : Link Property Column Delete In reply to
I can hide it from the public view, however it still stays in the admin/editors view, and when you are having to scroll down for working on over 100,000 links, that empty textarea can get annoying to scroll every time :(

Vishal

Vishal
-------------------------------------------------------
Quote Reply
Re: [SWDevil.Com] [Bug] : Link Property Column Delete In reply to
Any updates?

Vishal
-------------------------------------------------------