Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Wrong argument passed to this subroutine

Quote Reply
Wrong argument passed to this subroutine
GT::SQL::Table (13925): Wrong argument passed to this subroutine. Usage: Must pass category id to template_set at /mnt/mydomain.com/cgi-bin/admin/Links/Table/Category.pm line 418.

Please enable debugging in setup for more details.

How do I fix this error?

Thanks for any help.

SandraR


Sandra Roussel
Chonsa Group Design - Fresh Start Housing
Quote Reply
Re: [SandraR] Wrong argument passed to this subroutine In reply to
While trying to build detailed pages I still get this message no matter what I try... Can someone help please?


Building HTML Pages: Building Detailed Pages: Page 12 of 14

Links SQL is now updating your detailed pages.

Started at Fri Dec 31 03:19:00 2004.

Building Detailed pages ...
438803 438804 438805 438806 438807 438808 438809 438810 438811 438812 438813 438814 438815 438816 438817 438818 438819 438820 438821 438822
438823 438824 438825 438826 438827 438828 438829 438830 438831 438832 438833 438834 438835 438836 438837 438838 438839 438840 438841 438842
438843 438844 438845 438846 438847 438848 438849 438850 438851 438852 438853 438854 438855 438856 438857 438858 438859 438860 438861 438862
438863 438864 438865 438866 438867 438868 438869 438870 438871 438872 438873 438874 438875 438876 438877 438878 438879 438880 438881 438882
438883 438884 438885 438886 438887 438888 438889 438890 438891 438892 438893 438894 438895 438896 438897 438898 438899 438900 438901 438902
438903 438904 438905 438906 438907 438908 438909 438910 438911 438912 438913 438914 438915 438916 438917 438918 438919 438920 438921 438922
438923 34886 34887 34888 34889 34890 34891 34892 34893 34894 34895 34896 34897 40543 34899 34900 34901 34902 34903 34904
34905 34906 34907 34908 34909 34910 34911 34912 34913 34914 34915 34916 34917 34918 34919 34920 34921 34922 34923 34924
34925 34926 34927 34928 34929 34930 34931 34932 34933 34934 34935 34936 34937 34938 34939 34940 34941 34942 34943 34944
34945 34946 34947 34948 34949 34950 34951 34952 34953 34954 34955 34956 34957 40150

A fatal error has occured:

GT::SQL::Table (26472): Wrong argument passed to this subroutine. Usage: Must pass category id to template_set at /mnt/domain.com/cgi-bin/admin/Links/Table/Category.pm line 418.

Please enable debugging in setup for more details.


Sandra Roussel
Chonsa Group Design - Fresh Start Housing
Quote Reply
Re: [SandraR] Wrong argument passed to this subroutine In reply to
Wanted to add I get this error when I restore from back-up then rebuild


Sandra Roussel
Chonsa Group Design - Fresh Start Housing
Quote Reply
Re: [SandraR] Wrong argument passed to this subroutine In reply to
Can you redo that with debug enabled?

Adrian
Quote Reply
Re: [brewt] Wrong argument passed to this subroutine In reply to
Building HTML Pages: Building Detailed Pages: Page 1 of 14

Links SQL is now updating your detailed pages.

Started at Fri Dec 31 04:30:00 2004.

Building Detailed pages ...
393 395 396 398 400 402 405 410 414 416 40148 421 422 423 424 426 427 428 429 430
431 433 434 435 436 437 438 441 443 444 445 34327 34328 34329 34330 34331 34332 34323 34326 34325
34341 34342 34337 34338 34339 34340 34336 34333 34334 34335 469 470 471 472 473 474 475 476 477 478
479 480 481 482 483 484 486 487 488 489 491 492 493 495 496 497 498 499 501 502
504 505 506 507 508 509 513 514 515 518 519 520 521 522 31533 581 582 583 584 585
586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605
606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625
626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645
646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665
666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685
686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705
706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725
726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745
746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765
766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 37453
37454 37455 37456 37457 37458

A fatal error has occured:

GT::SQL::Table (28768): Wrong argument passed to this subroutine. Usage: Must pass category id to template_set at /mnt/domain.com/cgi-bin/admin/Links/Table/Category.pm line 418.

Please enable debugging in setup for more details.

