tracker issue : CF-4200017

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

cfchart causes javascript to be prepended to requests, causing invalid json responses

| View in Tracker

Status/Resolution/Reason: Closed/Withdrawn/

Reporter/Name(from Bugbase): Daniel Roberts / Daniel Roberts ()

Created: 10/13/2017

Components: Charting/Graphing

Versions: 2016

Failure Type: Others

Found In Build/Fixed In Build: 2016.0.05.303689 /

Priority/Frequency: Normal /

Locale/System: / Win 2012 Server x64

Vote Count: 0

Problem Description:

The cfchart tag in causing javascript to be forced into the output of the page. When the chart is being generated in an ajax request this causes an invalid response as the html/js code is prepended.

Steps to Reproduce:

    <cfdocument format="PDF" filename="test.pdf" overwrite="true">
        <cfchart format="png">
            <cfchartseries type="Bar" label="Numbers">
                <cfchartdata item="First" value="1">
                <cfchartdata item="Second" value="2">
            </cfchartseries>
        </cfchart>
    </cfdocument>
    <cfcontent reset="true" />
    test

Actual Result:

    <script type="text/javascript">/* <![CDATA[ */_cf_loadingtexthtml="<img alt=' ' src='https://tracker.adobe.com/cf_scripts/scripts/ajax/resources/cf/images/loading.gif'/>";
    _cf_contextpath="";
    _cf_ajaxscriptsrc="/cf_scripts/scripts/ajax";
    _cf_jsonprefix='//';
    _cf_websocket_port=8579;
    _cf_flash_policy_port=1243;
    _cf_clientid='1D0DA2C606EC323ABBECA5B29A016CF0';/* ]]> */</script><script type="text/javascript" src="/cf_scripts/scripts/ajax/messages/cfmessage.js"></script>
    <script type="text/javascript" src="/cf_scripts/scripts/ajax/package/cfajax.js"></script>
    <script type="text/javascript" src="/cf_scripts/scripts/chart/cfchart-server.js"></script>

    test

Expected Result:
	test

Any Workarounds:

None that I can find. Tried cfflushing before the cfchart call but that results in an error when the cfchart is hit "ColdFusion was unable to add the text you specified to the output stream. This is probably because you have already used a CFFLUSH tag in your template or buffered output is turned off."

Attachments:

Comments: