Skip to main content
ealanjones
Inspiring
October 13, 2023
Answered

Forms stopped posting values

  • October 13, 2023
  • 7 replies
  • 2235 views

Until this past spring, my sites CMS worked wonderfully. Multiple forms and processing pages.

Then, my admin applied a series of patches to ColdFusion and now, all forms stopped working. 

In every case, the processing file returns the error "Form.Xvalue not found in form "and of course stops everything cold. The form values should be passing from "WebEdit.cfm" to "webeditprocess.cfm".

Given this problem started with every form on the site at nearly the same time, and around the time of the patches, I'm inferring something is amiss on the server.

Before I post lines and lines of code, does anyone know of an admin level setting in cold fusion that would cause the issue?

Our server is running ColdFusion (2021 Release) Enterprise. Would that release make a difference?

This topic has been closed for replies.
Correct answer ealanjones

Hi Folks,

First, my apologies for not responding sooner. I should have, but was too excited when my problem was resolved.

Turns out, the issue had absolutely nothing to do with CF!

My co-administrator created a few URL rewrite rules to streamline out google reporting. One of those was designed to rewrite all URLs to a specific format. He forgot to mention this for several months (he may or may not get a Christmas card). Our new hosting vendor figured it out. The moment that rule was disabled, everything started working as before.
Thanks again everyone for your enthusiastic support.

 

7 replies

ealanjones
ealanjonesAuthorCorrect answer
Inspiring
December 11, 2023

Hi Folks,

First, my apologies for not responding sooner. I should have, but was too excited when my problem was resolved.

Turns out, the issue had absolutely nothing to do with CF!

My co-administrator created a few URL rewrite rules to streamline out google reporting. One of those was designed to rewrite all URLs to a specific format. He forgot to mention this for several months (he may or may not get a Christmas card). Our new hosting vendor figured it out. The moment that rule was disabled, everything started working as before.
Thanks again everyone for your enthusiastic support.

 

Charlie Arehart
Community Expert
Community Expert
December 11, 2023

Thanks for the update. Sadly, you'd opened saying, "my admin applied a series of patches to ColdFusion and now, all forms stopped working." This is one of those cases which show how even that specific scenario is often "wrongly accused", let alone cf in general.  🙂 

/Charlie (troubleshooter, carehart. org)
ealanjones
Inspiring
December 11, 2023

The admin did both the patches and the URL rewrite rules at the same time. I didn't know about the rewrite rules so my instinct was a CF problem.

BKBK
Community Expert
Community Expert
October 16, 2023

@ealanjones , It's okay for you to pile on the questions. But could you please answer the questions that others ask you? Be reminded that this is a discussion forum.

ealanjones
Inspiring
October 16, 2023

I can accept that, but for the moment, I can't do anything due to the disconnect between CF and SQL.

BKBK
Community Expert
Community Expert
October 16, 2023

OK. First, try the suggestions others have given and let us know the result.

 

I then have more questions:

  1.  What is your Operating System (version /build)?
         (I ask to verify compatibility with ColdFusion)
  2.  What is the brand and the version of the database you mentioned?
        (I ask to verify whether a JDBC driver might be needed)
  3.  What happens when you restart ColdFusion immediately after doing the cfpm-install-all?
        (I ask because some packages require a restart after installation)
BKBK
Community Expert
Community Expert
October 15, 2023
quote does anyone know of an admin level setting in cold fusion that would cause the issue

By @ealanjones

 

Yes. I have one more suggestion. Open the ColdFusion Administrator. Go to Server Settings > Settings.

 

Then scroll down to the section Request Size Limits . Note the values of 

Maximum number of POST request parameters

and
Maximum size of post data

 

Are the number of form fields in your application within these limits?

ealanjones
Inspiring
October 16, 2023

@BKBK, They are set at 4000 and 350 respectively

BKBK
Community Expert
Community Expert
October 20, 2023
quote

@BKBK, They are set at 4000 and 350 respectively


By @ealanjones

4000 form fields? Are you sure about that?

It seems excessive.

 

While you wait for a response from your provider, here is a test you can do. The test verifies two things:

  1.  whether a form can be sent;
  2.  whether ColdFusion can actually "see" the HODRRM datasource.

 

Just save the following page of code as formAndSQLTest.cfm, launch it and share the result with the forum.

 

<cftry>
<cfoutput>
<cfif isDefined("form.testText")>
    <p>
    The form was succesfully submitted. The test text is: #form.testText#
    </p>
<cfelse>
    <form action="#CGI.SCRIPT_NAME#" method="post">
    <label for="testText">Test text:</label><br>
    <input type="text" id="testText" name="testText"><br>

    <label for="testText">Submit to same page:</label><br>
    <input type="submit" value="Submit">
    </form> 
