Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ColdFusion: Bad Request error

Tags:

coldfusion

I almost never work with ColdFusion anymore. That said, I have one site that was just moved to another server and CF was updated to whatever its most stable version is. I think it was 8 when I programmed this. At any rate, when my form is submitted the following code is generating a "bad request" error (that's all it says in the browser window). I don't have access to the CF Administrator - basically, just FTP. Any ideas why the following code would generate a bad request error?

  <cfparam name="form.AutoArtID" default="1">
  <cfparam name="form.FWPriorityID" default="1">
  <cfparam name="form.totalFields" default="0">

  <CFLOOP FROM="1" TO="#form.totalFields#" INDEX="Counter">
    <cfset variables.FWPriorityID=F ORM[ "FWPriorityID_"& counter]>
    <cfset variables.AutoArtID=F ORM[ "AutoArtID_"& counter]>

    <CFQUERY NAME="Updateexbuildernew" DATASOURCE="Ikonltd">
        UPDATE artworknew SET FWPriorityID =
        <cfqueryparam value="#variables.FWPriorityID#" cfsqltype="cf_sql_integer" null="#not IsNumeric(variables.FWPriorityID)#">
        WHERE AutoArtID=
        <cfqueryparam value="#variables.AutoArtID#" cfsqltype="cf_sql_integer">
    </CFQUERY>
  </CFLOOP>



  <html>

  <head>
    <title>IKONLTD DATABASE ADMIN TOOL </title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <link href="../css/admin.css" rel="stylesheet" type="text/css">
    <script language="JavaScript" type="text/javascript" src="http://ikonltd.com/admin/js/drop_down_menu.js"></script>
    <script language="JavaScript" src="mm_menu.js"></script>
    <script language="JavaScript" type="text/javascript" src="http://ikonltd.com/admin/js/drop_down_menu.js"></script>
    <script language="JavaScript" src="mm_menu.js"></script>
  </head>

  <body>
    <script language="JavaScript1.2">
      mmLoadMenus();
    </script>
    <cfinclude template="../includes/topnav.cfm">
      <p>
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td colspan="2" valign="top">
              <h3 align="center">update artist artwork priority</h3>
            </td>
          </tr>
          <tr>
            <td width="32%" valign="top">&nbsp;</td>
            <td width="68%" valign="top">&nbsp;</td>
          </tr>
          <tr>
            <td colspan="2" valign="top">
              <p>PriorityIDs for <strong>Featured Works</strong> have been updated. <br>
                <br>
                <a href="priority1.cfm">Click here to further edit Featured Works Priority IDs.</a></p>

              <hr>
            </td>
          </tr>
        </table>

  </body>
  </html>
like image 291
phillystyle123 Avatar asked Jul 07 '26 05:07

phillystyle123


2 Answers

Solution came from server admin who has access to cf admin:

Had to increase the POST parameters in ColdFusion admin. 

like image 129
phillystyle123 Avatar answered Jul 10 '26 01:07

phillystyle123


I was getting issue because I was uploading a 30MB csv file and then was able to fix the issue by adjusting the 'Maximum size of post data'.

like image 36
Brenton Scott Avatar answered Jul 10 '26 01:07

Brenton Scott