Skip to main content
September 14, 2010
Question

I don't understand this error

  • September 14, 2010
  • 4 replies
  • 1364 views

This error is saying I have nested cfoutput tags accessing a query, but I don't.

Here is the error:

Invalid tag nesting configuration.

A query driven cfoutput tag is nested inside a cfoutput tag that also has a query attribute. This is not allowed. Nesting these tags implies that you want to use grouped processing. However, only the top-level tag can specify the query that drives the processing.

Here is my code:

        <cfoutput query="checkuser">
        <cfloop index="i" from="1" to="#ArrayLen(mobile.fields)#">
            <cfif i EQ 1 OR NOT mobile.dynamic OR form.mobileDisplayed GTE i>
                <cfparam name="form.areacode_#i#" default="">
                <cfparam name="form.prefix_#i#" default="">
                <cfparam name="form.suffix_#i#" default="">
            <div class="fieldBlock phoneBlock" id="phoneBlock#i#">
                <label for="areacode_#i#">
                    <cfif mobile.fields.required><span>*</span></cfif>
                    <cfif mobile.fields.displayIcon><img src="/images/sm_phone.jpg" /></cfif>
                    #mobile.fields.label#:
                </label>
                <div class="inputBlock">
                    <input type="text" maxlength="3" onKeyUp="numTyped(this, 'prefix_#i#', 3, event)" name="areacode_#i#" id="areacode_#i#" class="areacode" value="#checkuser.PHONENUMBER.sub_user_number#" />
                    <input type="text" maxlength="3" onKeyUp="numTyped(this, 'suffix_#i#', 3, event)" name="prefix_#i#" id="prefix_#i#" class="prefix" value="#form['prefix_' & i]#" />
                    <input type="text" maxlength="4" name="suffix_#i#" id="suffix_#i#" class="suffix"  value="#form['suffix_' & i]#" />
                    <cfif StructKeyExists(mobile.fields, "voice") and mobile.fields.voice>
                        <div class="voice" id="voice#i#">
                            <input type="radio" value="0" name="voice_#i#"<cfif Not StructKeyExists(mobile.fields, "voiceChecked") or Not mobile.fields.voiceChecked> checked="checked"</cfif> />
                            <label>Text</label>
                            <input type="radio" value="1" name="voice_#i#"<cfif StructKeyExists(mobile.fields, "voiceChecked") and mobile.fields.voiceChecked> checked="checked"</cfif> />
                            <label>Voice</label>
                        </div>
                    </cfif>
                    <cfif StructKeyExists(mobile.fields, "toolTip") and mobile.fields.toolTip neq "">
                        <div class="toolTip" id="toolTip_#i#" title="#mobile.fields.toolTip#" onClick="alert('#mobile.fields.toolTip#')">?</div>
                    </cfif>
                </div>
                <!--- This number was invalid or if geocoding failed, and they've picked a carrier to override, display the carrier override dropdown--->
                <cfif ListFindNoCase(invalidMobileIndexList, i) or ( showMap and IsDefined("form.carrierOverride" & i) )>
                    <div id="carrierOverrideBox#i#" class="carrierOverrideBlock">
                        <label>Carrier:</label>
                        <div class="inputBlock">
                            <select name="carrierOverride#i#" id="carrierOverride#i#">
                                <option value="-1">-- Pick your carrier --</option>
                                <cfloop query="carriers">
                                    <!--- 1111 is voice, 0 is NONE, don't display  --->
                                    <cfif Not ListFindNoCase("0,1111", carriers.carrier_id)>
                                        <option value="#Trim(carriers.carrier_id)#"<cfif IsDefined("form.carrierOverride" & i) and form["carrierOverride" & i] eq Trim(carriers.carrier_id)> selected="selected"</cfif>>#Trim(carriers.carrier_title)#</option>
                                    </cfif>
                                </cfloop>
                            </select>
                            <a href="http://www.inspironlogisticscontact.cfm?account_id=#account_id#&carrierOverride=1"
                                   title="Carrier help"
                                   onClick="window.open('http://www.inspironlogisticscontact.cfm?account_id=#account_id#&carrierOverride=1','#account_id#','width=500,height=800,scrollbars=no,screenX=100,screenY=100,top=100,left=100,resizable=1'); return false;"
                                  >?</a>
                        </div>
                    </div>
                </cfif>
                <cfif mobile.dynamic AND i EQ form.mobileDisplayed AND i LT ArrayLen(mobile.fields)>
                <div class="dynamicAddBlock dynamicAddMobileBlock" id="dynamicAddmobile_#i#">
                      <a href="javascript: submitAddField('mobile')">#mobile.dynamicLabel#</a>
                </div>
                </cfif>
            </div>
            </cfif>
        </cfloop>
        <cfif mobile.dynamic>
            <input name="mobileDisplayed" id="mobileDisplayed" value="#form.mobileDisplayed#" type="hidden" />
        </cfif>
        <input name="carrierOverrideActive" id="carrierOverrideActive" value="<cfif carrierOverrideActive>1<cfelse>0</cfif>" type="hidden" />
       
</cfoutput>

    This topic has been closed for replies.

    4 replies

    ilssac
    Inspiring
    September 14, 2010

    As Adam implies, look at the entire page.

    And if that does not show the problem.  You will need to follow your entire program stack.  Is this code included into another file?  Or other code reuse mechanisms.

    Inspiring
    September 14, 2010

    The code you presented does not have nested cfoutputs.  Is it possible that this code is inside another cfoutput?

    Inspiring
    September 14, 2010

    Is that the entire template?

    --

    Adam

    September 14, 2010

    no, its over 2000 lines. I am trying to work with someone elses code. I did a Find and Replace through the entire

    page and can't find another cfoutput calling a query.


    ilssac
    Inspiring
    September 14, 2010

    What version of ColdFuion?

    There was a time when nested <cfoutput...> tags where not allowed with our without the query parameters.

    I mention this, even though your error message seems to indicate a more mordern version of ColdFusion.

    September 14, 2010

    Does a CFLOOP that accesses a query nestedinside a CFOUTPUT that access a query cause this error?

    Inspiring
    September 14, 2010

    Nope.

    That error is - in my experience - only ever caused by exactly what it says...

    --

    Adam