We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you two Citrix podcasts. Learn about 2020 trends and get answers to your biggest Citrix questions!Listen Now

x

cfinput error

mel150
mel150 asked
on
Medium Priority
909 Views
Last Modified: 2013-12-24
Oh-oh, I've done it now. I am getting these errors when I try to go to http://dev.mymagickitchen.com/catalog/index.cfm?fuseaction=cust_catalog&product_id=384&Cat_sort=1&rest_cat=0&drilldown=true&default_description=0&pageRef=current_month_cust&custom_cat=1&CFID=7105299&CFTOKEN=44840730

attributes.fuseaction: cust_catalog message: Context validation error for tag CFINPUT.
detail: The tag must be nested inside a CFFORM tag.
extendedinfo:
ErrorCode:
Type: Template

1 (31,0) C:\CFusionMX\wwwroot\WEB-INF\cftags\input.cfm
2 (21,0) C:\CFusionMX\wwwroot\WEB-INF\cftags\input.cfm
3 (17,0) C:\CFusionMX\wwwroot\WEB-INF\cftags\input.cfm
4 (45,0) F:\Inetpub\wwwroot\mymagickitchen_dev\catalog\includes\inc_dsp_product_on_menu_page.cfm
5 (162,0) F:\Inetpub\wwwroot\mymagickitchen_dev\catalog\dsp_cust_category_list.cfm
6 (236,0) F:\Inetpub\wwwroot\mymagickitchen_dev\catalog\index.cfm
7 (234,0) F:\Inetpub\wwwroot\mymagickitchen_dev\catalog\index.cfm
8 (6,0) F:\Inetpub\wwwroot\mymagickitchen_dev\catalog\index.cfm
9 (1,0) F:\Inetpub\wwwroot\mymagickitchen_dev\catalog\index.cfm
10 (1,0) F:\Inetpub\wwwroot\mymagickitchen_dev\catalog\index.cfm

 Can anyone see what the problem is in the code? Here it is:

<cfoutput>

      <cfif NOT IsDefined("categoryName") OR categoryName NEQ get_product_list.product_group_type>
      <cfset categoryName = get_product_list.product_group_type>
             <tr bgcolor="##FF5416"><td colspan="6" align="left"><IMG src="#request.imagesroot#/spacer.gif" ALT="" BORDER=0 width="10" height="1"><span class="head2" style="color: ##ffffff"><b>#categoryName#</b></span></td></tr>
      </cfif>
      
      <cfset i = 1 + #i#>
      
      <tr bgcolor="#IIf(CurrentRow Mod 2, DE('F5F5EB'), DE('ffffff'))#">
            <td align="center" ><img src="#request.imagesroot#/spacer.gif" ALT="" BORDER=0 width="10" height="1"></td>
            <td align="left">
                  <table border="0" cellspacing="0" cellpadding="0" width="100%" >
                        <tr>
                              <td><img src="#request.imagesroot#/spacer.gif" alt="" border=0 width="3" height="1"></td>
                              <td class="entrees" align="left" colspan="2">
                                    <cfif #get_product_list.heart# neq "">
                                          #get_product_list.heart#
                                    </cfif>
                                    <a href="index.cfm?fuseaction=dsp_nutrition&prodid=#get_product_list.id#&rest_cat=#rest_cat#&from_entrees=#from_entrees#&cat_sort=#cat_sort#&startitem=#i#&lastitem=#i#<cfif IsDefined('pageref')>&#pageref#</cfif>" CLASS="text"> <FONT COLOR="666600">#trim(get_product_list.name)#</FONT>...<i>learn more</i></a>
                              </td>
                        </tr>

                        <cfif #get_product_list.short_description# neq "" and #get_product_list.dsp_short_desc# eq 1>
                              <tr>
                                    <td><img src="#request.imagesroot#/spacer.gif" alt="" border=0 width="3" height="1"></td>
                                    <td><img src="#request.imagesroot#/spacer.gif" alt="" border=0 width="5" height="1"></td>
                                    <td>#get_product_list.short_description#</td>
                              </tr>
                        </cfif>
                        
                        <!--- Display the product ratings. --->
                        <cfinclude template="inc_dsp_product_ratings_on_menu_page.cfm">
                  
                  </table>                                    
            </td>
            
            <!--- If the product is a meal package then we won't display the quantity and price options. --->
            <cfif trim(get_product_list.name) EQ "Magic Meal Packages">
                  <td colspan="4" align="center"><a href="index.cfm?fuseaction=dsp_nutrition&prodid=#get_product_list.id#&rest_cat=#rest_cat#&from_entrees=#from_entrees#&cat_sort=#cat_sort#&startitem=#i#&lastitem=#i#<cfif IsDefined('pageref')>&#pageref#</cfif>" class="text"><font color="##666600"><i>Learn more...</font></i></a></td>
                  <!--- Decrement the count in this case so we don't mess up the product count. --->
                  <cfset i = i - 1>
            <cfelse>
                  <td align="center" class="entrees"><cfinput type="text" NAME="quantity#i#" VALIDATE="INTEGER" VALUE="0" MESSAGE="Please enter the quantity" size="1" style="width:20"></td>
                  <td align="center" class="entrees">$#NumberFormat(get_product_list.price, "__________.__")#</td>
                  <td align="center" class="entrees">
                        <cfif get_product_list.sizes eq 1>
                              <cfquery datasource="#request.maindsn#" name="get_sizes">
                                    select id,name from sizes where product_id=#get_product_list.id# order by sort_order
                              </cfquery>
                        <cfif get_sizes.recordcount GT 1>
                                    <select name="sizes#i#">
                                          <cfloop query="get_sizes">
                                                <option value="#get_sizes.id#">#get_sizes.name#
                                          </cfloop>
                                    </select>
                              <cfelse>
                                    <input name="sizes#i#" type="Hidden" value="#get_sizes.id#">#get_sizes.name#
                              </cfif>                                    
                        <cfelse>
                              <input type="hidden" name="sizes#i#" value="0">
                              N/A
                        </cfif>
                  </td>
                  <td align="center"  class="entrees"><input type="image" src="#request.imagesroot#/bag_mini.gif" name="submit_#i#" width="15" height="16" border="0"></td>
            </cfif>
      </tr>
      <tr><td colspan="6" ><img src="#request.imagesroot#/spacer.gif" alt="" BORDER="0" width="4" height="3"></td></tr>
      <tr><td colspan="6"><img src="#request.imagesroot#/spacer.gif" alt="" border="0" width="4" height="3"></td></tr>
      <input type="hidden" name="product_id#i#" value="#get_product_list.id#">

