Skip to content

Guides page fails on Adobe ColdFusion with ‘Unable to add text to HTML HEAD tag’ error #2569

Closed

Description

@zainforbjs

Describe the bug
When running a Wheels application on Adobe ColdFusion and navigating to the Guides page, the following error is thrown:

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.

As a result, the Guides page does not render.

To Reproduce
Steps to reproduce the behavior:

  1. Run a Wheels application using Adobe ColdFusion.
  2. Navigate to the Guides page.
  3. Observe the error shown above.

Expected behavior
The Guides page should render successfully on Adobe ColdFusion without throwing errors related to adding content to the HTML <head>.

Screenshots
Image

Desktop:

  • OS: Any
  • CFML Engine: Adobe ColdFusion

Additional context
This error usually occurs in Adobe ColdFusion when code attempts to add content to the after output has already started. Possible causes include:

  • Output being generated before contentFor("head") or similar helpers are called
  • Use of cfflush
  • Response buffering differences between Lucee and Adobe ColdFusion

Activity

  1. deleted a comment from wheels-bot on May 12, 2026
  2. wheels-bot commented on May 12, 2026

    @wheels-bot
    Contributor

    Wheels Bot — Triage

    Classified as bug.

    Suspected layer

    view — see .ai/wheels/views/ for canonical patterns. The affected files are the framework's built-in public views: vendor/wheels/public/views/guides.cfm and vendor/wheels/public/docs/guides.cfm.

    Fix sketch

    vendor/wheels/public/docs/guides.cfm:47 injects a meta refresh tag via <cfhtmlhead text="...">. The wrapper view (vendor/wheels/public/views/guides.cfm) includes ../layout/_header.cfm before including ../docs/guides.cfm, so by the time cfhtmlhead runs the response has already streamed past </head>. Lucee tolerates this; Adobe CF throws "Unable to add text to HTML HEAD tag." The fix is to stop relying on cfhtmlhead after the layout has rendered — emit the redirect another way (e.g. <cflocation url="..." addtoken="false"> early, a plain inline <meta http-equiv="refresh"> inside the rendered body, or hoist the cfhtmlhead call above the _header.cfm include).

    Confidence: medium

    Cross-engine concern (Lucee tolerates late cfhtmlhead, Adobe doesn't) fires the auto-downgrade rule — fix needs verification against both engines, and the right replacement strategy is a small design choice rather than a one-line swap.

    <!-- wheels-bot:triage:2569 -->
    <!-- wheels-bot:triage-class:bug -->

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions