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)
TS6 defined and iwpt_dcr_value
dazzlad
Hi.
We've moved from Teamsite 5.52 on Solaris to TS 6.1
our big problem is that when checking on a variable element to see what type of page/section we are generating (in the pt) all statements evaluate to true.
e.g.
if (defined iwpt_dcr_value('dcr.pageType.framesPage')) {
HTMLComment("Frames Page");
outputFrameJS();
}
elsif (defined iwpt_dcr_value('dcr.pageType.extLink')) {
iwpt_output(qq(</head>\n</html>\n));
}
elsif (defined iwpt_dcr_value('dcr.pageType.intLink')) {
iwpt_output(qq(</head>\n</html>\n));
}
else {
outputHTML();
}
The result being, the first clause of an if statement is always selected.
Has anyone experienced anything similar and if so, what workaround did you use?
Thanks!
Darren
Find more posts tagged with
Comments
lhdavis
With the new version of perl (upgraded to 5.8.2 in 6.1), it doesn't like using if (defined ) for arrays or hashes. If that is what iwpt_dcr_value is using then you might have to change your code.
Maybe instead of this:
if (defined iwpt_dcr_value('dcr.pageType.framesPage')) {...
you try this
if (iwpt_dcr_value('dcr.pageType.framesPage')) {...
Check out the section entitled "New -w warnings that might bite you (but they're easy to fix)" in Technote 51304, "Updated iwperl in TeamSite 6.1"
Luke Davis
Open Technology Group, Inc.
luke.davis@med.va.gov