This discussion is archived
9 Replies Latest reply: Mar 31, 2008 1:10 PM by 666705 RSS

<pt:namespace pt:token="$$TOKEN$$"/> threw error

666705 Newbie
Currently Being Moderated
Not sure what I did wrong, when I tried to include <pt:namespace pt:token="$$TOKEN$$" xmlns:pt='http://www.plumtree.com/xmlschemas/ptui/'/> to get the portlet ID, then use it in a form <form id="Form$$TOKEN$$" method="post" runat="server">, it threw error:

Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: 'Form$$TOKEN$$' is not a valid identifier.


Am I missing something?

Thanks!

--
Edited by weichen at 03/25/2008 1:42 PM
  • 1. Re: <pt:namespace pt:token="$$TOKEN$$"/> threw error
    666705 Newbie
    Currently Being Moderated
    Usually means that pt_366 doesn't exist. View the source of the page, for the portlet which should have object 366, you shouldn't even see a reference to pt_366 in the view source.

    Usually when you load a portlet on a mypage, PTPortlet object gets created, then pt_xxx represents the portlet and its object id.

    The code you're using uses the object id. Having it say it's undefined means it can't find it on the page.

    I'd have to say how you using this code, what's the setup etc.
  • 2. Re: <pt:namespace pt:token="$$TOKEN$$"/> threw error
    666705 Newbie
    Currently Being Moderated
    This is really weird. It seems it is not finduing the PTPortlet object... you said it comes with the portal installation?

    What setting are you looking for?

    I just put a blank web form on a blank page:

    <html>
    <head>
    <title>WebForm1</title>
    <meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
    <meta name="CODE_LANGUAGE" Content="C#">
    <meta name=vs_defaultClientScript content="JavaScript">
    <meta name=vs_targetSchema content="http://schemas.microsoft.com/intellisense/ie5">
              <pt:namespace pt:token="$$TOKEN$$" xmlns:pt='http://www.plumtree.com/xmlschemas/ptui/' />
    </head>
    <body MS_POSITIONING="FlowLayout">
         
    <form id="Form1$$TOKEN$$" method="post" runat="server">

    </form>
         
    </body>
    </html>


    <br><br>
    and that threw the same error, here is the view source:
    <br><br>
    <tr><td colspan="2" class="portletBody"><div id="pt-portlet-content-366"><script type="text/javascript" >
    pt_366 = new PTPortlet('366', '{0E61EE4B-A83E-48A4-9465-3856754838B2}', 'testportlet', 'pt-portlet-content-366', 'http://localhost:80', 'http://localhost:80/AllstonOrgChart', 'http://localhost/portal/server.pt/gateway/PTARGS_0_0_366_203_0_43/', 'http://localhost/portal/server.pt/gateway/PTARGS_0_0_366_203_0_43/', 'false', 'http://localhost/portal/server.pt/gateway/PTARGS_6_0_366_203_206_43/');</script>
    <p><span class="alertErrorTitle"><img src="http://WIT1029/imageserver/plumtree/portal/public/img/icon_error.gif" alt="Error" border="0" height="20" width="20"/> Error</span>
    <span class="alertErrorDescription">testportlet cannot be displayed because the remote server returned an invalid HTTP response code.</span></p><p><span class="alertErrorSubtitle">We recommend:</span>
    &bull; Refresh testportlet
    &bull; Accessing this portlet at a later time.
    &bull; Contacting your portal administrator if problems persist.
    </p><!--Portlet request failed, the remote server returned HTTP error '500'. Portlet ID=366, User ID=200, URL='http://localhost/AllstonOrgChart/WebForm1.aspx'--><div style="display:block" id="pt-error-more-info-366">Detailed error information
    </div><div style="display:none" id="pt-error-info-expanded-366"><p>

    &bull; Response status: 500
    &bull; Response body:<html>
    <head>
    <title>Parser Error</title>
  • 3. Re: <pt:namespace pt:token="$$TOKEN$$"/> threw error
    666705 Newbie
    Currently Being Moderated
    Hello,

    Try to create portlet oriented code, remove all <html>,<body> tags because you can not use them in portlet. First, try "Hello" portlet to make sure all settings are ok. Then add just <form> anf <pt:namespace>. It has to work.

    Dmitry
  • 4. Re: <pt:namespace pt:token="$$TOKEN$$"/> threw error
    666705 Newbie
    Currently Being Moderated
    It is strange but it doesn't work, the "hello" works but as soon as I add <pt:namespac...>, it threw error. Do I have to re-install my portal?? Or is there any files I should check??
    <br><br>

    Parser Error Message: 'Form1$$TOKEN$$' is not a valid identifier.

    Source Error:


    Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

    Parser Error Message: 'Form1$$TOKEN$$' is not a valid identifier.

    Source Error:


    Parser Error Message: 'Form1$$TOKEN$$' is not a valid identifier.

    Source Error:


    Line 3: <pt:namespace pt:token="$$TOKEN$$" xmlns:pt='http://www.plumtree.com/xmlschemas/ptui/' />
    Line 4:
    Line 5: <form id="Form1$$TOKEN$$" method="post" runat="server">hello</form>
  • 5. Re: <pt:namespace pt:token="$$TOKEN$$"/> threw error
    666705 Newbie
    Currently Being Moderated
    This code works fine in my test.html:

    Hello
    <pt:namespace pt:token="$$TOKEN$$" xmlns:pt='http://www.plumtree.com/xmlschemas/ptui/' />
    <FORM name="FORM$$TOKEN$$" runat="server">
    </FORM>

    Results:

    <FORM name="FORM449" runat="server">
    </FORM>


    If you remove <pt:namespace> tag then there is no exception just form name will be as is - FORM$$TOKEN$$:

    <FORM name="FORM$$TOKEN$$" runat="server">
    </FORM>

    No gateway for this WS, no inline refresh.

    If it doesn't work for you there is something wrong in your environment. Try to clear browser cache, remove cache settings for WS, restart portal.

    --
    Edited by Bryazgin at 03/26/2008 12:48 PM
  • 6. Re: <pt:namespace pt:token="$$TOKEN$$"/> threw error
    666705 Newbie
    Currently Being Moderated
    Ok, here is the strange part, it doesn't like the $$, this works and it gets the portletID:
    <br><br>

    <pt:namespace pt:token="__TOKEN__" xmlns:pt='http://www.plumtree.com/xmlschemas/ptui/' />

    <form id="Form1__TOKEN__" method="post" runat="server">hello</form>


    <br><br>
    I have another question, how do I get PCC, does it come with portal installation also? The following gives me the alert and pops out of the portal page (master/detail), any config I need to specify in the WS for the PCC to work?

    <br><br>
                        if (document.PCC == null)
                        {
                             alert("Portlet Communication Component (PCC) is not available.");
                        } else {

    <br><br>
  • 7. Re: <pt:namespace pt:token="$$TOKEN$$"/> threw error
    666705 Newbie
    Currently Being Moderated
    it doesn't like the $$
    Hmm, seems like application server issue, which server do you use to host portlet code?
  • 8. Re: <pt:namespace pt:token="$$TOKEN$$"/> threw error
    666705 Newbie
    Currently Being Moderated
    if (document.PCC == null) { alert("Portlet Communication Component
    (PCC) is not available."); } else {
    Seems like code written for v5.*.

    Quote:"The Scripting Framework is a standard AquaLogic Interaction feature starting with version 6.0. (The PCC component is installed with versions 4.5 and 5.x.) ".

    http://edocs.bea.com/alui/devdoc/docs60/index.html
  • 9. Re: <pt:namespace pt:token="$$TOKEN$$"/> threw error
    666705 Newbie
    Currently Being Moderated
    Just IIS, not sure what happened to it, but well...

    Thanks for pointing out the 6 way of doing it, much easier and got it working. The code was just some test code written on 5, we went through the upgrade then I dig it out...