本文介绍了cf10 无法将文本添加到 HTML Head的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在加载的页面上出现以下错误:

I am getting the following error on a page we are loading:

coldfusion.runtime.CfErrorWrapper
Unable to add text to HTML HEAD tag.
[empty string]

caused by

Template

Unable to add text to HTML HEAD tag.
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.

我已经扫描了我们应用程序中包含的所有文件,但找不到任何使用 CFflush 的文件.

I've done a sweep of all the files that are included in our application and cannot find anything that uses CFFlush.

所有 cfcs 和组件的输出都设置为否".我还尝试在文件中添加 cfsetting showdebugoutput = no.这没有帮助.

output is set to 'no' on all cfcs and components. I also tried adding cfsetting showdebugoutput = no in a file. That didn't help.

我在 cfadmin 中打开了请求调试,但没有帮助.

I turned request debugging on in cfadmin and that didn't help.

HTML Head 在我们应用程序的其他部分工作正常,它似乎只是在这一页上.

The HTML Head works fine in other parts of our app, it just seems to be on this one page.

这个页面唯一真正不同的是它是一个特别长的页面.

The only thing really different about this page is that it is a particularly long page.

推荐答案

如果页面特别长,那么 CF 可能会自行刷新缓冲区.如果您在 CFAdmin 中查看,在设置页面上,有一个最大输出缓冲区大小的设置.我相信默认值是 1024 KB.如果您的页面内容超过 1 兆,那么 CF 可能会在您的 <cfhtmlhead/> 标记运行之前刷新缓冲区.尝试增加缓冲区大小,或更改 <cfhtmlhead/> 标记的位置,看看是否可以解决问题.

If it's a particularly long page, then CF may be flushing the buffer on its own. If you check in the CFAdmin, on the settings page, there is a setting for Maximum Output Buffer size. I believe the default is 1024 KB. If your page is over 1 meg of content, then CF may flush the buffer before your <cfhtmlhead /> tag runs. Try increasing the buffer size, or changing the placement of the <cfhtmlhead /> tag to see if that corrects the issue.

这篇关于cf10 无法将文本添加到 HTML Head的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-24 14:33