[rt-devel] Need some help

Grant Miller grant at pico.apple.com
Fri Jan 11 19:20:31 EST 2002


I'm hacking at v2.0.11 to add a feature that will set the default queue
listed in /Elements/CreateTicket based on what the user has selected as the 
queue to search in when using the Search page.


I'm running into some stumbling blocks trying to hack RT.

Here's what I've modified to try and make this work:

In /Search/Listing.html:

<& /Elements/Tabs, current_toptab => 'Search/Listing.html', Default => $session{
'tickets'}->RestrictionValues('Queue') &>

In /Elements/Tabs:
     A => { html => $m->comp('/Elements/CreateTicket', Default => $Default)
and added $Default => undef to the %ARGS hash.

In /Elements/CreateTicket:
<& /Elements/SelectNewTicketQueue, Default => $Default &></FORM>

<%ARGS>
$Default => undef
</%ARGS>



And here's the Mason error I'm getting:


error in file:  
        /local/solaris_2.7/rt2.0.11/WebRT/data/obj/STANDARD/Elements/Tabs
  
       line 9: 
       Odd number of parameters passed to component expecting name/value pairs

 context:  ... 
        5: HTML::Mason::Component::FileBased->new
        6: (
        7: 'code'=>sub {
        8: my %ARGS;
        9: if (@_ % 2 == 0) { %ARGS = @_ } else { die "Odd number of parameters passed to component expecting name/value pairs" }
        10: my $current_toptab = (!exists $ARGS{'current_toptab'} ? "none" : $ARGS{'current_toptab'});
        11: my $current_tab = (!exists $ARGS{'current_tab'} ? "none" : $ARGS{'current_tab'});


component stack:  
        /Elements/Tabs [standard]
        /Search/Listing.html [standard]
        /autohandler [standard]
 code stack:  
        /local/solaris_2.7/rt2.0.11/WebRT/data/obj/STANDARD/Elements/Tabs:9
        /local/solaris_2.7/rt2.0.11/WebRT/data/obj/STANDARD/Search/Listing.html:39
        /local/solaris_2.7/rt2.0.11/WebRT/data/obj/STANDARD/autohandler:69


raw error:  

  error while executing /Elements/Tabs [standard]:
  Odd number of parameters passed to component expecting name/value pairs at /local/solaris_2.7/rt2.0.11/WebRT/data/obj/STANDARD/Elements/Tabs line 9.
  HTML::Mason::Interp::__ANON__('Odd number of parameters passed to component expecting name/valu...') called at /local/solaris_2.7/rt2.0.11/WebRT/data/obj/STANDARD/Elements/Tabs line 9
  HTML::Mason::Commands::__ANON__('current_toptab', 'Search/Listing.html', 'Default') called at /local/solaris_2.6/perl_5.6.0/lib/site_perl/5.6.0/HTML/Mason/Component.pm line 131
  HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0xce1310)', 'HTML::Mason::Component::FileBased=HASH(0xce1310)', 'current_toptab', 'Search/Listing.html', 'Default') called at
  /local/solaris_2.6/perl_5.6.0/lib/site_perl/5.6.0/HTML/Mason/Request.pm line 653




Any help would be appreciated.

Thanks.

-- 

-Grant Miller    grant at pico.apple.com     

 Unix Systems Admin, Engineering Compute Services, Apple Computer.






More information about the Rt-devel mailing list