logo
down
shadow

Why is CFHTMLHEAD not working in ColdFusion 11?


Why is CFHTMLHEAD not working in ColdFusion 11?

By : Liubing
Date : November 22 2020, 10:38 AM
I hope this helps you . I've found that in CF11 anything added using a cfhtmlhead call that comes before a cfcontent reset="true" does not get added to the resulting document. Does the cf_layout tag you are calling after your cf_htmlhead contain a content reset?
For example,
code :
<!--- This will not be added under CF11. --->
<cfhtmlhead text="<!-- I'm some content that will only be included in CF10 or lower. -->">

<cfcontent reset="true">

<!--- This will be added under CF11 and lower. --->
<cfhtmlhead text="<!-- I'm some content that will be added in CF11 and lower. -->">

... the rest of your view code ...

<!--- This is a sample of the content you will get under CF11 --->
<!doctype html>
<html>
<head>
   <meta charset="UTF-8" />
   <title>Head Testing</title>
      <!-- I'm some content that will be added in CF11 and lower. -->
   </head>
   <body>
      <h1>Page content</h1>
   </body>
</html>


Share : facebook icon twitter icon
cfhtmlhead reset/unset or cancel?

cfhtmlhead reset/unset or cancel?


By : Pinkrose Solaiman
Date : March 29 2020, 07:55 AM
wish helps you to Henry's link and a few other issues I was figuring out at the same time, I got thinking of other ways to hack at it and found this simple solution that works for my original problem as I don't want/need to use content injected via the cfhtmlhead call at all:
code :
<!--- output that doesn't work with the headerText being added to it --->
<cfsavecontent variable="dontLitter">
...
</cfsavecontent>

<cfcontent type="text/html" variable="#toBinary(toBase64(dontLitter))#" />
Is there a way to use <cfhtmlhead> in cfscript?

Is there a way to use <cfhtmlhead> in cfscript?


By : user3340542
Date : March 29 2020, 07:55 AM
hope this fix your issue You would need to write a tag based version that is then included into the script based CFC. I've done this before for things like cfsetting.
Is there a CFHTMLHEAD equivalent for CFSCRIPT?

Is there a CFHTMLHEAD equivalent for CFSCRIPT?


By : Brandon Rinebold
Date : March 29 2020, 07:55 AM
wish help you to fix your issue I don't think there is. BUt have you looked at the CFScript Community Components project on GitHub? There is an implementation of cfhtmlhead there.
coldfusion 9 files encoded with cfencode.exe not working on coldfusion 10

coldfusion 9 files encoded with cfencode.exe not working on coldfusion 10


By : user3168235
Date : March 29 2020, 07:55 AM
fixed the issue. Will look into that further You cannot run encoded ColdFusion applications on a different major version from the one used to do the encoding. If you want to run that application on ColdFusion 10, you will need to re-encode it from the source code using ColdFusion 10.
cfgrid not working after upgrade from Coldfusion 11 to Coldfusion 2018

cfgrid not working after upgrade from Coldfusion 11 to Coldfusion 2018


By : user2587030
Date : March 29 2020, 07:55 AM
around this issue Ultimately the solution here is to move away from ColdFusion's implementation of and roll your own grid-UI or.... wait for a patch from Adobe.
This is definitely a bug in ColdFusion, the error you are seeing is specifically a bug in the function ColdFusion.Grid.Actions.afterEdit()
code :
<Body>

<cfif isDefined("form.submitname")> 
  <cfdump var="#form#">
<cfelse>
  <cfform action="test.cfm" method="post" name="testform" id="testformId">
    <cfinput type="Submit" name="submitname" id="submitid">
    <cfgrid name="TestGrid" format="html" selectmode="edit">
      <cfgridcolumn name="A"> 
      <cfgridcolumn name="B">
      <cfgridrow data="john,doe">
      <cfgridrow data="steve,anon">
    </cfgrid>
  </cfform>
</cfif>

<script>

    ColdFusion.Grid.Actions.afterEdit = function(_d8, _d9, _da) {
        var _db = _d9.value;
        if (_db == this.editOldValue) {
            return;
        }
        if (this.insertInProgress == false && this.onChangeFunction) {
            this.onChangeHandler("U", this.selectedRow, _d9);
        } else {
            if (!this.dynamic) {
                rowidx = _d9.rowIdx;
                if (!rowidx && rowidx != 0) {
                    rowidx = _d9.row;
                }
                var _dc = ColdFusion.Grid.computeActualRow_editField(this.editFieldState, _d9.record.data.CFGRIDROWINDEX);
                var _dd = this.editFieldState[_dc - 1];
                var _de = _d9.colIdx;
                if (!_de && _de != 0) {
                    _de = _d9.column;
                }
                _de = _de + 1;
                if (_dd) {
                    if (this.multiRowSelection === true && this.insertInProgress == true) {
                        _de = _de - 1;
                    }
  //-------------------------------------------------------------------
  //Subtracted 1 from column index to correctly index array 
  //-------------------------------------------------------------------

                    _dd.values[_de -1][1] = _db;
                } else {
                    var _df = this.grid.getStore().getById(_d9.record.data.CFGRIDROWINDEX);
                    _dd = ColdFusion.Grid.Actions.initEditState(this, "U", _df, _dc);
                    var _e0 = this.editOldValue + "";
                    if (_d9.column.type == "date") {
                        if (_e0 && typeof _e0 == "string") {
                            _e0 = new Date(_e0);
                        }
                        var _e1 = "F, j Y H:i:s";
                        if (_d9.column && _d9.column.format) {
                            _e1 = _d9.column.format;
                        }
                        _dd.values[_de][1] = Ext.Date.format(_db, _e1);
                        _dd.values[_de][0] = _e0 ? Ext.Date.format(_e0, _e1) : _e0;
                    } else {
   //-------------------------------------------------------------------
  //Subtracted 1 from column index to correctly index array 
  //-------------------------------------------------------------------
                        _dd.values[_de -1][0] = _e0;
                        _dd.values[_de -1][1] = _db;
                    }
                }
                ColdFusion.Grid.Actions.computeEditField(this);
            }
        }
        this.editOldValue = null;
        this.fireSelectionChangeEvent();
    }
    ;
</script>

</BODY>
shadow
Privacy Policy - Terms - Contact Us © ourworld-yourmove.org