Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
cgi params in TS 6.5
rodigz
hi,
how will I passed variables in TS 6.5? Things are not working in TS 6.5
# These are CGI params passed by iw_cgi_wrapper.
my $PARAM_USER_ROLE = "user_role";
my $PARAM_USER_NAME = "user_name";
my $PARAM_AREA_PATH = "area_path";
my $username = $page->param($PARAM_USER_NAME);
my $userrole = $page->param($PARAM_USER_ROLE);
my $area_path = $page->param($PARAM_AREA_PATH);
Find more posts tagged with
Comments
Adam Stoller
There have been a number of posts on this
- the quick-fix is to run your cgi-scripts through the wrapper script wdpro_menu.ipl (e.g. the same way that you'd use iw_cgi_wrapper.cgi)
- the longer answer is use show_env.cgi and learn the new variables and their values so you can adjust your code to work without the wrapper script.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
rodigz
hi ghoti,
can you provide a link or manual on how deal with the code changes.
thanks.
rodigz
here the code..basically i want to get all the selected dcr now it's not working in 6.5
sub GetDCRs
{
my ( $page, $path_type ) =
@_
;
if( ($path_type != $TYPE_VPATH) and ($path_type != $TYPE_ABS_PATH) )
{
$log->Error("Invaid path type \[$path_type\] passed to GetDCRs!");
return undef;
}
my
@array
= ( );
my $count = 0;
my $flag = 1;
my $area_vpath = $utils->ParseVpathFromAbsPath($page->param($PARAM_AREA_PATH));
while($flag)
{
my $abs_file_path = $page->param("path_".$count++);
if((defined $abs_file_path) && (length($abs_file_path) > 0))
{
if( (-f $abs_file_path) and ($tmplUtils->IsDCR($abs_file_path)) )
{
my $path;
if($path_type == $TYPE_VPATH)
{
$path = $utils->ParseVpathFromAbsPath($abs_file_path);
$path =~ s/^$area_vpath(.*)$/$1/;
}
else
{
$path = $abs_file_path;
}
push
@array
, $path;
}
}
else
{
$flag = 0;
}
}
return (scalar(
@array)
> 0) ? \
@array
: undef;
}
Adam Stoller
You're leaving out far too much detail - can I assume that $page is a CGI.pm object as opposed to a TeamSite::CGI_lite object?
Have you tried printing out *all* the entries in param() to see what's there?
I think you need to do some of your own investigative debugging to determine what information is available versus what information used to be available.
You might want to try switching to TeamSite::CGI_lite - at least temporarilly - so you can see not only the form variables, but also the cookies (some of the information that used to be in form variables in 5.x is now in cookies and other information is now consolidated rather than being in separate parts).
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
rodigz
great thanks..where can i manuals about the new params etc?
Adam Stoller
You *might* be able to find some of it documented - but your best bet is to just add debugging code to your program and look at the output - essentially creating your own documentation as you go.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com