WPC - Custom Web Form - Cannot render container

I've created custom web form for WPC (wpc_utg_sitelink) and gone through customizing provided in
It looks fine at designtime.
In runtime i get following:
Cannot render container : Could not load stylesheet.com.sap.engine.lib.xml.util.
NestedException: Error parsing query. -> java.lang.ArrayIndexOutOfBoundsException
are there errors in my wpc_utg_sitelink.xsl file syntax?
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
<xsl:output method="html"/>
<xsl:template match="/">
<xsl:if test="starts-with(document/elements/element[@type='image'],'/')"></xsl:if>
<xsl:if test="string-length(document/elements/element[@type='itemlink']/@rid)!=0">
<xsl:attribute name="href">
<xsl:value-of select="wpc:getAccessLink(string(document/elements/element[@type='itemlink']/@rid))"/>
<xsl:if test="document/elements/element[@type='itemlink']/@targetnew='true'">
<xsl:attribute name="target"> new </xsl:attribute>
<xsl:value-of select="document/elements/element[@type='title']" disable-output-escaping="yes"/>
<xsl:if test="document/properties/property[@type='isnew']/@value)='true'">
<xsl:value-of select="document/elements/element[@type='text']" disable-output-escaping="yes"/>
Or may be some problems in customizing?
Edited by: Ivan O. Ivanov on Sep 21, 2009 5:15 PM


