Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Fatal Error when Deleting Links

Quote Reply
Fatal Error when Deleting Links
Hello,
All site seems to operate correctly; however, and for some reason, I can not delete links.
If you delete a link, you will get the following error below; however, when you go to "Browse" and look if it is there, it does not show up. But if you go to "Database" and select "Links > List All" you will see the deleted links still there and is not deleted.
Any idea...?!?!?
Thanks much in advance...
mark


Code:
A fatal error has occured:

GT::SQL::Table (27698): Wrong argument passed to this subroutine. Could not create a condition object out of arguments. at /home/docs/mysite/cgibin/links/admin/Links/Table/Links.pm line 233.

Please enable debugging in setup for more details.

Stack Trace
======================================
Links (27698): Links::environment called at /home/docs/mysite/cgibin/links/admin/Links.pm line 751 with no arguments.
Links (27698): Links::fatal called at GT::Base::error line 378 with arguments
(GT::SQL::Table (27698): Wrong argument passed to this subroutine. Could not create a condition object out of arguments. at /home/docs/mysite/cgibin/links/admin/Links/Table/Links.pm line 233.
).
Links (27698): GT::Base::error called at GT::Base::fatal line 290 with arguments
(GT::SQL::Table=HASH(0x8701b8c), BADARGS, FATAL, Could not create a condition object out of arguments.).
Links (27698): GT::Base::fatal called at /home/docs/mysite/cgibin/links/admin/GT/SQL/Table.pm line 698 with arguments
(GT::SQL::Table=HASH(0x8701b8c), BADARGS, Could not create a condition object out of arguments.).
Links (27698): GT::SQL::Table::delete called at GT::SQL::Table::_do_opt line 2223 with arguments
(GT::SQL::Table=HASH(0x8701b8c), HASH(0x86f7d08)).
Links (27698): GT::SQL::Table::_do_opt called at GT::SQL::Table::_delete_cond line 2248 with arguments
(Links::Table::Links=HASH(0x843ee0c), cascade, HASH(0x86f7d08), glinks_Coregs).
Links (27698): GT::SQL::Table::_delete_cond called at /home/docs/mysite/cgibin/links/admin/GT/SQL/Table.pm line 722 with arguments
(Links::Table::Links=HASH(0x843ee0c), GT::SQL::Condition=HASH(0x86eb948), cascade).
Links (27698): GT::SQL::Table::delete called at /home/docs/mysite/cgibin/links/admin/Links/Table/Links.pm line 233 with arguments
(Links::Table::Links=HASH(0x843ee0c), HASH(0x824a440)).
Links (27698): Links::Table::Links::_plg_delete_link called at /home/docs/mysite/cgibin/links/admin/Links/Table/Links.pm line 195 with arguments
(Links::Table::Links=HASH(0x843ee0c), HASH(0x8550328)).
Links (27698): Links::Table::Links::__ANON__ called at /home/docs/mysite/cgibin/links/admin/GT/Plugins.pm line 127 with arguments
(HASH(0x8550328)).
Links (27698): GT::Plugins::dispatch called at /home/docs/mysite/cgibin/links/admin/Links/Table/Links.pm line 195 with arguments
(GT::Plugins=HASH(0x82b1e24), delete_link, CODE(0x824a38c), HASH(0x8550328)).
Links (27698): Links::Table::Links::delete called at GT::SQL::Admin::delete_records line 631 with arguments
(Links::Table::Links=HASH(0x843ee0c), HASH(0x82c2934)).
Links (27698): GT::SQL::Admin::delete_records called at /home/docs/mysite/cgibin/links/admin/GT/SQL/Admin.pm line 121 with arguments
(Links::Admin=HASH(0x83b3fec)).
Links (27698): GT::SQL::Admin::process called at admin.cgi line 79 with arguments
(Links::Admin=HASH(0x83b3fec), db, GT::SQL=HASH(0x82a61f0), cgi, GT::CGI=HASH(0x82af980)).
Links (27698): main::db_request called at admin.cgi line 57 with no arguments.
Links (27698): main::main called at admin.cgi line 24 with no arguments.
Quote Reply
Re: [Mark2] Fatal Error when Deleting Links In reply to
Hi,

Shoot over GLinks details (PM or email), and I'll have a look for you.

I've had this happen a couple of times before. I can't remember off the top of my head how I fixed it - but I seem to remember it was something silly (even as simple as doing a Database > Links > Resync Table)

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] Fatal Error when Deleting Links In reply to
Thank you much Andy for offering to help...
However, I am not really sure what is exactly the "GLinks Details" that you've mentioned.
I am using the latest Links 3.2.1 with all Updates installed in it.
Line 233 that is mentioned above is this sub routine in Links.pm:

