phacility/phabricator · error · Exception

Unable to find a content column to place the footer inside.

Error message

Unable to find a content column to place the footer inside.

What it means

PHUIFormationView::setFooter() places the footer inside the main content column: it scans the registered column items for one whose column is a PHUIFormationContentView and appends there. A formation view built only from flank columns (newFlankColumn()), or one where setFooter() runs before any content column exists, has nowhere to put the footer and throws. PhabricatorStandardPageView::willRenderPage() also calls setFooter() automatically when a page footer is attached and the first child is a PHUIFormationView.

Source

Thrown at src/view/formation/PHUIFormationView.php:202

      $expander->setColumnItem($item);
      $item->setExpander($expander);

      $control_item->appendExpander($expander);
    }

    return $items;
  }

  public function setFooter($footer) {
    foreach ($this->items as $item) {
      if ($item->getColumn() instanceof PHUIFormationContentView) {
        $item->getColumn()->appendChild($footer);
        return $this;
      }
    }

    throw new Exception(
      pht('Unable to find a content column to place the footer inside.'));
  }

}

View on GitHub (pinned to 5720a38cfe)

Solutions

  1. Create a content column first: $content = $formation->newContentColumn(); and put the main content in it, then call setFooter().
  2. Reorder construction so all columns exist before the footer is attached.
  3. If a formation layout is not required, use a regular layout so the footer renders through the normal page mechanism.

Example fix

// before
$formation = id(new PHUIFormationView());
$formation->newFlankColumn()->setHeaderText(pht('Menu'));
$formation->setFooter($footer); // throws: no content column

// after
$formation = id(new PHUIFormationView());
$formation->newFlankColumn()->setHeaderText(pht('Menu'));
$content = $formation->newContentColumn();
$content->appendChild($main_content);
$formation->setFooter($footer);
Defensive patterns

Strategy: validation

Validate before calling

// PHUIFormationView exposes no items getter; track the content column yourself:
$content = $formation->newContentColumn();
$content->appendChild($main_content);
// ... later:
if ($content) {
  $formation->setFooter($footer);
}

Try / catch

try {
  $formation->setFooter($footer);
} catch (Exception $ex) {
  // No content column: render the footer outside the formation layout.
  $layout = array($formation, $footer);
}

Prevention

When it happens

Trigger: Calling setFooter($footer) on a PHUIFormationView that has had only newFlankColumn() calls (no newContentColumn()); or a controller attaching a page footer to a standard page whose layout is a formation view lacking a content column.

Common situations: Custom full-formation application layouts (Diffusion/Maniphest-style) assembled by hand; ordering bugs where the footer is set before the content column is created; conditionally skipping the content column on some screens.

Related errors


AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21). Data as JSON: /api/errors/314c830b35e7099e. Report an issue: GitHub.