• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

CFAJAXPROXY COLDFUSION 8 BUG DISASTER

Explorer ,
May 15, 2008 May 15, 2008

Copy link to clipboard

Copied

I don't know if this is just a problem with my specific installation or if its a cf 8 distribution-wide bug, so if someone could help me confirm that and help me solve it I will be so greatful! I've lost almost a full day during a critical period of my work trying to figure out why all of my cfajaxproxy tags stopped running the CallBackHandlers after they ran.

The cfc called by the ajaxproxy runs fine, but the callbackhandlers never work. After several hours of troubleshooting, I started testing a simple page with only a cfajaxproxy with a cfc that had literally no code to run inside the function other than a cfreturn. Still the same thing, no callbackhandler... Finally I figured out that when I commented out the link tag that includes my css file, the cfajaxproxy callbackhandler was run!

So I then went to work trying to figure out what exactly in my css file was causing this - I commented out the entire contents of the css file and when included in my file with the cfajaxproxy, it STILL broke it. So then I figured it was the link tag and decided as a work around to just take all my css out of the css file and paste it directly into my cfajaxproxy test file wrapped in a <style> tag and it still broke it! I deleted all the code from inside the <style> tag and just left a blank <style></style> tag and it still broke it. Sure enough when I comment out the style tag, everything works fine.

Please help me!!! I cant go without css on this project and I have a deadline cruising toward me, ready to eat me alive!

Thanks,
D
TOPICS
Advanced techniques

Views

850

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 15, 2008 May 15, 2008

Copy link to clipboard

Copied

can tell you one thing: it works just fine for me. css or no css, inline
or external files - it works.

which server OS? which browsers have you tesed it in?
have you tried debugging your ajax calls? add ?cfdebug=true to your url
to start ajax debugger. make sure it is enabled in cf administrator first.

where in your page do you have your <cfajaxproxy> tag? i tend to put it
even above the doctype declaration.
post your code - this will help.
do your js functions in your page follow the required format with cf
ajax features: functionname = function() instead of function functionname()?

start by answering the above and posting the sample code.

Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 15, 2008 May 15, 2008

Copy link to clipboard

Copied

Azadi, I appreciate your response. I was just coming back to update this topic actually. I found another clue and a suitable work-around at least. I went in to test and realized that I had never put the css directly into the test file that was calling the ajaxproxy, my css, whether by <style> or <link> was being called by my application file and when I moved it out of the application file it works fine with css and ajaxproxy. I mean its still a bit of a bummer because it means I now have to add the <link> tag to every template in the directory, but hey, I can live with it.

I am on a windows 2003 server, tested it with mozilla, ie and safari - same in all. No, my functions did not match the required format, but I changed them and it didnt make a difference.

I have debugged it with cfdebug and it looks the same regardless of whether I have the link in the application and NOT working and when I have it in the template file and it does work, so cfdebug isnt much help.

Do you have your css file included via the application.cfm file by any chance?

Hm... This is so bizarre.

D

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 15, 2008 May 15, 2008

Copy link to clipboard

Copied

well, that is documented and expected behaviour:

anything you output in your application.cfm file, like your stylesheet,
gets attached to EVERY request, ajax or not.

that will break ajax requests as returned data will no longer be
properly formed js/json/whatever.

that is one of the reasons it is NOT advised to output ANY html code in
Application.cfm/cfc

i can't recall now if onRequestStart.cfm template was being attached to
ajax calls... i have totally switched over to using Application.cfc and
never really used onRequestStart/End templates before...


Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 15, 2008 May 15, 2008

Copy link to clipboard

Copied

-

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 15, 2008 May 15, 2008

Copy link to clipboard

Copied

quote:

Originally posted by: Dstharding
well, that is documented and expected behaviour:



I've been looking everywhere for this documentation. Browsing and searching has yielded no result. A pointer would be helpful.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 15, 2008 May 15, 2008

Copy link to clipboard

Copied

LATEST
Hmm... Maybe I just don't understand the actual definition of html output, because there isnt any html output in my Application.cfm, its just a css include with style elements - no output. Would a style sheet without anything output to the viewport be considered html output? Style shouldnt effect the way behind-the-scenes ajax works? I mean, ajax seems like it would be like my girlfriend - doesn't care how fancy the text is dressed, just that it doesn't show up late 😉 ...

D

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation