Coldfusion.Ajax.submitForm error - ajax

I have a site that uses AJAX almost exclusively to read and post data. While just leaving the page sitting for a while, without clicking around, I'll get the following error:
error 12031: ColdFusion.Ajax.submitForm: Error submitting form, id: nForm.
nForm is one of the form names, but it seems to happen to some others as well.
This seems to only happen in Internet Explorer, but I can't confirm that. Does this have to do with simultaneous calls to the database? Do I change something up in the ColdFusion administrator setting?
Any help would be greatly appreciated, I can provide more info if needed.

When given the choice in libraries to do AJAX with, you could use jQuery, from a group of people that have focused on making sure everything is cross-browser compatible, tests thoroughly, and fixes bugs; or you could use the built in library from Adobe who have always written poor, bug riddled client side code and have about the worst track record of fixing bugs that don't immediately affect their bottom line.
I love CF, but wouldn't touch that ajax library with a ten foot pole. Switch over to jQuery 1.9.x. It's better documented, better written, and there is a much broader range of developers that can help you with it when you have problems.

Related

Contributing to open source in Firefox(Mozilla): how do I find the relevant portion of the Mozilla code base where a bug occurs in order to fix

I am trying to contribute to open source particularly Firefox(Mozilla), I have done my installation and set up but I have a challenge determining where to look in the codebase to find the file where a bugs occurs in order to propose a patch. I would greatly appreciate general guidance on how to proceed. This is my first time attempting to contribute to open source with Firefox.
Basically, upon seeing the bug as reported in Bugzilla(a website where mozilla bugs are reported), I am clueless on how to proceed from there.
welcome to SO!
I know that contributing to such a big codebase can sometimes feel overwhelming, but I can guarantee you that the Firefox devs really appreciate the efforts you are already putting (and will put!) in your contribution. So.. thanks for the help!
General tips
Firefox codebase is huge, complex and has many moving parts. Downloading and getting Firefox correctly built locally is already a big step forward, and will save you time later. If you haven't done that already, consider doing it!
Read the How To Contribute Code To Firefox documentation page. It gives a good overview of how a code contribution process looks like in Firefox.
Don't feel shy about asking questions! The bug on Bugzilla (or the github ticket) is usually a good place to ask specific questions or general directions on how to fix a bug in Firefox, and folks are generally friendly, inclusive and happy to support you support them!
a. If you don't receive a direct response within a few business days (usually 2-3) from somebody on the bug, chances are the notification got swallowed in the "immense sea of notifications, emails, messages"(tm) that devs receive. See the next section about reaching out.
How to find who to talk to?
Who knows about a specific part of Firefox or any Mozilla product? This could seem like an hard thing to figure out, but there's a few tips.
If the bug report is on Bugzilla, good people to talk to would be the Reporter (if they are a Mozilla contributor) or the Triage Owner.
Mentored bugs are bugs that were triaged by the dev teams and that were designated to introduce folks to the codebase. For this bugs, a "Mentor" is usually shown under "Assignee" in the "People" section of the bug. That's a good person to ask questions!
Mozilla publishes the list of folks who are responsible about components in Firefox. You can find who to talk to based on where the code is/the bug was filed and then consulting this page.
You can send direct request over Bugzilla to individuals, they are called "needinfo requests". After logging into Bugzilla, on the specific page of the bug you need information on, scroll to the bottom. Type your question in the "Add comment" section, tick the "Request information from" checkbox and either pick the role of the person you want to flag from the dropdown, or select "other" and paste an email address there (that you have identified using the previous points). If the person is on bugzilla, the text field will autocomplete and show the relevant person.
If all the above fails, you can rely synchronous communication and chat with the devs over here in the # developers channel.
How to find what code to change?
If it's not in the bug, ask the reporter or the person responsible of that section of code. For bugs marked as "mentored", ask the assigned Mentor!
If the bugzilla bug doesn't mention specific files and you want to find out yourself without reaching out, your best ally is Searchfox. You can type some keywords from the bug at the top of the page and wait for the results in the codebase to come in. This is highly effective! If the bug asks changing CSS files, for example, you could add a file filter like *.css in the top right.
Another pro-tip is looking at what other bugs in that same bugzilla product/component touched. You would find that by clicking on the arrow next to the component, then picking "Recently Fixed Bugs in This Component": it will show a list of fixed bugs, you can pick one or more, then look at the attachments.
Hope this helps!