Stack Trace
======================================
Links (28768): Links::environment called at /mnt/domain.com/cgi-bin/admin/Links.pm line 524 with no arguments.
Links (28768): Links::fatal called at GT::Base::error line 381 with arguments
(GT::SQL::Table (28768): Wrong argument passed to this subroutine. Usage: Must pass category id to template_set at /mnt/domain.com/cgi-bin/admin/Links/Table/Category.pm line 418.
).
Links (28768): GT::Base::error called at /mnt/domain.com/cgi-bin/admin/Links/Table/Category.pm line 418 with arguments
(Links::Table::Category=HASH(0x980c42c), BADARGS, FATAL, Must pass category id to template_set).
Links (28768): Links::Table::Category::template_set called at Links::Build::build_detailed line 497 with arguments
(Links::Table::Category=HASH(0x980c42c), [undef]).
Links (28768): Links::Build::build_detailed called at /mnt/domain.com/cgi-bin/admin/GT/Plugins.pm line 112 with arguments
(HASH(0x98f29b0)).
Links (28768): GT::Plugins::dispatch called at /mnt/domain.com/cgi-bin/admin/Links/Build.pm line 30 with arguments
(GT::Plugins, /mnt/domain.com/cgi-bin/admin/Plugins, build_detailed, CODE(0x981280c), HASH(0x98f29b0)).
Links (28768): Links::Build::build called at /mnt/domain.com/cgi-bin/admin/nph-build.cgi line 528 with arguments
(detailed, HASH(0x98f29b0)).
Links (28768): main::_build_detailed called at /mnt/domain.com/cgi-bin/admin/GT/Plugins.pm line 112 with arguments
(HASH(0x97a1294)).
Links (28768): GT::Plugins::dispatch called at /mnt/domain.com/cgi-bin/admin/nph-build.cgi line 189 with arguments
(GT::Plugins, /mnt/domain.com/cgi-bin/admin/Plugins, create_detailed_staggered, CODE(0x95a2888), HASH(0x97a1294)).
Links (28768): main::build_staggered called at /mnt/domain.com/cgi-bin/admin/nph-build.cgi line 40 with no arguments.
Links (28768): main::main called at /mnt/domain.com/cgi-bin/admin/nph-build.cgi line 29 with no arguments.


System Information
======================================
Perl Version: 5.008
Links SQL Version: 2.2.0
DBI.pm Version: 1.32
Running under mod_perl: No
Running under SpeedyCGI: No
GT::SQL::error = GT::SQL::Table (28768): Wrong argument passed to this subroutine. Usage: Must pass category id to template_set at /mnt/domain.com/cgi-bin/admin/Links/Table/Category.pm line 418.

@INC =
/mnt/domain.com/cgi-bin/admin
/usr/lib/perl5/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/5.8.0
/usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.0
/usr/lib/perl5/site_perl
/usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.0
/usr/lib/perl5/vendor_perl
.

CGI INPUT
======================================
do => staggered
s => 4


ENVIRONMENT
======================================
AUTH_TYPE => Basic
DOCUMENT_ROOT => /mnt/domain.com
GATEWAY_INTERFACE => CGI/1.1
GT_TMPDIR => /mnt/domain.com/cgi-bin/admin/tmp
HTTP_ACCEPT => text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
HTTP_ACCEPT_CHARSET => ISO-8859-1,utf-8;q=0.7,*;q=0.7
HTTP_ACCEPT_ENCODING => gzip,deflate
HTTP_ACCEPT_LANGUAGE => en-us,en;q=0.5
HTTP_CONNECTION => keep-alive
HTTP_HOST => domain.com
HTTP_KEEP_ALIVE => 300
HTTP_USER_AGENT => Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040614 Firefox/0.9
PATH => /sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin
QUERY_STRING => do=staggered&s=4
REMOTE_ADDR => 69.29.136.50
REMOTE_PORT => 50051
REMOTE_USER => sroussel
REQUEST_METHOD => GET
REQUEST_URI => /cgi-bin/admin/nph-build.cgi?do=staggered&s=4
SCRIPT_FILENAME => /mnt/domain.com/cgi-bin/admin/nph-build.cgi
SCRIPT_NAME => /cgi-bin/admin/nph-build.cgi
SERVER_ADDR => 66.216.98.186
SERVER_ADMIN => root@localhost
SERVER_NAME => domain.com
SERVER_PORT => 80
SERVER_PROTOCOL => HTTP/1.1
SERVER_SIGNATURE =>
Apache/2.0.46 (Red Hat) Server at domain.com Port 80


