We have a custom Perl Module created under [iw-home]/iw-perl/site/lib folder to be "use" in multiple tpl files in TeamSite 6.5. FYI, we put common perl functions in our custom Perl Module so we can reuse our code in multiple tpl files.
We are trying to upgrade TeamSite to 7.3, so we have the same TS 6.5 templates and custom Perl modules copied over to TS 7.3. However our custom Perl Module no longer work in TeamSite 7.3. When we try to Generate files in TeamSite 7.3, we are getting following error message:
An error occurred during PT compiling. Please see more details in log files.
In the log file we have following error messages:
Use of uninitialized value in concatenation (.) or string at /opt/teamsite/TeamSite/iw-perl/site/lib/CentralUtil.pm line 568.
Use of uninitialized value in string eq at /opt/teamsite/TeamSite/iw-perl/site/lib/CentralUtil.pm line 575.
for line 568, it is referrring to the last statement:
$output->(" pagePath=\"$link\" alt=\"$text\"");
in the following printLinkAttributes function:
====================================
sub printLinkAttributes
{
my ($output, $link, $text, $addDefault) = @_;
if ($link =~ m/^\#.*/)
{
$link =~ s/\#//;
$output->(" pageId=\"$link\" alt=\"$text\"");
}
elsif ($link =~ m/^@.*/)
{
$link =~ s/\@//;
$output->(" pageName=\"$link\" alt=\"$text\"");
}
elsif ($link =~ m/^http.*/)
{
$output->(" url=\"$link\" ");
if ($addDefault eq "true" )
{
$output->("windowName=\"_new\" toolbar=\"1\" location=\"1\" directories=\"1\" status=\"1\" menubar=\"1\" scrollbars=\"1\" resizable=\"1\" ");
}
}
else
{
$output->(" pagePath=\"$link\" alt=\"$text\"");
}
}
====================================
Also for line 575 is referring to the following statement:
if ($alt eq "")
in the following printMCLink function:
====================================
sub printMCLink
{
my ($output, $link, $title, $alt, $features, $addDefault) = @_;
if ($alt eq "")
{
$alt = $title;
}
$output->("<mc:link");
if ($features eq "")
{
$addDefault = "true";
}
printLinkAttributes($output, $link, $alt, $addDefault);
$output->(" $features >$title</mc:link>\n");
}
====================================
I could not tell why these 2 lines (line 568 and line 575) are causing errors in TeamSite 7.3, but not in TeamSite 6.5. Am I overlooking something in my code? Or do we need to configure custom Perl Module differently in TeamSite 7.3 in order to get it to work?
Thanks,
Susan