How, as a programmer, to report bugs I find in core Gecko browser-engine behavior in Firefox

When I’m programming a Web app and I run into a problem that only seems to happen in one browser, I know that a somewhat-essential step among my overall programming tasks as a “good citizen” is to stop coding for a bit and take time to report the bug in the right place—so it can get fixed and other Web developers (including me) hopefully won’t run into the same problem later.
In such cases with Firefox, I understand enough to know when the cause of the programming problem I’m seeing is in the core “Gecko” browser-engine code in Firefox (rather than instead being, say, a bug in the Firefox user-interface code—the code for the so-called browser “chrome”).
Given that, is there a URL that will take me directly the form where I can quickly get to the right bugzilla “product” and “component” to report a Gecko browser-engine bug against?
Having already reported a few bugs in the Gecko code, I am somewhat annoyed at being forced to use the form at https://bugzilla.mozilla.org/enter_bug.cgi, which seems to assume I’m reporting a bug for the first time and I want guided step-by-step help. But this ain’t my first barbecue…
https://bugzilla.mozilla.org/enter_bug.cgi?product=Core&format=default is the URL you want.
That’s because in the case of Firefox, the right bugzilla “product” to use for browser-engine (Gecko) bugs is actually Core (not the Firefox component—and there is no Gecko component).
That URL above takes you directly to an actual bug-reporting page—that is, as you’d want, it completely skips all the designed-for-first-time-bug-reporters step-by-step guided-help stuff.
You do need to then manually choose the right “component” from the Component list there, but if you already know the right component, you can make a bookmark that includes it; e.g., https://bugzilla.mozilla.org/enter_bug.cgi?product=Core&component=DOM%3A%20Workers&format=default is a URL that will let you report problems with Firefox Web-Workers behavior.
Adding the &format=__default__ parameter/value is the important part needed to get bugzilla to skip all the designed-for-first-time-bug-reporters step-by-step guided-help stuff.

Firefox Extension - Is this allowed/legal?

I recently installed a Firefox extension and noticed that it was doing something very odd in the background.
I'm a web developer and use Wordpress mainly. One day I was working on a page in WP admin and switched to the Text rather than Visual mode so I could edit some HTML. I noticed a load of junk html in there hidden using display:none
The class names rang a bell, it was the name of the extension I had installed several weeks previous
I immediately uninstalled the extension but of course it was too late. Since it was injecting code right into the text entry boxes in Wordpress, all that junk got saved with my pages. I had to weed through dozens and manually delete this junk, which in some cases had affected the layout.
I contacted the developers, and they gave me some rubbish about it being totally normal, everyone does this sort of thing, its within the Mozilla dev terms, and that it was a feature not a horrific Malware as I was putting forward.
In this case it was just html/css, but what if they were injecting JS/php etc, they could be causing all kinds of damage
I just wondered from a development perspective what peoples thoughts were. Is this legal?
Many thanks in advance
The best course of action is to spread awareness. I would not do here, but maybe write a detailed article explaining which extension it is, what it does, how, why it's bad, how to get rid of it, and alternatives.
Medium, your own blog, Hacker News and other social outlets will certainly be welcoming of such informations. The developers are very well aware of what they are doing so don't expect them to broadcast it and/or take action.
Be also sure to read their ToS again, see what you agreed to. If something seems suspicious you can talk to a lawyer or probably report them, altough this is beyond what I know.
I am a Mozilla Addon reviewer. Please report your findings as Abuse report and/or addon review (it will be read).

Does SproutCore's "Binding" feature let widgets initiate a call to the server to obtain data?

