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)
Problems with Template
sdevabhaktuni
We recently upgraded from TeamSite 5 to TeamSite 6. The templates that were working in the old version donot work in the new version. The dcrs retain the information that were created using TeamSite 5 but when we generate using the templates we get an error. I was told that there are no updates that have to be made to the templates for them to work in the new version. The templates were written in XML and perl. Could someone help with this issue.
Find more posts tagged with
Comments
Adam Stoller
You're saying the DCT's and DCRs are fine - only the page generation with the PTs is a problem?
Are you using modules in your PTs - either custom or CPAN originated?
Are you doing any DB callouts in your PT?
Without seeing the PT code - there's not much more that one can do but take shots-in-the-dark about things that *might* be relevant.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
sdevabhaktuni
This is the code for the tpl file we are using
<?xml version="1.0" encoding="UTF-8"?>
<iw_pt name="FYIArticle"><![CDATA[
<HTML>
<HEAD>
]]><iw_perl><![CDATA[
use HTML::Entities;
use TeamSite::Config;
use TeamSite:
T::iw_perl;
use bnsf:
ateDB;
use bnsf::Util;
use Win32:
rocess;
use File::Copy;
use Date::Manip;
Date_Init("TZ=CST"); #initialize date manip
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime;
if($min < 10) {
$min = "0".$min;
}
if($sec < 10) {
$sec = "0".$sec;
}
$timeString = $hour . ":" . $min . ":" . $sec;
]]></iw_perl><![CDATA[
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>
<meta name='type' content='fyiarticle'/>
]]><iw_perl><![CDATA[
$publishDateString = iwpt_dcr_value('dcr.publishDate');
]]></iw_perl><![CDATA[
<meta name='publishDate' content='{iw_value name="$publishDateString"/}'/>
<meta name='time' content='{iw_value name="$timeString"/}'/>
<meta name='showOnHomePage' content='yes'/>
]]><iw_perl><![CDATA[
$story_iteration = 0;
]]></iw_perl>
<iw_iterate list="dcr.story" var="story">
<iw_perl><![CDATA[
$date = iwpt_dcr_value('story.storydate');
if ($date==0) {
$date="0000-00-00";
}
$eventdate .= $date."\$\$";
$show .= iwpt_dcr_value('story.Show')."\$\$";
$bullet .= iwpt_dcr_value('story.storyheading')."\$\$";
$events .= iwpt_dcr_value('story.eventheading')."\$\$";
$anchor .= $story_iteration."\$\$";
$story_iteration = $story_iteration + 1;
]]></iw_perl>
</iw_iterate>
<iw_perl><![CDATA[
$headline = HTML::Entities::encode_entities(iwpt_dcr_value('dcr.headline'), "'\"<>?");
$headline =~ s|\n| |gs;
]]></iw_perl><![CDATA[
<meta name='title' content='{iw_value name="$headline"}'/>
<meta name='eventdate' content='{iw_value name="$eventdate"}'/>
<meta name='show' content='{iw_value name="$show"/}'/>
<meta name='list' content='{iw_value name="$bullet"}'/>
<meta name='eventlist' content='{iw_value name="$events"}'/>
<meta name='story_no' content='{iw_value name="$story_iteration"}'/>
<meta name='anchor' content='{iw_value name="$anchor"}'/>
<title><iw_value name='dcr.headline'/></title>
</HEAD>
<body topmargin="0" leftmargin="0" marginwidth="0" marginheight="0">
<table width="700" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="520">
]]>
<H1><iw_value name="$headline"/></H1>
<ul>
<iw_perl><![CDATA[
$story_iteration = 0;
$anchor = 0;
]]></iw_perl>
<iw_iterate list="dcr.story" var="story">
<iw_perl><![CDATA[
$hide = iwpt_dcr_value('story.Show');
$bullet = iwpt_dcr_value('story.eventheading');
if ($hide==1) {
iwpt_output("<li><a href='#$anchor'>$bullet</a></li>");
}
$anchor = $anchor + 1;
$story_iteration = $story_iteration + 1;
]]></iw_perl>
</iw_iterate>
</ul>
<iw_perl><![CDATA[
$story_iteration = 0;
$anchor = 0;
]]></iw_perl>
<iw_iterate list="dcr.story" var="story">
<iw_iterate list="story.article" var="articlesList">
<iw_perl><![CDATA[
$hide = iwpt_dcr_value('story.Show');
$bullet = iwpt_dcr_value('story.eventheading');
$article = iwpt_dcr_value('articlesList.articleSection');
if ($hide==1) {
iwpt_output("<a name ='$anchor'></a><br>");
iwpt_output("<h3>$bullet</h3>");
iwpt_output("<p>$article</p>");
}
]]></iw_perl>
<iw_perl><![CDATA[
$anchor = $anchor + 1;
$story_iteration = $story_iteration + 1;
]]></iw_perl>
</iw_iterate>
</iw_iterate>
<![CDATA[
</td>
</tr>
</table>
</BODY>
</HTML>
]]><!-- End CDATA tag-->
</iw_pt>
When I generate the dcr using the template I get the following error:
Preview And Generate Error:
Could not process template: Y:\default\main\website\marketing\WORKAREA\d_s\templatedata\FYI\fyi_articles\presentation\fyi_article.tpl
:\default\main\website\marketing\WORKAREA\d_s\templatedata\FYI\fyi_articles\presentation\fyi_article.tpl
The path that shows up for the window that comes up with the error message is
/iw-bin/iw_cgi_wrapper.cgi/iwtmplhtmlwizard.cgi
Could you please look at it and let me know if this is something to do with the code in the tpl or if its something to do with permissions.