0

yml:include and yml:a not working

I've been working on this for a number of hours today. I'm sure I had things working yesterday, but for whatever reason, I just can't seem to make it work today. To attempt to simplify the problem I've gotten as simple as I can in my gadget xml file, see below:

CODE
    <Content type="html" view="YahooSmallView, default">
<![CDATA[
<div id='davesdiv'>Some Junk Here</div><yml:include params="/cgi-bin/ShowParams.pl" insert="davesdiv"></yml:include>
]]>
</Content>

For demo puposes, here is the current content of the "ShowParams.pl" script on my server:

CODE
#!/usr/local/bin/perl
use strict;
use LocalLib;
use CGI qw(:standard);
use Data::Dumper;
use XML::Simple;
use LWP::Simple;

print header();

my(%ParamHash) = ();

foreach my $param (param()){
$ParamHash{uc($param)} = param($param);
}

print "<pre>".Dumper(\%ParamHash)."</pre>";


Very Basic, just dump the contents of the GET or POST parameters into a <pre> tag. Below is the source of the page I get hitting the url in my browser:

CODE
<pre>$VAR1 = {};
</pre>


At this point I've tried every permutation I can think of to track the error to no avail. (this includes setting the params to the following variations both from within the gadget xml, and from within a script set as the href in a content section: "?ACTION=DoSomething", "ShowParams.pl?ACTION=DoSomething", /cgi-bin/ShowParams.pl?ACTION=DoSomething", and though the docs told me it wouldn't work: "http://mydomain:8080/cgi-bin/ShowParams.pl?ACTION=DoSomething"). Tailing both the access log and the error log while viewing the application preview, I never see the script getting called. The Firebug console in firefox does show a 404 error being returned by whatever ajax api YAP is using to fetch the desired content.

Any Help would be greatly appreciated, as pounding my head against the keyboard and reading docs has not gotten me anywhere thus far. I feel I must be missing something, so even if the answer is that I've done something foolish, I'd be glad to be educated.

I thank anyone kind enough to take a look at this for any help they can provide.

-Dave Mueller

P.S. The code here is Perl, as that is my language of choice, but I've tried some simple examples in php as well.

by
3 Replies
  • Update:

    A little more checking seems to indicate that the failure is directly related to the use of either insert or replace parameters when dealing with yml:a. The yml:include is still failed regardless of the presence of either of these options.

    Still working on it, thus far to no avail.
    0
  • Update Two:

    I've managed to work around my need to use these tags with the insert or replace parameters. I really intended to use the yml:a tag to replicate AJAX typed functionality with a YAP application. Though I still cannot make the YUI "YAHOO.util.Connect.asyncRequest" work as documented from within YAP, a code example demonstrating using the OpenSocial javascript API to make and AJAX request (found here) got me what i needed for now. Though this prevents me from using yml markup in the returned html, and is there fore a less elegant solution, it will at least do for now.
    0
  • Have you tried to remove the / in the params attribute of the yml:include?

    So it will look like this:
    <yml:include params="cgi-bin/ShowParams.pl" insert="davesdiv"></yml:include>

    Also make sure that the url http://<gadget-xml-host-url>/cgi-bin/ShowParams.pl is accessible
    0

Recent Posts

in YAP