My team is tasked with quickly evaluating SproutCore and a couple of other alternatives. There's not really enough time for a deep dive, but our findings might let us convince the powers that be to allow for a deeper dive. (Right now, we're just taking a quick glance to see "what's out there").
So me and a teammate have started looking at SproutCore. I'm loving it so far, but he has already decided he doesn't like it. The reason he doesn't like it is he got the impression that the "data binding" in the Todos tutorial is the naive kind of data binding that a Visual Studio grid control might do ... where the widget itself is allowed to reach across the Internet to the server and obtain new data whenever it needs to paint itself.
I would be shocked if that were the case, because it is such a naive approach that really is only good for demo-ware, and SproutCore feels much more elegant than that to me.
Unfortunately, we're probably not going to have time for either one of us to find out for sure. So, can someone who has used SproutCore and knows it well please explain a bit about how Bindings work, and whether or not Bindings are allowed to initiate an Ajax call to the server to obtain more data?
UPDATE: I got the answers I need, partly from the google group and partly from digging deeper. The Bindings are exactly what I thought they were ... a great tool for connecting objects in memory inside the Javascript environment. They eliminate a TON of "glue code", and, like the rest of SproutCore, are REALLY well done. In no way is it anything close to "naive data binding". SproutCore is one powerful, elegant library, and I hope to get plenty of chances to use it (though my current project, alas, chose to go with something else).
I don't think I qualify as "knowing [SproutCore] well," but I don't think your question is really about bindings per se; it's about what's allowed to poll the server for data. It's my impression that bindings largely talk to each other inside the application. A binding can change data in the (local) Store, but I don't think the Store necessarily initiates an Ajax call every time it's changed.
ETA: This work in progress reiterates, "Bindings are used for inter-object communication."

How do you inspect for and test for known IE browser "features"?

My company makes its money off of a great user experience using IE6, 7, Firefox and Safari. 90% of our traffic ends up IE and probably 60% of that traffic is still IE6. IE6 has a bunch of known gotcha's such as accessing DOM objects while they are still being inserted crashing the browser. Almost none of these issues surface during routine testing, they almost always include some odd timing race condition that only affects our most important client of the week.
What process or tools do you use to ensure that known patterns that crash IE are not present in your code?
Added: For those suggesting sticking to 3rd party libraries: I agree that it will help a lot, but you still have to glue those APIs together with Javascript. Is there anyone that is not just crossing their fingers and waiting for someone out in the wild to let them know that there code has just crashed their system?
We don't worry about it. Instead, we use a third party tool like jQuery (well, EXACTLY like jQuery in our company) to ensure cross-platform idiosyncrasies are handled.
I recommend you rely on as many popular 3rd party frameworks as you can. They've undergone far more revisions and testing than you can ever perform. Obviously this means you should be using jQuery for all your JS related work.
Unfortunately there is no silver bullet for these browser bugs, as long as you go with JS & HTML you will continue to have these gotchas. At best you can compile a list of them, publish them on a blog, let the community discuss them and make sure all your devs learn them.
This is an example why Flash and SilverLight exist, which may seem like shocking suggestions considering you've spend an unmeasurable amount of time developing your UI, but if you want to be free of browser/OS bugs, going with a 1 company delivery package is the only way to break the 99.9% barrier for web bugs.
I do a try on window.event.srcElement (which'll only work in IE) and put the non-IE stuff inside the catch, and tie stuff up in my finally.
All other browsers seem to throw an exception with window.event.srcElement so I use that line first and if it gets passed that line it'll obviously be IE so I place my IE code there, if it ever goes to the catch it's clearly a browser that is a bit more standards compliant so I put the alternate code there.
This has saved my ass a lot when it comes to writing Javascript events dynamically using server side code that involves mouse events.
Hope that helped, gives you a way of supporting multiple browsers with different code without server-side detection.
Beleive it or not some of jQuery (and other libraries) functions don't work on all browsers.
Beleive it or not some of jQuery (and
other libraries) functions don't work
on all browsers.
Ofcourse, if you relate to IE5 or NN4, jQuery may not be the best pick. Otherwise, you won't have a problem with this.
I use jQuery for a HUGE site and i don't have problems with library. I have problems with plugins, but this is a different story.
And btw, i have less than 10 lines of pure js in my files. If you learn to use jquery efficiently, you won't need any js knowledge (sounds weird, but... this is my case :P )

Resources