[html]
<br>########## perl modules ############<br>use TeamSite::Config;<br>use rogers::tpl_utils;<br>use rogers:

penDeploy;<br>########## perl modules ############<br>my $iwhome = TeamSite::Config::iwgethome();<br>my $iwmount = TeamSite::Config::iwgetmount();<br><br>($iwcfg) = "$iwhome/bin/iwconfig";<br><br>my $dcrpath = iwpt_get_dcr_name();<br>$dcrpath =~ s#\.iwmnt#iwmnt#g;<br>my $dcr_name = iwpt_get_dcr_name("basename");<br><br>my $prefix = getLOB($dcrpath);<br>my $prefDir = uc($prefix); <br>my $templatename = getDataType($dcrpath);<br>my $contentname = $dcr_name;<br><br>$dcrpath =~ m/\/([^\/]+)\/data/;<br>my $ofile = "generated/component/".$templatename."/".$contentname.".xml";<br>(my $hostname = `$iwcfg iwwebd host`) =~ s#\n$##; <br>my $edit_path = "http://".$hostname."/iw-cc/edit?vpath=".$dcrpath;<br>$edit_path =~ s#$iwmount##g;<br>(my $rogersca = `$iwcfg iwwebd rogersca`) =~ s#\n$##;<br>my $endtag = "]"."]>";<br>my $cdata = "<!"."[CDATA[";<br><br>############ Build the initial media lists<br>my
@media_ids = ();<br>my $filelist = 'generated/filelist/';<br>my $media_file = $filelist.$contentname."_images.txt";<br>my
@matches = getImageList( iwpt_get_dcr_name() );<br><br>############ Build the region array<br>my
@region_array = ("default");<br>my $item_region = join(',',
@region_array);<br>############<br><br><br>
XML Output Generation
$iw_param{idmedia} = \
@media_ids;
Set Extended Attribs and Deploy
<br><br>###EAs<br>#PT<br>#DCR<br>my $cat = $dcrpath;<br>$cat =~ s#(.*)\/templatedata\/(.*)\/data\/(.*)#$2#g;<br>my $path_ofile = $1."/". $ofile;<br><br>my $attrib1 = "TeamSite/Templating/PrimaryDCR";<br>my $attrib2 = "TeamSite/Templating/PrimaryDocumentType";<br>my $attrib3 = "TeamSite/Templating/PrimaryPT";<br>setiwextattr($path_ofile, $attrib1, $3);<br>setiwextattr($path_ofile, $attrib2, $cat);<br>setiwextattr($path_ofile, $attrib3, iwpt_get_pt_name("basename"));<br><br>##### DEPLOY<br>my $source_WA = iwpt_get_flag_param("-iw_include-location");<br>$source_WA =~ s#\.iwmnt#iwmnt#;<br>my $dep_directory = "generated/component/".$templatename;<br>my $odname_xml = "rogers_DEV";<br>my $odname_media = "rogers_Image";<br>$contentname = $contentname.".xml";<br><br>my
@deploy_xml = opendeploy_xml($odname_xml,$source_WA,$contentname,$dep_directory);<br>my
@deploy_img = opendeploy_img($odname_media,$source_WA,$media_file);<br>my $meta_refresh = "";<br><br>if (($deploy_xml[0] eq "1") || ($deploy_img[0] eq "1") )<br>{<br> $info = qq|Deployment Failed please contact your administrator<br>|;<br> if ($deploy_xml[0] eq "1")<br> {<br> $info .= qq|<br>Content File failed <br> Contentname -> $contentname <br>$deploy_xml[1]|;<br> }<br> if ($deploy_img[0] eq "1")<br> {<br> $info .= qq|<br>Content Media images Failed<br>$deploy_img[1]|;<br> }<br>}<br>else<br>{<br> $info = qq|<img src="/iw-icons/web/wait.gif" border="0" alt="Please wait">|;<br>}<br>$output = qq{<br><html><br> <head><br> <title>Preview in BEA Portal</title><br> </head><br> <body><br> <table cellpadding="0" cellspacing="0" border="0"><br> <tr><br> <td><br> <center><a href="javascript:self.close()"><br>$info</a></center><br> </td><br> </tr><br> </table><br> </body><br></html><br>};<br><br>
[/html]
This code is working fine in development environment.
But in staging environment it gives compilation error.
I tried to use iwpt_compile.ipl from the /iw-home/bin directory , where CLTs are , as follows
[html]
./iwpt_compile.ipl -pt /default/main/NEWROG/Common/WORKAREA/Common/templatedata/Component/Resource/presentation/preview.tpl [/html]
I got the error[html]
element syntax:
In 'docroot' mode, -iw_include-location must be used
[/html]
When I try to run the iwpt_compile.ipl command from iw-home/bin dir as follows, command does not work at all and SSH Shell client is getting froze[html]./iwpt_compile.ipl -pt /default/main/NEWROG/Common/WORKAREA/Common/templatedata/Component/Resource/presentation/preview.tpl -iw_pt-dcr /default/main/NEWROG/Common/WORKAREA/Common/templatedata/Component/Resource/data/search/search -ocode /tmp/resource.ipl[/html]
Whats wrong with preview.tpl file ? How can I make sure its working ?