0

yml:a view link to html

I've been experimenting with different ways to use yml:a. I have tried linking to a php file and to an html file. In this case the php file worked but the html file did not.

This works
<div id="about_php"><yml:a view="YahooFullView/about.php">About(php)</yml:a></div>

This does not work
<div id="about_html"><yml:a view="YahooFullView/about.html">About(html)</yml:a></div>

This is what I got from the dev preview
QUOTE
Oops. The app couldn't load for some reason. If you reload the page it might work. If you see this error more than once, please let us know.
Debug Messages:

Internal fetch error [url=http://devsanctum.com/myfavteam/about.html][reason=[http_code=405]]


Can anyone explain why it behaves differently?

by
4 Replies
  • Hi ryantxr,

    I've verified that this issue is occurring when an HTML file is specified. I've filed a bug for the problem to be resolved with the yml:a tag. Please hang tight until this may be resolved and, for now at least, use of a php file will be best.

    Thanks

    Jonathan LeBlanc
    Senior Software Engineer
    Yahoo! Developer Network

    QUOTE (ryantxr @ Nov 23 2008, 07:51 PM) <{POST_SNAPBACK}>
    I've been experimenting with different ways to use yml:a. I have tried linking to a php file and to an html file. In this case the php file worked but the html file did not.

    This works
    <div id="about_php"><yml:a view="YahooFullView/about.php">About(php)</yml:a></div>

    This does not work
    <div id="about_html"><yml:a view="YahooFullView/about.html">About(html)</yml:a></div>

    This is what I got from the dev preview


    Can anyone explain why it behaves differently?
    0
  • QUOTE (ryantxr @ Nov 23 2008, 07:51 PM) <{POST_SNAPBACK}>
    Can anyone explain why it behaves differently?


    The problem is that it's submitting a POST to the url, not a GET. When you post to that url, you get a 405 Method not allowed. Try this:

    CODE
    <form method="post" action="http://devsanctum.com/myfavteam/about.html">
    <input type="submit" value="Click me!">
    </form>


    The better solution, of course, is to fetch the specified url using the same method that was used to request the landing page. There's a bug to that effect in our queue right now, but there are a handful of issues around using GET. (Mostly regarding caching and OAuth signatures, some hairy stuff, not impossible, but tricky, and we don't want to break other things by fixing this.)

    For now, you can work around this by configuring your server to allow POSTing to html documents.
    0
  • I saw the same issue today. I created a basic html page on our company web server that itself points to javascript...but I got this error...should this code work fine? See code from this URL http://widgets.mndigital.com/sotd.html :

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
    <head>
    <title>Song of the Day</title>
    </head>
    <body>

    <!--MediaNet Digital Song of the Day Widget -->
    <script type="text/javascript" src="/widgets/mndigital.js?widget=sotd"></script>

    </body>
    </html>
    0
  • Hi Ted,

    I think the problem you are running in to with your sample is that script source includes are not accepted by caja (see: http://developer.yahoo.com/yap/guide/what-...imitations.html). If you inline the JavaScript that should help solve the issue (unless caja has an issue with the js).

    Jonathan LeBlanc
    Senior Software Engineer
    Yahoo! Developer Network

    QUOTE (Ted T @ Feb 25 2009, 11:45 AM) <{POST_SNAPBACK}>
    I saw the same issue today. I created a basic html page on our company web server that itself points to javascript...but I got this error...should this code work fine? See code from this URL http://widgets.mndigital.com/sotd.html :

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
    <head>
    <title>Song of the Day</title>
    </head>
    <body>

    <!--MediaNet Digital Song of the Day Widget -->
    <script type="text/javascript" src="/widgets/mndigital.js?widget=sotd"></script>

    </body>
    </html>
    0

Recent Posts

in YAP