</cfoutput>

Thanks in advance, I'll keep looking in the meantime...
Comment
Watch Question

Commented:
mel150,

It's just as the message says, the <cfinput type="text" must be in a <cfform tag, I don't see your <cfform tag.

Regards
Plucka

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts

Author

Commented:
OK, that's got me looking :)...

in mymagickitchen_dev\catalog\dsp_cust_category_list.cfm, I have this code, which includes pulls the template for the code above, which was on mymagickitchen_dev\catalog\includes\inc_dsp_product_on_menu_page.cfm (does that make sense?) I think that's where the cfform tag is..:

<CFFORM ACTION="index.cfm?#request.urltoken#" METHOD="POST" NAME="form1">
                        <CFSET i=0>
                           <CFLOOP QUERY="get_product_list">
                          
                              <!--- Display each product on the menu page.--->                                
                              <cfinclude template="includes/inc_dsp_product_on_menu_page.cfm">
                          
                          </CFLOOP>                                
                          
                              <INPUT TYPE="Hidden" NAME="fuseaction" VALUE="buy">
                              <cfif #Rest_Cat# eq 0>
                                    <INPUT TYPE="Hidden" NAME="product_type" VALUE="3">
                              <cfelse>
                                    <INPUT TYPE="Hidden" NAME="product_type" VALUE="1">
                              </cfif>
                              <input TYPE="hidden" NAME="count" VALUE="#i#">
                              <input TYPE="hidden" NAME="Cat_sort" VALUE="#Cat_sort#">
                              <input TYPE="hidden" NAME="Rest_Cat" VALUE="#rest_cat#">
                              <input type="hidden" name="from_entrees" value="#from_entrees#">
                           <input TYPE="hidden" NAME="custom_session" VALUE="1">
                        <cfif isdefined("pageRef")>
                              <input TYPE="hidden" NAME="pageRef" VALUE="#pageRef#">
                        </cfif>                   
                    <TR><TD colspan="6"><IMG src="#request.imagesroot#/spacer.gif" ALT="" BORDER=0 width="4" height="3"></TD></TR>
      
                    <TR><TD colspan="2" align="right" height="35" VALIGN="TOP"><INPUT TYPE="IMAGE" src="#request.imagesroot#/nav/add_all_items.gif" name="add_all_items" width="150" height="20" BORDER="0"></TD></CFFORM>

Commented:
Well,

It's not being executed or not getting to it. The message is very clear:

attributes.fuseaction: cust_catalog message: Context validation error for tag CFINPUT.
detail: The tag must be nested inside a CFFORM tag.

I'm not familiar with fusebox but I know the CF messages are accurate.
I'd do a text search on your code pages affected by the error for CFINPUT - the page you pasted is odd because although it uses CFFORM, there are no CFFORM tags anywhere inside them - just regular HTML <input> tags.

I'd start looking for a closing CFFORM tag on "includes/inc_dsp_product_on_menu_page.cfm" since it gets inserted into your CFFORM on the page you displayed in your comments.  I've run in to these problems when I've inadvertently included a page into a form and the page I included had a form on it.  Nesting forms will cause all kinds of errors and broken functionality.
By the way, I'm guessing you found it since I see no error message when I view the pagelink you posted.  And as a side note - the food looks delicious. :D

Author

Commented:
thanks- I didn't really find it, I just uploaded the two pages again and it began to work. Thanks to you both for your help on this, I think the issue is we have two tired web developers working on it and we got our pages crossed.

 And thanks for the compliment on the food! It makes me hungry, working on this website. :)
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.