SERVER_SOFTWARE => Apache/2.0.46 (Red Hat)
UNIQUE_ID => 4nyf9kLYYroAAG2B2vcAAAAD


Sandra Roussel
Chonsa Group Design - Fresh Start Housing
Quote Reply
Re: [SandraR] Wrong argument passed to this subroutine In reply to
Adrian,

I hope the above helps.



Sandra Roussel
Chonsa Group Design - Fresh Start Housing
Quote Reply
Re: [SandraR] Wrong argument passed to this subroutine In reply to
Its almost guaranteed to be a link problem.

I've only ever had this error come up before, when an entry in lsql_CatLinks points to an invalid category ID. You don't get this when building category pages ... but you do when making the detailed pages.

A quick script, to try and work this out... would be to go into Database > Links > Search > 37458, and see what category that link has assigned to it.

My guess would be, that it will show up blank.

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] Wrong argument passed to this subroutine In reply to
Results showed an item within a category as it should be?

----------------------------------------------------------------------
Links: Search Results

Your search returned 1 result(s).

ID 37458
Title Broccoli with Golden Garlic and Lemon
URL http://www.DOmain.com/food/r/paleolithic/broccoligarliclemon.html
LinkOwner admin edit
Add Date 2003-01-30
Mod Date 2003-01-30
Description Cook broccoli in a large saucepan of boiling water 56 minutes, or until crisp tender. Drain in a colander. Arrange on a serving dish and cover to keep warm. In a small frying pan, warm olive oil over low heat. Stir in garlic and cook slowly until golden brown, be careful not to burn the garlic, about 12 minutes. Add pepper and lemon juice. Pour over broccoli.
Short_Description
Contact Name
Contact Email
Hits 2
isNew No
isChanged No
isPopular No
isValidated Yes
Rating 0.00
Votes 0
Status 200
Date Checked 2003-06-03 00:00:00
Timestamp 20030603152838
Expiry Date No Payment Required
IMAGE
Category_Template
BuyURL
KEYWORDS
Sale_price
SEARCH_STRING
SHOW_EMAIL 0
PASSWORD
APPROVED 0
DEAD_LINK 0
WEIGHTING 0
CREATE_SECOND 0
CREATE_DATE
CREATE_TIME
UPDATE_SECOND 0
UPDATE_DATE
UPDATE_TIME
MAILING_LIST 0
page_content
Recommended 0
Retail_price
image_impression
Publisher
isbn
author
Brand
sample_mwp
sample_real
Stock_Status
audio_length
Color
width
height
SKU

Categories 1335: Miscellaneous/FREE Recipes/Paleolithic/Vegetables

Attachments
None

Links: Add | Modify | Delete | Search | Properties


Sandra Roussel
Chonsa Group Design - Fresh Start Housing
Quote Reply
Re: [Andy] Wrong argument passed to this subroutine In reply to
Actually, the ID gets printed after all the work is done. So the ID that's causing problems hasn't been printed out yet.

Can I get shell access (need to be able to write to Links SQL's file and view your webserver's logs)?

Adrian
Quote Reply
Re: [SandraR] Wrong argument passed to this subroutine In reply to
Try this script via Telnet/SSH;

Code:
#!/usr/bin/perl

use strict;
use lib './';
use Links qw/$IN $DB $CFG/;

local $SIG{__DIE__} = \&Links::fatal;

Links::init('./');

my $DEBUG = 1;

# first of all, lets actually get rid of all the categories...
my @id_list;
my $table = $DB->table('CatLinks');

my $sth = $table->select() || die $GT::SQL::error;

while (my $hit = $sth->fetchrow_hashref) {
if ($DB->table('Category')->count( { ID => $hit->{CategoryID} } ) < 1) {
print "Category ID $hit->{CategoryID} doesn't seem to exist... \n";
}
}

print "Finished .... ";

It should print out a list of bad category ID's, which are assigned to active links.

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!