function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Does anybody know what can cause this error?

I am getting this error sometimes after a postback from a actionsupport component.  It doesn't happen all of the time so I can't detect any patterns to look for.  It is so vague I don't know where to start looking.  I have quote a few components that are used on the page but I don't know which one to start looking in.  Thanks for any clarity anyone can provide.


Component reference found with more than one child

I'd like to track this one down.  Can you narrow it down to a particular component on your page?  Can you open a support case for this?
Also are you using apex: composition somewhere?  The problem might lie in there somewhere, and might help us narrow this down a bit.

I am not using a composition.  A support case (02395724) has been opened.  I put the code for the component that I believe is causing the issue in the case.  It is a component that is inside the start facet for an actionstatus component.  It makes the actionsupport call that implements it look like the loading spinner that the enhanced lists show when gathering data.  The component has a javascript function inside of it.  I have since moved the function into a js file and use an apex:includescript inside the component to include it.  The error seems to have gone away but sometimes the page does not rerender when the actionsupport call is done.  If I change the actionstatus to use starttext instead of the facet I never have a problem with the page not rerendering properly.  So I suspect something inside of the component is causing an issue with the rerender.  I have included the component code here as well.


Code from Page:


<apex:inputField id="userorrole" value="{!Fieldx}" required="true">

<apex:actionSupport event="onchange" action="{!enableUserorRole}" timeout="20000" status="pageActionStatus" rerender="common"/>




<apex:actionStatus id="pageActionStatus" > <apex:facet name="start"> <c:Loading BackColor="#EEECD1" borderColor="#000000" borderstyle="solid" borderSize="1" height="35px" width="125px" ImageUrl="{!$Resource.AjaxAnimation}" Message="Loading..." messageStyle="color:black;font-size:11pt;font-weight:bold;"/> </apex:facet> </apex:actionStatus>





<apex:component > <!-- Attribute Definitions --> <apex:attribute name="BorderColor" type="String" required="true" description=""></apex:attribute> <apex:attribute name="Width" type="String" required="true" description=""></apex:attribute> <apex:attribute name="Height" type="String" required="true" description=""></apex:attribute> <apex:attribute name="BackColor" type="String" required="true" description=""></apex:attribute> <apex:attribute name="BackColor" type="String" required="true" description=""></apex:attribute> <apex:attribute name="BorderSize" type="String" required="true" description=""></apex:attribute> <apex:attribute name="ImageUrl" type="String" required="false" description=""></apex:attribute> <apex:attribute name="Message" type="String" required="false" description=""></apex:attribute> <apex:attribute name="messageStyle" type="String" required="false" description="Message inline style"></apex:attribute> <apex:attribute name="BorderStyle" type="String" required="false" description="Message box border style: solid, outset, inset, etc"></apex:attribute> <apex:includeScript value="{!$Resource.jsAlign}"/> <div id="salesforceSource_blurybackground" style="position:absolute; left:1px; top:1px; width:100%; height:100%; text-align:center; vertical-align: middle; background-color: #dcdcdc; opacity:0.6;filter:alpha(opacity=60)"> </div> <div id="salesForceSource_StatusBox" style="position:absolute; left:100px; top: 100px;width: {!Width}; height:{!Height}; opacity:1;filter:alpha(opacity=100)"> <table border="{!BorderSize}" cellpadding="0" cellspacing="0" style="border-left-color: {!BorderColor}; border-bottom-color: {!BorderColor}; width: {!Width}; border-top-color: {!BorderColor}; height:{!Height}; border-right-color:{!BorderColor}; border-style:{!BorderStyle}; background-color:{!BackColor};"> <tr> <td style="border-style:none;vertical-align:middle;text-align:center;{!messageStyle}"> <img src="{!ImageUrl}"/>{!Message}</td> </tr> </table> </div> <script type="text/javascript"> var AgreementForm = document.getElementById("salesforceSource_blurybackground"); = window.screen.availHeight + "px"; = window.screen.availWidth + "px"; var ContainerElem = document.getElementById("salesForceSource_StatusBox"); // = "block"; AlignToCenter(ContainerElem); </script> </apex:component>


AlignToCenter Function from JS file


function AlignToCenter(Element) { var availableHeight = 0; var availableWidth = 0; if (Element.ownerDocument) { var docElement = Element.ownerDocument.documentElement; availableHeight = parseInt(docElement.clientHeight); if (availableHeight == "NaN") availableHeight = 0; availableWidth = parseInt(docElement.clientWidth); if (availableWidth == "NaN") availableWidth = 0; } if (availableHeight == 0 || availableHeight == "NaN") availableHeight = window.screen.availHeight - 200; if (availableWidth == 0 || availableWidth == "NaN") availableWidth = window.screen.availWidth - 100; var msgBoxTop = parseInt((availableHeight - parseInt(Element.clientHeight))/2); var msgBoxleft = parseInt((availableWidth - parseInt(; if (msgBoxTop == "NaN" || msgBoxTop == 0) msgBoxTop = 100; = msgBoxleft + "px"; = msgBoxTop + "px"; }