Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8194033
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T04:41:04+00:00 2026-06-07T04:41:04+00:00

I have to debug an Ajax Coldfusion8 application from a remote access point and

  • 0

I have to debug an Ajax Coldfusion8 application from a remote access point and am struggling to get anything to work.

The system works fine on my localhost but on the production server, I’m getting nowhere with nowhere being the page loads fine but all Ajax requests go into oblivion (commit error) without triggering a Coldfusion error.

My AJAX setup is as follows:

1). Setup

$(document).on( "click", '.su, .cu' , function() {      
     var form = $(this).closest('form'),
         switcher = form.find('input[name="form_sub"]').val(),
         service = "../serve/form_user.cfc",
         method = "process",
         returnformat = "JSON",
         targetUrl = "",
         formdata = form.serialize()+"&method="+method+"&returnformat="+returnformat,
         successHandler = function() {
              alert("hello")
              };
    ajaxFormSubmit( form, service, formdata, targetUrl, successHandler, "no" );
    return false;
    });
  1. make AJAX call

    var ajaxFormSubmit = 
        function ( form, service, formdata, targetUrl, successHandler, dataHandler ){
          $.ajax({  async: false, type: "post", 
                    url: service, data: formdata, dataType: "json",
             success: function( objResponse ){
            if (objResponse.SUCCESS){
              alert("success!");
              successHandler( objResponse )
              }
        })
    }
    
  2. Server Side
    On the server side I have a “master-slave” cfc-setup. There are type-cfcs (user, whatever), which are extensions of a main form_switch like so:

Both files are mapped from application.cfc like so:

THIS.mappings["/controllers"] = GetDirectoryFromPath( GetCurrentTemplatePath() ) & "controllers";
THIS.mappings["/serve"] = GetDirectoryFromPath( GetCurrentTemplatePath() ) & "services";

The type cfc extends to the form_switch

// user cfc
<cfcomponent extends="controllers.form_switch" output="false"> 
...
</cfcomponent>

The form_switch itself does all the basic stuff like validation and calling database commit in the type.cfc. Looks like this:

<cfcomponent output="false" hint="switchboard for form handling">
...
   // function called by AJAX
   <cffunction name="Process" access="remote" returntype="struct" output="false">

       <cfset var LOCAL = {} />
       <cfset LOCAL.Response = { Success = true, Errors = [], Data = "" } />

       // set form data
       <cfif IsStruct( ARGUMENTS[ 1 ] )>
           <cfset THIS.SetFormData( ARGUMENTS[ 1 ] ) />
       <cfelse>
           <cfset THIS.SetFormData( ARGUMENTS ) />
       </cfif>

       // validate
       <cfset LOCAL.Response.Errors = THIS.Validate() />

       // commit
       <cfif ArrayLen( LOCAL.Response.Errors )>
           <cfset LOCAL.Response.Success = false />
           <cfset LOCAL.Response.Errors = serializeJSON(LOCAL.Response.Errors)>
       <cfelse>
           <cftry>               
           <cfset LOCAL.Response = THIS.Commit() />
           <cfcatch>
                  <cfset LOCAL.Response.Success = false />
                  <cfset LOCAL.Response.Errors = [["server_error","commit error"]] />
           </cfcatch>
           </cftry> 
       </cfif>
      <cfreturn LOCAL.Response />
   </cffunction>
</cfcomponent>

I’m clueless why it does not work and even worse I’m guessing blind why?

The ajax returns “commit error”, so I’m reaching *form_switch* alright.

Question: How can I debug this?
I tried:
Dumping to screen > does not work as I’m using AJAX.
Dumping to file (I have the full path of the server and I can access the server, so I set up a dump.txt and tried

 <cfdump output="F:\full\path\to_root\dump.txt" label="catch" var="hello"> 

but this gives me a 505 error email with

 Diagnose: An error occurred when performing a file operation write on file F:\full\path\to_root\dump.txt

I can’t use the CF admin AJAX debugging because I don’t have access to the CFAdmin from remote.

What else can I do? Also, if someone knows what the problem might be… answers are also welcome… Must be something basic, like messed up mappings or not having some sort of user privilige on the server …I assume?

THANKS!

And it’s Coldfusion8 and MySql 5.0.88 …. with production being MySQL 5.5, but this is another issue I think.

EDIT:
Ok. I have to use e:\ and E:\ to write to dump.txt from application.cfc. But it still does not work from form_switch.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T04:41:06+00:00Added an answer on June 7, 2026 at 4:41 am

    Have you tried calling your cfc method directly in the browser using url parameters instead of the post you would do from AJAX?

    Stick a cfdump in the catch with a cfabort.

    Call your cfc like this:
    http://yourdomain.com/serve/forms users.cfc?method=process&arg1=qwe&arg2=963

    This should either give you a result from your method or a dump of the error

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have AJAX requests from which I get a JSON-format response, which is being
I am writing a desktop and j2me application. I have debug statements in program.
I am looking to have a portable debug class since i plan to work
Man, I'm having a rough day. I have a ASP.NET 2.0 application with AJAX
I have the following ajax request: jQuery.ajax({ async: true, type: GET, url: url, data:
I have a Struts 1 application that uses a little bit a Ajax to
I have a spring 3 application where i am using jquery to post ajax
I have the following script which I want to debug: function getTabFrame() { $.ajax({
I have an ASP MVC3 application that runs fine (in VS 2010 debug) in
The setup I have an MVC application that's making AJAX requests into my controller.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.