</cfif>
</cfoutput>

<!--- Login into Coldfusion Administrator. --->
 <cfset  createObject("component","cfide.adminapi.administrator").login("your_CF_administrator_password")>

<!--- Instantiate the data source object. --->
 <cfset  datasourceObject = createObject("component","cfide.adminapi.datasource")>

 <!--- Get a structure containing all the ODBC data sources --->
 <cfset OdbcDatasources = datasourceObject.getODBCDatasources()>
 
 <!--- Get a structure containing all the data sources --->
 <cfset datasources = datasourceObject.getDatasources()>

 <!--- Get the properties of the HODRRM datasourse --->
<cfset HODRRMdatasourceObject = datasources['HODRRM']>

 <!--- Dump HODRRM datasourse properties --->
 <cfdump var="#HODRRMdatasourceObject#" label="Properties of HODRRM datasource">

 <<cfcatch type = "any">
     <!--- If there is an error, dump it --->
    <cfdump var="#cfcatch#">
 </cfcatch>
 </cftry>

 

 

BKBK
Community Expert
Community Expert
October 15, 2023
quote

Our server is running ColdFusion (2021 Release) Enterprise. Would that release make a difference?


By @ealanjones

 

Yes, it might. Unlike previous ColdFusion versions, ColdFusion 2021 is modular. This means you can pick which packages to install in CF2021. So, it just might be that a package that your application needs was left out during installation. 

 

To check out that idea, here is a suggestion:

  • (Assuming you are on Windows) Open the Command Prompt (cmd) as Administrator;
  • Use the DOS cd command to navigate to  {CF2021_HOME_DIR}/cfusion/bin;
  • Type cfpm and press ENTER. You should get ColdFusion's package manager prompt cfpm;
  • Run the command install all

  • Keep running the command install all till the result is either an error or ColdFusion tells you that "All the packages are already installed".
  • If the former, then share the error message with the forum. If the later, then restart ColdFusion in the usual way, and see if that solves the problem.

 

ealanjones
Inspiring
October 16, 2023

Well, I tried the above... Now CF and SQL aren't speaking. I can't establish a connection between the two and they are even on the same server.

Please advise.

Community Expert
October 16, 2023

You've got to provide more information here. What exactly is "the above"? What exactly happened when you did the above? How is CF connecting to SQL Server: using native SQL logins or using Windows Authentication? What does your CF datasource for this SQL Server database look like?  Why were you getting the non-standard error message before? The more detail you provide, the fewer times you'll have to post and (hopefully) the fewer times we'll need to respond.

 

Dave Watts, Eidolon LLC

Dave Watts, Eidolon LLC
BKBK
Community Expert
Community Expert
October 15, 2023
quote... the error "Form.Xvalue not found in form and of course stops everything cold. The form values should be passing from "WebEdit.cfm" to "webeditprocess.cfm".

By @ealanjones

 

Are you sure that "Form.Xvalue not found in form" is the correct error message? That suggests that the code attempted to use the variable form.form.Xvalue, which is unlikely. In any case, I would expect ColdFusion's error message to say something like "Element X is undefined in FORM"

 

Which leads me to ask whether "Form.Xvalue not found in form" is a custom error generated by you or by a third-party component that you use. From your description, I would presume that the error occurs in webeditprocess.cfm. The error's stacktrace would have shown you the line where this happens. Could you share that line of code? 

Charlie Arehart
Community Expert
Community Expert
October 13, 2023

No, to both questions. 

 

And no, there's nothing in cf that would relate to the presence of form.xvalue on all forms. There's also no feature in cf that "controls all forms".

 

Is this one application or many? Are all going through some application.cfm or cfc that is itself "processing/assessing all forms"? It's possible, but not any standard practice--nor again any "feature" of cf.

 

I realize you feel this changed with a cf update. There must be some subtle connection if that's true, like a cf feature change that's affecting whatever code is involved in what I propose above.

 

In any case, solving it is rather simple for a cf developer. Solving bugs is their daily ritual. Are you perhaps just an admin for the site? This may take 5 mins of a developer's time. It might be impossible to solve in a forum like this.

 

While you can use any of many means to "find a developer" who might be willing to work on that, and maybe Paul here may be willing, I'll note that I help people solve such problems remotely daily, with a 15-minute minimum charge. I'm confident we could solve this. If you don't solve it otherwise, find more on my rates, approach, satisfaction guarantee, online calendar and more at carehart.org/consulting.

 

Or we'll all keep trying to help here. 

/Charlie (troubleshooter, carehart. org)
Legend
October 13, 2023

I'm afraid we're going to need some code to look at.  I can't tell much from what you've stated.