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)
inline callouts help
Dmitry
I have been looking at this for about 5 hours now and still can't figure out the problem, hopefully someone can help. I'm trying to use inline callouts in datacapture.cfg file and each time I click on File/Tag, I get the following error: There was a problem with metadata capture configuration. Please contact your system administrator.
If anyone can suggest ways to debug this (is there an teamsite error log file I can use?) or knows what's wrong with the script, I would very much appreciate it.
The malfunctioning code is below.
Here is the code for the callout:
<inline command='/app/teamsite/iw-home/iw-perl/bin/iwperl /app/teamsite/iw-home/local/config/wft/ODDS/bin/datacapture_ODDS.ipl'/>
The datacapture_ODDS.ipl script is below:
#!/app/teamsite/iw-home/iw-perl/bin/iwperl
use strict;
use warnings;
print <<EOF;
<substitution>
<ruleset name="ODDS Rules1">
<item name="Dynamic List Tag">
<description>A list of files belonging to the same dynamic list value can be linked from the Intranet.</description>
<select>
<option label="test1" value="test1" />
</select>
</item>
</ruleset>
</substitution>
);
EOF
Find more posts tagged with
Comments
JonathonG
At first glance, the problem appears to be the extraneous ); that you have right above your EOF (highligted in
red
below).
#!/app/teamsite/iw-home/iw-perl/bin/iwperl
use strict;
use warnings;
print <<EOF;
<substitution>
<ruleset name="ODDS Rules1">
<item name="Dynamic List Tag">
<description>A list of files belonging to the same dynamic list value can be linked from the Intranet.</description>
<select>
<option label="test1" value="test1" />
</select>
</item>
</ruleset>
</substitution>
);
EOF
As for debugging, that depends on your TeamSite version. In 6.1 and up, there's usually a "Show Details" link that will tell you pretty directly what's wrong with the datacapture.cfg. If you're talking pre-6.1, then you're best bet is to print the resulting XML to a log file and open it with a validating XML editor.
Jonathon
Interwoven Developer
Allstate, Inc.
Valentine
Looks like you have an extra bracket at the end.
Dmitry
Thanks a lot guys!! Since you are so quick I have one more for you... Before I tried to run the script below (using QQ instead of '<<' notation) and that didn't work. When I run it from the command it's fine, but Teamsite doesn't like it.. any idea why?
#!/app/teamsite/iw-home/iw-perl/bin/iwperl
use strict;
use warnings;
my $ruleSet = qq( <?xml version="1.0" encoding="UTF-8" ?>
<substitution>
<ruleset name="ODDS Rules1">
<item name="Dynamic List Tag">
<description>A list of files belonging to the same dynamic list value can be linked from the Intranet.</description>
<select>
<option label="test1" value="test1" />
</select>
</item>
</ruleset>
</substitution>
);
print $ruleSet;
exit 0;
Edited by Dmitry on 08/29/05 09:34 AM (server time).
Dmitry
I'm using TS 6.5, but I don't think the link shows up.. What do you thnk is the best way to print the resulting XML to a log file? Using inline commands?
Thanks,
Dmitry
JonathonG
Looks like you have a space before your <?xml ...
My XML parser threw an error when I tried to do that. Maybe that's your problem?
Jonathon
Interwoven Developer
Allstate, Inc.
inline_toXLS.rptdesign
JonathonG
From your inline script, just put the XML into a variable (like in your 2nd posted example). Then, in addition to printing that variable to STDOUT, open a log file and print to that.
Jonathon
Interwoven Developer
Allstate, Inc.
jbonifaci
I'll just add that I would recommend using here documents when dealing with multiple lines of text in your code:
my $xml = <<XML;
<substitution>
<ruleset name="ODDS Rules1">
<item name="Dynamic List Tag">
<description>A list of files belonging to the same dynamic list value can be linked from the Intranet.</description>
<select>
<option label="test1" value="test1" />
</select>
</item>
</ruleset>
</substitution>
XML
~Jeff
Dmitry
Very nice... thanks a lot!
Dmitry
Yep.. you are right it was the space.. I can't believe a space would make a difference like that and cause me so much grief!
Adam Stoller
The main problem with 'hereis' statements in Perl has to do with code indenting. A number of editing applications - and sometimes well-meaning code writers - tend to accidently indent the end of the 'hereis' statement, which then breaks the code.
Using qq() or even join("\n", ...) statements, though less efficient, tend to be less error-prone.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
jbonifaci
Well, if you indent the token's yourself, that wouldn't be a problem. I prefer to use here docs because it is significantly less likely that your text will contain the matching token than when using qq. That is why I actually view here docs as less error-prone, contrary to what you have said. You can slap whatever you want between your tokens and realistically don't have to worry about what is in the text. Using any other quoting method, you need to look through your text and ensure that any occurrences of your delimiter in your text are escaped. When quoting single line text I use qq. When quoting multi line text I always use here docs.
~Jeff
Dmitry
OK so there seems to be two different schools of thought here
Thanks a lot for your insight guys.