Hi, it's two years later... but, in 1.2.1 I have this same error. My guess is that a plugin is causing this right? because of foreign keys relations?
Hi
I still have this kind of problem... (with 1.1.8 version of french gforum)
Do I have to change someting in the defs file ? if yes in which one ?
Txs for your help....
Here is the message error I get...
A fatal error has occurred:
GT::SQL::Table (16289): Wrong argument passed to this subroutine. Usage: Could not create a condition object out of arguments. at /home/site/cgi-bin/gforum/admin/GT/SQL/Table.pm line 643.
Please enable debugging in setup for more details.
Stack Trace
======================================
GForum (16289): GT::Base::error called at /home/site/cgi-bin/gforum/admin/GT/SQL/Table.pm line 643 with arguments
([undef], GT::SQL::Table=HASH(0x844ee98), BADARGS, FATAL, Could not create a condition object out of arguments.).
GForum (16289): GT::SQL::Table::delete called at GT::SQL::Table::_do_opt line 2172 with arguments
(GT::SQL::Table=HASH(0x844ee98), HASH(0x8458a1c)).
GForum (16289): GT::SQL::Table::_do_opt called at GT::SQL::Table::_delete_cond line 2200 with arguments
(GT::SQL::Table=HASH(0x839877c), cascade, HASH(0x8458a1c), forum_Online).
GForum (16289): GT::SQL::Table::_delete_cond called at /home/site/cgi-bin/gforum/admin/GT/SQL/Table.pm line 664 with arguments
(GT::SQL::Table=HASH(0x839877c), GT::SQL::Condition=HASH(0x8223630), cascade).
GForum (16289): GT::SQL::Table::delete called at /home/site/cgi-bin/gforum/admin/GForum.pm line 547 with arguments
(GT::SQL::Table=HASH(0x839877c), GT::SQL::Condition=HASH(0x844a9c8)).
GForum (16289): GForum::_plg_authenticate called at /home/site/cgi-bin/gforum/admin/GT/Plugins.pm line 108 with no arguments.
GForum (16289): GT::Plugins::dispatch called at /home/site/cgi-bin/gforum/admin/GForum.pm line 486 with arguments
(GT::Plugins, /home/site/cgi-bin/gforum/admin/Plugins/GForum, authenticate, CODE(0x82a928c)).
GForum (16289): GForum::authenticate called at /home/site/cgi-bin/gforum/gforum.cgi line 53 with no arguments.
GForum (16289): main::main called at /home/site/cgi-bin/gforum/admin/GT/Plugins.pm line 108 with no arguments.
GForum (16289): GT::Plugins::dispatch called at /home/site/cgi-bin/gforum/gforum.cgi line 22 with arguments
(GT::Plugins, /home/site/cgi-bin/gforum/admin/Plugins/GForum, main, CODE(0x8325680)).
System Information
======================================
Perl Version: v5.6.0
Gossamer Forum Version: 1.1.8
GForum.pm version: 1.118
GT::SQL Version: 1.099
GT::Template Version: 2.084
DBI.pm Version: 1.18
@INC =
/home/site/cgi-bin/gforum/admin
/usr/lib/perl5/5.6.0/i386-linux
/usr/lib/perl5/5.6.0
/usr/lib/perl5/site_perl/5.6.0/i386-linux
/usr/lib/perl5/site_perl/5.6.0
/usr/lib/perl5/site_perl
.
GT::SQL::error = GT::SQL::Table (16289): Wrong argument passed to this subroutine. Usage: Could not create a condition object out of arguments. at /home/site/cgi-bin/gforum/admin/GT/SQL/Table.pm line 643.
regards
FMP
Mar 7, 2006, 1:53 AM
New User (1 post)
Mar 7, 2006, 1:53 AM
Post #28 of 28
Views: 3170
Hi FMP,
it seems as if you have at least one messed up def file, but that's not a big deal. We're going to fix this in a minute.
Just start your search for the problem at the def file of whatever you tried to delete, e.g. admin/defs/prefix_Users.def if you unsuccessfully tried to delete a user. In the appropriate file you'll find a hash key named 'fk_tables' which points to an anonymous array. This array contains each and every table that relates to at least one column of this table.
Say 'fk_tables' in lsql_Users.def looks like this:
'fk_tables' => [
'lsql_Links',
'lsql_Changes',
'lsql_Reviews',
'lsql_Editors',
'lsql_Sessions'
],
This tells you that the tables 'lsql_Links', 'lsql_Changes', 'lsql_Reviews', 'lsql_Editors' and 'lsql_Sessions' all in some way relate to 'lsql_Users'. Make sure there is no non-existent table in this list. Plugins which don't clean up properly after themselves could cause such a mess.
If the list of tables is ok, start looking into to corresponding def files. For instance, in lsql_Links.def there should be something like:
'fk' => {
'lsql_Users' => {
'LinkOwner' => 'Username'
}
},
This means that the column 'LinkOwner' in 'lsql_Links' relates to the column 'Username' in 'lsql_Users' an is called a foreign key. These foreign keys can be very useful, because if a user is deleted the Links system also automatically deletes all of her links (related to by the foreign key).
So basically you just have to look for some incosistencies in the foreign table and the foreign key declarations, e.g. non-existent tables and non-existent columns clearly indicate problems as do empty foreign key declarations in def files which are listed in foreign table declarations.
Hope that helps to at least get started.
Regards,
Lucas