Code:
sub _plg_delete_link {
# -----------------------------------------------------------------------------
# Deletes a single link ID (plugin hook 'delete_link'. The second argument,
# $link, will, for historic reasons, always be a hash reference containing an
# 'ID' key, the value of which is the ID of the link to be deleted.
#
my ($self, $link) = @_;
my $link_id = $link->{ID};

return $self->SUPER::delete({ ID => $link_id });
}
sub _plg_delete_link {
# -----------------------------------------------------------------------------
# Deletes a single link ID (plugin hook 'delete_link'. The second argument,
# $link, will, for historic reasons, always be a hash reference containing an
# 'ID' key, the value of which is the ID of the link to be deleted.
#
my ($self, $link) = @_;
my $link_id = $link->{ID};

return $self->SUPER::delete({ ID => $link_id });
}

I am using also IE and FireFox (Latest) on top of Windows XP to browse the site...
The site is hosted on a Linux Apache server.

I've resynched all tables but still encountering the same problem

Thanks in advance...
mark
Quote Reply
Re: [Mark2] Fatal Error when Deleting Links In reply to
Weird. If you send me admin panel access, the procedure that you're following to delete the link (be sure to include links that I can delete), and if possible, ssh access, I can take a look at it for you.

Adrian
Quote Reply
Re: [brewt] Fatal Error when Deleting Links In reply to
Hello Adrian... I would love to give you a backend access; but due to privacy policy we really can not release access to anyone since we have lots of info stored. Sorry about that....I hope you understand our concern.
However, I can work with you on resolving this issue, as I've inserted category, review, ... etc and deleted them and everything goes well... however, when it comes to deleting a link, I always get faced with the listed error above and the link disappears from the "Browse" section, but still show in the "Database" section!!

thank you always for all your help...
Mark
Quote Reply
Re: [Andy] Fatal Error when Deleting Links In reply to
I removed all plugins and I am still getting the same error; eventhough, i can delete user, category, review...etc... but when I try to delete a link, I get the stated message above...
Any idea anyone...
thanks much again...
Mark
Quote Reply
Re: [brewt] Fatal Error when Deleting Links In reply to
Wondering if I can go to MySQL and delete all orphan links there .. would that fix the issue...

Thanks much in advance..
Mark
Quote Reply
Re: [Mark2] Fatal Error when Deleting Links In reply to
Hi,

Cant' you delete the orphan links via Database > Repair Tables

?

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] Fatal Error when Deleting Links In reply to
Hi Andy,
Every time, I try to run Repair Tables, I get orphan links.. or none categorized links...
but if you try to delete from there, you get the same error as shown above... and if you associate them with directory, then delete them, you get the same error again...
this is an example on the test site:

Code:
Started at Tue Jan 29 13:13:04 2008.

Checking for orphaned CatLinks entries...
Done (0.00s)

Checking category stats...
Category Miscellaneous Offers should have 18/0 total/direct links, but is set to 19/0, repairing... 18/0 ok!
Category Surveys & Promotions should have 11/0 total/direct links, but is set to 17/0, repairing... 11/0 ok!
Done (1.00s)

Resetting hits and rates...
Done (0.00s)

Checking for orphan links...
There are 10 links that are not in a category. Please modify or delete the following links (
):
22: CuttingEdgeBoots - modify | delete
21: DesignerPurseAndWallet - modify | delete
23: FreeDesignerFashionHandbag - modify | delete
24: FreeHockeyJersey - modify | delete
25: FreeDesignerLingerie - modify | delete
26: DesignerBoots4Free Boots - modify | delete
27: FreePurseAndWallet - Free Purse - modify | delete
45: Dunhill Vacations - modify | delete
51: dgdsfgsdaf - modify | delete
53: oopiuoiuou - modify | delete
Done (0.00s)

Updating new flags...
Done (0.00s)

Updating changed flags...
Done (0.00s)

Updating Cool Flags...
Done (0.00s)

All done. Total time: (1.00s)

Can I launch MySQL Man and delete all links there to see if something blocking the deletion or some wrong declaration in the def files... .. can we tell anything from the error message?

thanks much
Quote Reply
Re: [Mark2] Fatal Error when Deleting Links In reply to
Without access to debug the problem, there isn't much we can do. However, my guess would be that you have some sort of def file issue. I would not recommend deleting the links using mysqlman.

Adrian
Quote Reply
Re: [Mark2] Fatal Error when Deleting Links In reply to
Hello....
Just in case someone faces this issue again...
This is how I fixed it (does not mean it is the best solution)... and so far; so good...
- I created a backup directory .../admin/defs/backup
- Copied all def file into the new backup directory
- Then deleted the troubling file that is indicated in the error message (Links.def) (since the error is coming from deleting a link)
- Went to Setup>SQL Server and clicked [Submit] to redo all default databases (without deleting the data).
- then I went the properties of all tables (Links, Categories, Users ..etc.) and named the fields in the form (the bottom section) as all fields stayed the same but they had empty naming in the FORM.

that seemed to solve the issue..
Thanks to all for help..

Mark

Last edited by:

Mark2: Feb 1, 2008, 6:07 AM