portal entry

select a category, or use search below
(searches all categories and all time range)

ColdFusion 2016 update 11 IE Javascript problems

| View in Portal
July 25, 2019 08:31:26 PM GMT
<p>ColdFusion 2016 update 11 from update 7 broke IE11 and Chrome javascript functionality</p>
<p>The post <a rel="nofollow" href="https://coldfusion.adobe.com/2019/07/coldfusion-2016-update-11-ie-javascript-problems/">ColdFusion 2016 update 11 IE Javascript problems</a> appeared first on <a rel="nofollow" href="https://coldfusion.adobe.com">ColdFusion</a>.</p>
Labels: CF2016 Updates, ColdFusion 2016, Question, 11, cf2016 updates, coldfusion 2016, question


I realize you may be hoping someone may confirm "the problem was caused by x, and you need to change y", but it may not be that simple. While awaiting that, have you tried using your browser's developer tools, to see if there are failures of any requests to obtain files from the server  (as specified by your code or by CF), when the page loads? If you're unfamiliar, use the f12 button in IE (or ctrl-shift-i in other browsers), or you can right-click on white space of your page and choose "inspect" or "inspect element"? When that toolset opens, go to the "network" tab in the tools. Then in IE click the green "play"icon. Then refresh your page, observing all the files that get loaded on the request of the page. Notice how there is a status code column. See if any have 404 or other error status codes, which would indicate that they are failing to be obtained from the server. Then right-click on any, and choose "open in new tab", to see what happens when you visit the page directly. Maybe there will be an error giving you a clue. Or let us know what you find.
Comment by Charlie Arehart
2185 | July 26, 2019 09:19:06 PM GMT
<p>Hi aliciam29605858,</p><p>Can you please share the sample code snippet to me at <a href="mailto:mukumar@adobe.com" rel="nofollow">mukumar@adobe.com</a> for which are you facing the issue?</p><p>Thanks,</p><p>Mukesh</p>
Comment by Kumar Mukesh
2186 | July 29, 2019 02:15:49 PM GMT
Hi Kumar, Unfortunately our code is proprietary, so I can't share it.  I'm trying to reduce it to a simple example, but so far only a more complicated example will reproduce it.  Thanks.
Comment by aliciam29605858
2197 | July 30, 2019 08:03:28 PM GMT
Hi Charlie, Thanks for the response.  There are no failures of any requests or when the page loads according to the browser's developer console and the network tab.  The only failure I see is SCRIPT5007 error in the developer console, 'eval code', on this line, suggesting that containerCollapseEvent is null: _cf_autosuggest.containerCollapseEvent.subscribe(ColdFusion.Autosuggest.triggerOnChange); Here's a version of the 'eval code' where identifying information is removed (the list of 'something1,something2' is about 80 items long). <blockquote> /* <![CDATA[ */ var _cf_autosuggest_init_123456789012345=function() { var _cf_autosuggestarray=[]; _cf_autosuggestarray="something1,something2,something3".split(","); var _cf_autosuggestdatasource= ColdFusion.Autosuggest.initJS_ARRAY( _cf_autosuggestarray); _cf_autosuggestdatasource.queryMatchContains =false; var _cf_autosuggest= ColdFusion.Autosuggest.init( 'requestor','requestorcontainer',_cf_autosuggestdatasource); _cf_autosuggest.onbinderror=null; _cf_autosuggest.queryMatchContains =false; _cf_autosuggest.prehighlightClassName = "yui-ac-prehighlight"; _cf_autosuggest.typeAhead = false; _cf_autosuggest.maxResultsDisplayed = 10; _cf_autosuggest.useShadow = true; _cf_autosuggest.showloadingicon = true; _cf_autosuggest.containerCollapseEvent.subscribe(ColdFusion.Autosuggest.triggerOnChange); _cf_autosuggest.id='requestor' ColdFusion.objectCache["requestor"] = _cf_autosuggest; document.getElementById("requestorcontainer").style.left = document.getElementById("requestor").offsetLeft; };ColdFusion.Event.registerOnLoad(_cf_autosuggest_init_123456789012345,{_cf_containerId:'cf_layoutareatabsomething'}); /* ]]> */</blockquote> Currently we have a test server set up with update 11 and our production servers with update 7.  The autogenerated code from IE 11 that I posted above looks identical between the servers, leading me to think a change in one of the .js files from update 11 is causing the problem. If you can think of anything else I can look at to try and narrow down the problem, please let me know.  Thanks!
Comment by aliciam29605858
2199 | July 30, 2019 08:24:07 PM GMT
And I forgot to add, if I visit the page directly, it looks as expected.
Comment by aliciam29605858
2198 | July 30, 2019 08:26:29 PM GMT
<p style="text-align: left">Ok. My next suggestion would be to see if adding the site to the IE  "trusted sites" feature might make a difference. I realize you may feel that it "worked before" without it, but let us know if it helps. That could be a clue, if not a solution.</p>
Comment by Charlie Arehart
2200 | July 30, 2019 09:15:37 PM GMT
Thanks for the suggestion, unfortunately it did not work.  However, it did stop on a breakpoint and it turns out this is using yui (YAHOO.widget.AutoComplete) and examining the object does show the containerCollapseEvent is null.  I know yui was deprecated a few versions ago, but it has continued to work until now. For some reason, a small test does work with <cfinput ...etc... autosuggest="#valueList(query.field)#">, so something in combination with the autosuggest/autocomplete and other javascript/AJAX must be causing the problem.
Comment by aliciam29605858
2201 | July 30, 2019 10:59:04 PM GMT
So you're saying the autosuggest works (type ahead) and the conflict is only with ajax. That's indeed odd. I saw you said to Kumar that the problem only happens with complex apps. Are they perhaps pulling in js libraries that may be conflicting with cf's yui lib?
Comment by Charlie Arehart
2202 | July 31, 2019 12:26:02 AM GMT
Good idea, but I can't find evidence of that. I did find that when I replace cfajax.js from update 7 with update 11, I do not have this problem, so it is definitely related to AJAX.  At least there is a workaround, although I'm not sure what other effects this might have.
Comment by aliciam29605858
2221 | August 02, 2019 11:36:58 PM GMT
I've emailed you example code.  It seems to be the combination of 'cflayoutarea' and 'cfinput' with 'autosuggest' that is causing the problem.  Interestingly, I can switch the cflayoutarea ordering so that the cfinput is the first tab, and I don't have the problem.  Unfortunately that is not a workaround for our application.
Comment by aliciam29605858
2225 | August 05, 2019 11:55:06 PM GMT