tracker issue : CF-4204514

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

Nested CFLAYOUT/CFLAYOUTAREA tags with source attributes throw javascript error

| View in Tracker

Status/Resolution/Reason: To Track//PRNeedInfo

Reporter/Name(from Bugbase): Michael C. / ()

Created: 06/14/2019

Components: AJAX, UI Components

Versions: 2016

Failure Type: Non Functioning

Found In Build/Fixed In Build: 2016,0,11,314546 /

Priority/Frequency: Normal / All users will encounter

Locale/System: English / Win 2012 Server x64

Vote Count: 0

Problem Description:
Nested CFLAYOUT/CFLAYOUTAREA tags with source attributes throw a javascript error related to missing elements in the second tab.

Steps to Reproduce:

tabs.cfm

<cflayout type="tab" name="MyTabLayout">
	<cflayoutarea name="tab1" title="Tab 1" source="tab1.cfm"></cflayoutarea>
	<cflayoutarea name="tab2" title="Tab 2" source="tab2.cfm"></cflayoutarea>
</cflayout>

tab1.cfm

<cflayout type="vbox" name="mySubLayout1">
	<cflayoutarea name="mySubLayoutArea1" source="tab1_content.cfm"></cflayoutarea>
</cflayout>

tab2.cfm

<cflayout type="vbox" name="mySubLayout2">
	<cflayoutarea name="mySubLayoutArea2" source="tab2_content.cfm"></cflayoutarea>
</cflayout>

tab1_content.cfm

<p>Tab 1 content</p>

tab2_content.cfm

<p>Tab 2 content</p>

Actual Result:
Javascript error: Error replacing HTML, element not found: mySubLayoutArea2

Expected Result:
No errors

Any Workarounds:
Rollback to CF 2016 Update 7

Attachments:

Comments:

Hi Michael, I have tried out your code in ColdFusion 2016 update 11 and could not observe issue. Could you try out in different browser and check the behavior? Is there any error logged in browser console and if yes, send the details to us with screenshot. Please check the Tab2.PNG in attachment and if you observing other behavior send us the screenshot.    Thanks, Mukesh
Comment by Mukesh K.
30920 | June 14, 2019 06:26:28 AM GMT
Hi Mukesh, 1. Clear browser cache, to ensure updated cf*.js files are being loaded 1. On page load, alert dialog pops up with the message 'Error replacing HTML, element not found: mySubLayoutArea2' (error_1.png) 2. Clicking OK in the dialog loads the tabs with no content (error_2.png) 3. Clicking on Tab 2 focuses the tab, but has no content (error_3.png) 4. Clioking on Tab 1 focuses the tab, but has no content (error_4.png) 5. Clicking on Tab 2 focuses the tab, and now has content (error_5.png) 6. Clicking on Tab 1 focuses the tab, and now has content (error_6.png) 7. Same behaviour in Firefox, Chrome, Edge, IE11 8. Nothing in any of the browser consoles The following workaround has been found (although we won't be deploying this in production): 1. Replace {cfhome}\cfusion\wwwroot\cf_scripts\scripts\ajax\package\cfajax.js with the version from Update 7 2. Clear the browser cache 3. Reload the page 4. No javascript alert dialog pops up (i.e. it works) So, for now, we are stuck on CF2016 Update 7, as Updates 9, 10, and 11 all contain this bug.
Comment by Michael C.
30944 | June 21, 2019 12:22:20 AM GMT
Hi Michael, Thank you providing detailed inputs. Can you check YUI library is exists in the location: <ColdFusion_install_directory>/cf_scripts/scripts/ajax/yui ? If YUI is not present , then download the files from [https://cfdownload.adobe.com/pub/adobe/coldfusion/2016/deprecated_features/yui.zip] and place the file in ajax folder.   Thanks, Mukesh
Comment by Mukesh K.
30945 | June 21, 2019 09:33:02 AM GMT
Hi Mukesh, Yes, all the YUI libraries were already in place, Cheers, Mike.
Comment by Michael C.
30947 | June 21, 2019 03:49:35 PM GMT
Hi Mukesh, Just checking to see if there is any progress on this. We'd really like to move forward from CF2016 Update 7. Cheers, Mike.
Comment by Michael C.
30983 | July 02, 2019 05:52:55 PM GMT
Hi Mukesh, I noticed the Reason Code for this issue is marked as 'PRNeedInfo'. Please could you let me know if you are awaiting information from me? We would really like to move forward from CF2016 Update 7 ASAP, and cannot do so without this issue getting resolved. Note from a previous comment above, the issue would appear to be in the {cfhome}\cfusion\wwwroot\cf_scripts\scripts\ajax\package\cfajax.js file, so whatever changed in that file after Update 7 would seem to be what's breaking it. Cheers, Mike.
Comment by Michael C.
31052 | July 22, 2019 05:23:44 PM GMT