Troubleshooting · Developer docs

Troubleshooting

Grouped by symptom, never by module, because the person with the problem does not know which module has it. One hundred questions across ten pages, each answered with the causes in the order they usually turn out to be true.

My template renders but every area is empty

The record's active revision has no layout, so it has no areas at all; a record created through the API without revision.layout looks exactly like this, and the admin shows an empty form. Then: the record uses a different layout than the one you added areas to; the layout area names in the template differ from the layout's (names are case-sensitive); you are reading the blog container instead of the post, or the wrong record in a listing; or an older revision is active and the content is on a newer, inactive one. A getter on the wrong category does not come back empty: getAreaText() on an image area prints an error sentence.

Template code
{* development only: what areas does this record actually have? *}
{foreach $page->getLayout()->getAreas() as $area}{debug_vars area=$area->getName() type=$area->getType()->getName()}{/foreach}
{% for area in page.getLayout().getAreas() %}{{ debug_vars(area.getName(), area.getType().getName()) }}{% endfor %}

More in It is not showing up

  1. A new layout area is not showing on the editing form
  2. A new record does not appear in a listing
  3. A new record does not appear in search
  4. A page shows on dev but 404s on production
  5. An image renders as a broken link

Was this page helpful?

Your answer goes to the docs team.