Copy link to clipboard
Copied
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?
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, every
...Copy link to clipboard
Copied
I'm afraid we're going to need some code to look at. I can't tell much from what you've stated.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
... 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?
Copy link to clipboard
Copied
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:
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
I was referencing the solution posted by BKBK.
Specifically where it was suggested:
"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"
Now that I've done that, my Data Sources won't work. I doubled checked that the SQL account is viable and even tried adding a new one. No matter what I try, CF responds with:
Connection verification failed for data source: HODRRM
java.sql.SQLException: Timed out trying to establish connection
What is even more curious is that it's nearly an instaneous response.
To recap:
But, when I verify the Datasource in CF, I get the error mentioned above.
Further, when I attempt to view a .cfm page, it returns an error stating it cannot extablish communication with the SQL/Database.
I'm pretty sure I'm not an idiot, but something isn't working.
Copy link to clipboard
Copied
You're not an idiot, you're just not giving us enough information to be helpful. Help us help you.
Your response raises a bunch of questions right there. When you say "I can access SQL", are you using a Windows user account or a native SQL login? What network protocol are you using? What SQL client are you using?
There are several possibilities with your database connection:
- you're using a Windows user account that's different from what CF is using, and the CF user account doesn't have access permissions,
- you're using a different network protocol than TCP/IP, which is the only one CF supports,
- you're using a different database name to connect than CF uses via TCP/IP
Maybe it would be helpful for you to take some screenshots, mask out any sensitive data we don't need to see, and post those.
Dave Watts, Eidolon LLC
Copy link to clipboard
Copied
Thank you for your patience. I've never had a box come apart like this on me before.
As suggested, the following is additional information broken down using screenshots.
Here are a few basic OS answers:
And to answer an earlier question: CF and SQL are on the same server. We have a VPS hosted box with Hostek.
CF
First, this is the CF admin view showing part of the Data & Services \ Data Sources screen showing the Connected Data Sources. This is indicative, I think, of the problem.
Note, error message when clicking the verify button.
Connection verification failed for data source: HODRRM java.sql.SQLException: Timed out trying to establish connection.
Next, is the edit view for the entry HODRRM. This is the critical one.
The CF Data Source Name, User Name and Password match the application.cfm file entries.
In turn, those are the values called by the various CFSTOREDPROC appearing throughout the website.
From the CF admin, here a few select entries from Server Settings/Settings
SQL
This is the login to Microsoft SQL Server Management Studio (Administrator).
Next, we expand out the list of Databases. Important note, there are 5 listed, but only two are in use. Of the two, bigspring is rarely used while the one I need to connect with is HODRRM.
Next, we expand Security to expose the logins. All unrelated logins are masked. Bigspring is shown only for reference.
Right clicking on HODRRM and selecting properties shows the following. Again, the login name and password are the same as what was entered into CF.
Drilling down, I’m guessing this matters, is the Status screen.
I can also use the login account, HODRRM, to login to Microsoft SQL Server.
Then, of course, I can expand the listing for HODRRM.
Have I missed anything that would prove helpful?
I did create another Data Source, with a slightly different name, in hopes a new Data Source would resolve the issue, but it didn't work.
I know, I know, deep in my little brain, this is going to be one of those "oh, yeah your whizzydue thing wasn't screwed in all the way..." or "your whizzleflop has expired" or something to that effect.
Thanks!
Copy link to clipboard
Copied
It's definitely a whizzleflop issue. Seriously, you provided a great response!
There are a couple of things it could be. First, even though CF and SQL Server are on the same machine, you have to tell CF everything needed to connect using TCP/IP, including the machine name or IP address. So, you should be able to resolve the name from a command prompt. You can usually use "localhost" if they're on the same machine. You should also take a look at the SQL Server Network tool to make sure it's listening for TCP on the name and port you're using in CF. Try checking those and let us know.
Dave Watts, Eidolon LLC
Copy link to clipboard
Copied
Thanks @Dave Watts,
I managed to check most of your suggestions with my Hosting Company's support finally responded. I'm going to pause for a bit to let them wade in and fix what is broken.
Thanks for everything to date!
Copy link to clipboard
Copied
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?
Copy link to clipboard
Copied
@BKBK, They are set at 4000 and 350 respectively
Copy link to clipboard
Copied
@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:
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>
Copy link to clipboard
Copied
@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.
Copy link to clipboard
Copied
I can accept that, but for the moment, I can't do anything due to the disconnect between CF and SQL.
Copy link to clipboard
Copied
OK. First, try the suggestions others have given and let us know the result.
I then have more questions:
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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. 🙂
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
Understood, so it's a helpful test case from which all can learn. 🙂
Copy link to clipboard
Copied
Thanks @ealanjones for sharing the solution.