4

With ColdFusion 2018 using the <cfgrid> with the format set to "html".

<cfform action="" method="POST" name="TEST">
    <cfgrid name="test"  format="html">
            <CFGRIDCOLUMN NAME="A" HEADER="A" > 
            <CFGRIDCOLUMN NAME="B" HEADER="B" > 
    </cfgrid>
</cfform>

Running the above sample code on Chrome, I receive the following errors:

  1. https ://test-url/cf_scripts/scripts/ajax/yui/yahoo-dom-event/yahoo-dom-event.js net::ERR_ABORTED 404 (Not Found)

  2. GET https ://test-url/cf_scripts/scripts/ajax/yui/animation/animation-min.js 404 (Not Found)

  3. Uncaught TypeError: Cannot read property 'id' of undefined ext-all.js:18
    at i.getKey (ext-all.js:18)
    at i.add (ext-all.js:18)
    at c (ext-all.js:18)
    at i.onSelectChange (ext-all.js:18)
    at i.doMultiSelect (ext-all.js:18)
    at i.doSelect (ext-all.js:18)
    at i.select (ext-all.js:18)
    >at $G.Actions.onLoad (cfgrid.js:490)
    at b (ext-all.js:18)

After looking into this I found that the YUI API used to come bundled with ColdFusion has been deprecated and removed with Coldfusion 2016 update 3

According to the documentation only the following tags should be affected by the change ( Im guessing one of these is a dependency for <CFGRID>?)

  • cfmenu
  • cftree
  • cftooptip
  • cfcalendar
  • cfinput (autosuggest attribute)
  • cfinput (sourcefortooltip attribute)
  • cfsprydataset

Without adding the depreciated API back into ColdFusion 2018... is there anyway to decouple YUI from the <CFGRID> tag as it behaves normally even with the error?

Can anything be done about the error from ext-all.js or is this a Coldfusion bug?

James A Mohler
  • 11,060
  • 15
  • 46
  • 72
Hedge7707
  • 557
  • 1
  • 5
  • 17
  • I bet it is a ColdFusion bug. It sounds like `` is powered by YUI. No YUI, no `` – James A Mohler Feb 06 '19 at 00:59
  • Doesn't answer your question, but out of curiosity, does the error go away if you download *only* those two javascript files from a CF2016 install? – SOS Feb 06 '19 at 14:58
  • I have only tried pulling the entire YUI, and the first two errors do go away. However the 3rd error from ext-all.js still persists. (Not too keen about pulling in the deprecated JS library tho .. as it is no longer maintained) ... The still works even with the errors ... just a bit annoying having the errors printed to console – Hedge7707 Feb 06 '19 at 15:25
  • 1
    @Hedge7707 - Do you mean the 3rd error persists even after adding back the *whole* YUI library? i.e. Suggesting it's not related to YUI. *Edit* Could you post a small - standalone repro case? – SOS Feb 06 '19 at 16:31
  • @Ageax Yeah... it seems related to another JavaScript framework that CF uses Ext JS (https://docs.sencha.com/ext/6.2.0/guides/quick_start/introduction.html) – Hedge7707 Feb 06 '19 at 16:35
  • 1
    @Hedge7707 - Never mind, missed the example ;-) Let me try it. – SOS Feb 06 '19 at 16:38
  • @Hedge7707 - Ugh.. yeah, I get the same 3 errors with CF2018, and the 1 error remains, even after copying in the whole YUI lib, so I'd say likely bug. – SOS Feb 07 '19 at 04:01

1 Answers1

0

Try Updating to the latest update of CF 2018 , update 5 , along with the YUI library in place. You might possibly skip all the above errors.

Only IE will still have a problem with error like this Unable to set property 'page' of undefined or null reference