Similar Messages

  • WPC - Custom Web Form: DOMException: Root Element is already present

    Hi experts,
    I'm trying to create a custom web form for my companies portal and I'm facing the following problem:
    I can create create articles with my new webform and everything is fine, but when the XSL Transformation is happing (eg. for viewing the content) i got following exception:
    Cannot render container : com.sap.engine.lib.xml.util.NestedException: org.w3c.dom.DOMException: Root Element is already present, cannot be appended as a child. -> org.w3c.dom.DOMException: Root Element is already present, cannot be appended as a child.
    I don't understand of which root element the parser is talking. Unfortunately I can't find any additional info to this.
    This is my Editor Document:
    <documenttype id="wpc_informatics_article" description="wpc_informatics_article" showpreview="true" showelementlist="true">
        <property id="name" description="xml.xlbl.name" type="inputfield" size="25" isrequired="true" isfilename="true" />
        <property id="createdBy" description="xml.xlbl.created_by" type="peoplepicker" size="25" isrequired="true"/>
        <property id="includeInRSS" description="xml.xckl.include_in_rss" type="checkbox" defaultvalue="false" property="wpc_wcm_rss"/>
        <property id="displayNewIcon" description="xml.xckl.display_new_icon" type="checkbox" defaultvalue="false" property="wpc_wcm_new"/>
        <element id="heading1" description="xml.xlbl.heading1" type="inputfield" default="true" singleinstance="true" size="75" maxlength="75" nodelete="true"/>
        <element id="heading2" description="xml.xlbl.heading2" type="inputfield" size="50" default="true" />
        <element id="paragraph" description="xml.xlbl.paragraph" type="htmleditadvanced" default="true" />
        <element id="relatedLinks" description="xml.xlbl.related_links" type="wpclink" hastitle="true" />
    The created example content:
    <document document="wpc_informatics_article">
        <property type="name" prop_ns="http://sapportals.com/xmlns/cm" prop_name="displayname"/>
        <property type="createdBy">USER.R3_DATASOURCE.FAH</property>
        <property type="includeInRSS" prop_ns="wpc_wcm" prop_name="wpc_wcm_rss"/>
        <property type="displayNewIcon" prop_ns="wpc_wcm" prop_name="wpc_wcm_new"/>
        <element type="heading1">asdf</element>
        <element type="heading2">asdf</element>
        <element type="paragraph">adsfsadfsadfsadf</element>
    and the xsl
    <?xml version="1.0"?>
    <!DOCTYPE stylesheet [
    <!ENTITY apos  "'" ><!-- replace &apos; with html escape character for ' -->
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:wpc="com.sap.nw.wpc.km.service.editor.hslt.XsltHelperCore">
      <xsl:output method="html"/>
      <xsl:template match="/">
        <h1 id="informatics_h1"> <xsl:value-of disable-output-escaping="yes" select="document/elements/element[@type='heading1']" /> </h1>
        <h2 id="informatics_h2"> <xsl:value-of disable-output-escaping="yes" select="document/elements/element[@type='heading2']" /> </h2>
        <xsl:for-each select="document/elements/element">
          <xsl:if test="@type='paragraph'">
            <xsl:value-of disable-output-escaping="yes" select="current()" />
          <xsl:if test="@type='relatedLinks'">
            <div id="informatics_related_links"> Siehe auch: <a>
              <xsl:attribute name="href"> <xsl:value-of disable-output-escaping="yes" select="wpc:getAccessLink(string(@rid), string(/document/@locale))"/> </xsl:attribute>
              <xsl:value-of disable-output-escaping="yes" select="@heading1"/> </a> </div>
    maybe someone of you can help me with this! thank you in advance!

    I found a solution for this.
    It seems that all of the XSL Transformation has to be covered by a div tag with css classes featurebox clearfixleft.
    <?xml version="1.0"?>
    <!DOCTYPE stylesheet [
    <!ENTITY apos  "'" ><!-- replace &apos; with html escape character for ' -->
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
        <xsl:output method="html"/>
        <xsl:template match="/">
         <div class="featurebox clearfixleft">
           <h2 id="informatics_h1">
                   <xsl:value-of disable-output-escaping="yes" select="document/elements/element[@type='title']" />
         <xsl:for-each select="document/elements/element">
                 <xsl:if test="@type='heading1'">
                        <h2 id="informatics_h2">
                            <xsl:value-of disable-output-escaping="yes" select="current()" />
                 <xsl:if test="@type='paragraph'">
                     <p><xsl:value-of disable-output-escaping="yes" select="current()" /></p>
    Edited by: Harald Falzberger on Mar 1, 2011 11:06 AM

  • WPC -Custom Web Form

    I am trying to create a custom news form in WPC.
    The news form will contain Title, abstract and detail on a form and it should render in the page with title as hyperlink, abstract and when they click on tilte it should show the detail in a new window.
    Trying to change the xsl so that it will open a new window and show the detail..but not successful.
    Please let me know if you have any suggestions for this.


  • FAQ web form throws - Cannot render container ERROR

    Hi All,
    I used FAQ web form to create a web page. In the FAQ web form i had given link to some document and also some internal links.
    After saving the web form and previewing did not throw any eror. But when attached to a role and accessed the page.. getting
    this ERROR  "  Cannot render container : An error occurred while loading the document from the resource content ".
    Can somebody tell me the reason for this .??

    Hi Archana,
    I have faced the same error like you. The /etc repository is not working. Please check whether the network share used by this repository is available. You can check also SAP Note 1178294 regarding /etc repository in cluster environment. The /etc repository is used by the XML forms. In your case, you used FAQ web form to create web page and the form is built using XML form.
    Good luck!!!
    Edited by: norfaeza mat noor on Jul 9, 2009 1:59 AM

  • WPC Error- Cannot render container : An error occurred while loading the do

    Dear All
    we are on SP13 / EP 7 ..we have created sites using WPC and when we try to trasnport with GUIDSs we got to know that SP13 does not suport GUIDs ..so i have deplyoed SP14 WPC abd the interfase looks differnt and it gives erros ..again i undeployed the SP14 WPC and deployed the SP13 WPC , after that interfase looks ok but we are getting an error in when we try to edit pages through WPC..
    following messgae appera when we open up a page to edit in WPC
    Cannot render container : An error occurred while loading the document from the resource content
    we found this exception in error log in Server..
    couldn't retrieve contents with id -1 com.sapportals.wcm.util.content.ContentException: couldn't retrieve contents with id -1
    #1.5 #00145ECC9C6700780000002500000B80000463656B4E6BC6#1235187149283#com.sapportals.wcm.repository.manager.cm.persistence.commonjdbc.DBContent#sap.com/irj#com.sapportals.wcm.repository.manager.cm.persistence.commonjdbc.DBContent.getInputStream(142)#myadmin#224##myportalci.keells_JPP_15308650#myadmin#212fdd70ffc811dda6de00145ecc9c67#SAPEngine_Application_Thread[impl:3]_24##0#0#Warning##Plain###Couldn't read content with ID -1. Select again...#
    #1.5 #00145ECC9C6700780000002600000B80000463656B4E78E6#1235187149283#com.sapportals.wcm.repository.manager.cm.persistence.DBContentInputStream#sap.com/irj#com.sapportals.wcm.repository.manager.cm.persistence.DBContentInputStream#myadmin#224##myportalci.keells_JPP_15308650#myadmin#212fdd70ffc811dda6de00145ecc9c67#SAPEngine_Application_Thread[impl:3]_24##0#0#Warning##Plain###couldn't retrieve contents with id -1#
    #1.5 #00145ECC9C6700780000002700000B80000463656B4E812B#1235187149283#com.sapportals.wcm.WcmException#sap.com/irj#com.sapportals.wcm.WcmException.WcmException(62)#myadmin#224##myportalci.keells_JPP_15308650#myadmin#212fdd70ffc811dda6de00145ecc9c67#SAPEngine_Application_Thread[impl:3]_24##0#0#Error##Plain###couldn't retrieve contents with id -1 com.sapportals.wcm.util.content.ContentException: couldn't retrieve contents with id -1
         at com.sapportals.wcm.repository.manager.cm.persistence.DBContentInputStream.getInternalStream(DBContentInputStream.java:345)
         at com.sapportals.wcm.repository.manager.cm.persistence.DBContentInputStream.<init>(DBContentInputStream.java:50)
         at com.sapportals.wcm.repository.manager.cm.persistence.BasicPersistenceDB.selectDocumentContent(BasicPersistenceDB.java:1632)
         at com.sapportals.wcm.repository.manager.cm.persistence.commonjdbc.DBContent.getInputStream(DBContent.java:143)
         at com.sapportals.wcm.repository.manager.cm.persistence.commonjdbc.DBContent.getInputStream(DBContent.java:95)
         at com.sapportals.wcm.repository.ContentImpl$ContentWithPrefetchedInputStream.<init>(ContentImpl.java:402)
    Please tell us how to fix this error

    Need to upgarde to SP14

  • WPC - Cannot render container

    Hi experts,
    We are having a problem with our WPC. The error is:
    Cannot render container : An error occurred while loading the document from the resource content
    The error happen quite often and normally it's back to normal after we restart the server. For your information, we are using EP 7.00 SP18.

    Apply Note No. 1178294 regarding /etc repository in cluster environment.

  • WPC Cannot render container with special characters

    My portal generates error: "Cannot render container : An error occurred while loading the document from the resource content" when i Finish editing my page. 
    The special characters that I use are words with accents only with capital letters (used in spanish like Á, É, Í, Ó, Ú)
    Any ideas on what could be causing this?
    Portal 7.01 SP06
    Jose Mercado

    I solve my problem, with  Sap Help.
    They send me: check the charset settings on client & J2EE as follows
    On Client side: Internet Explorer menu > Tools -> Internet Options -> Advanced
    please select 'Always send URLs as UTF-8'.
    On J2EE engine:  . It is important to check the parameter exists for all server nodes in config tool

  • Customer Visible in Sales Order Screen.But not visible in the customer Web form in R12

    Hi all,
    I have created  a customer of organization type using the customer API.I have also created a location and a customer account and account site as well
    The created values are loaded into the HZ tables and are visible in the tables such as hz_parties, hz_party_sites, hz_party_sits and so on.
    But the issue is that I cannot find the customer in the customer web form in the receivables.but at the same time it is visible in the sales order screen in the order management.
    so please, someone help me resolve this issue.
    Thanks and Regards,

    Hi Kate,
    Could you please share your form with me ([email protected]) so that I can investigate and correct this problem? Instructions on sharing can be found here:

  • Custom web form.

      I am trying to create custom web form for company news (with title, paragraph, one or more images). Can anyone direct me, if there is example xml/xsl file, I can start building on.

    Hi Srinivas,
    I'm happy if your problem is resolved. You should always open a new thread for a new questions and not discuss different questions in one thread.
    But here some short answers:
    >But the title of this window is weird. It shows "!cod.xtit.wpc_news! " as the title of this form.
    Just go through the document until the end. It tells you how to translated the labels in the form.
    >How can I make this form available for others to use ( like site owner, or author or editor).
    If the form is available in a specific folder (check allowed RIDS in chapter 3.2.2) if will be available for every user who has write rights in the folder (and can access the "New" menu).
    Again, open new threads for more specific questions and be more generous to the ones above the tried to help you solve your problem (there are yellow and green stars )
    Best regards,

  • New custom web form not visible in the menu.

    Hello WPC Experts,
      I created a new web form by following this pdf https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/2041eb17-6001-2b10-b08d-b95ce55fa9b7
    After the "3.2.6 Referencing the XML File in the Document Type" step and restarting the server, I don't see the web form I just created.
    I have the wpc_editor_role assigned. Where should I be looking to access the new web form.

    Hi Anja,
    Thanks for your response. I was working on other issues. I confirmed that I enabled "Generate UI-command" for my new Web Resource Type.
    I deleted the xml/xsl files and recreated them by copying from the how to guide: https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/2041eb17-6001-2b10-b08d-b95ce55fa9b7
    After referencing the xml/xsl files and restarting the portal, where should I check for the new web form I just created ( this is section "4. Result" in the how to guide).

  • Customized Web Form

    I have Scenario dim (Plan, Forecast) in Page and Year and Period in Columns (these two are placed in separate columns). I am now needed to show only Thisyear (Column A) or NextYear (Column B) based on the scenario selection in the page and click on Go. If the end user choses Forecast then web form should show only FY11 and months. If end user choses Plan then web form should show only FY12 and months. Can this be possible with customizing java script.
    I have written a sample code in ValidateData.js file and restarted planning service but nothing is showing when opening a web form. Please correct me if i am missing anything here.
    function customOnLoad() {
    if (equalsIgnoreCase(applicationName,"app1")) {
              if (equalsIgnoreCase(formName,"tempform")) {
         var correctScenarioinPage = findpageByMemberNames(new Array("Current"));
         if ((page == correctScenarioinPage) { alert("scenario selected is Current");

    JohnGoodwin wrote:
    endy wrote:
    I'm merely giving you the best practice, I love this saying, can you tell me who defines what best practice is, it is you, is it documentated somewhere?
    Hi John,
    You are right that there isn't clearly defined best practices, but using javascript customization for such a case seems a bit of an overkill, and I'm sure I'm not the only one who will recommend to avoid it in this case.
    As I don't see any obvious other alternative than simply using two forms, then I consider using two forms to be the best practice.
    I'm sure you have a lot more tricks up your sleeve than I do, but which solution would you consider to be the best here ?
    Cheers !

  • Customizing web form

    Hi, is it possible to edit my web form auto responder email to like this:
    There are 4 questions in my web form, and customers fill in 2 of the 4 questions, then in the email, it shows only the 2 questions and answers that they filled in.

    This is not possible to achieve as there are no further parameters to {tag_webformresults}. Hence the system email sent cannot be modified using any javascript code for the information captured via form submission.
    You can submit a ticket so the support can pass on this as a feature request on your behalf.
    Kind Regards,

  • Custome Web Form with User profile services

    I need some input to design webform which contain the data from user profile service and display in text box but using sharepoint 2013 Fiundation Env.
    So please can any one know how to user user profile service with sharepoint 2013 Foundation Versin

    Please refer to the Client-side people in SharePoint 2013.
    How to: Use the client-side People Picker control
    All you need to do is just add a div tag in your code and some JQuery code.
    <SharePoint:ScriptLink name="clienttemplates.js" runat="server" LoadAfterUI="true" Localizable="false" />
    <SharePoint:ScriptLink name="clientforms.js" runat="server" LoadAfterUI="true" Localizable="false" />
    <SharePoint:ScriptLink name="clientpeoplepicker.js" runat="server" LoadAfterUI="true" Localizable="false" />
    <SharePoint:ScriptLink name="autofill.js" runat="server" LoadAfterUI="true" Localizable="false" />
    <SharePoint:ScriptLink name="sp.js" runat="server" LoadAfterUI="true" Localizable="false" />
    <SharePoint:ScriptLink name="sp.runtime.js" runat="server" LoadAfterUI="true" Localizable="false" />
    <SharePoint:ScriptLink name="sp.core.js" runat="server" LoadAfterUI="true" Localizable="false" />
    <div id="peoplePickerDiv"></div>
    Place the above code in ContentPlaceholderMain.
    // Run your custom code when the DOM is ready.
    $(document).ready(function () {
    // Specify the unique ID of the DOM element where the
    // picker will render.
    // Render and initialize the client-side People Picker.
    function initializePeoplePicker(peoplePickerElementId) {
    // Create a schema to store picker properties, and set the properties.
    var schema = {};
    schema['PrincipalAccountType'] = 'User,DL,SecGroup,SPGroup';
    schema['SearchPrincipalSource'] = 15;
    schema['ResolvePrincipalSource'] = 15;
    schema['AllowMultipleValues'] = true;
    schema['MaximumEntitySuggestions'] = 50;
    schema['Width'] = '280px';
    // Render and initialize the picker.
    // Pass the ID of the DOM element that contains the picker, an array of initial
    // PickerEntity objects to set the picker value, and a schema that defines
    // picker properties.
    this.SPClientPeoplePicker_InitStandaloneControlWrapper(peoplePickerElementId, null, schema);
    Please mark it answered, if your problem resolved.

  • Custom compound element in custom web form.

    I would like to create a custom compound element that is a combination of paragraph and picture side by side.
    If the user didn't use the picture from this element, it still has to render as a normal paragraph, and vice versa.
    Can anybody give me ideas on how to go about it.
    Thanks a lot

    Hi Vishal,
      Here is the code in xsl:
    <xsl:if test="@type='paragraph'">
                   <p><xsl:value-of disable-output-escaping="yes" select="current()" /></p>
             <xsl:if test="@type='image'">
    Can you give me sample code on creating table. Does the table allow me to specify 60% paragraph and 40% image.

  • Custom Form Transport Render issues

    I have transported a custom wpc form from our Development server to our testing server.  After the transport all content items created with this custom form are displaying an error:
    Cannot render container:   An error occurred while loading the document from the resource content.
    Testing is supposed to start today but obviously can't until this issue is fixed - could someone please point me in the right direction for fixing this error?

    Hi TA,
    Please refer to the SAP Note : Note 1135576 - Transport of pages that contain iView references
    Also, refer to this thread
    Sandeep Tudumu

Maybe you are looking for