# Presentation and extension errors
> Error codes of the menu and layout regions, your own shell composition, project components, layouts in design/ and recipes — with the cause and the fix.
Source:
These errors concern how the page frame is assembled: the menu, layout
regions, your own shell sections, project components in `smart/`, layouts
and sections in `design/`, and composition recipes. How this works is
described in [Layout regions](https://docara.io/en/settings/layout-and-regions/) and
[Interface composition](https://docara.io/en/development/composition/).
## Menu and layout
| Code | Cause and what to do |
| --- | --- |
| `DECLARATIVE_NAVIGATION_DEPTH_EXCEEDED` | The menu came out deeper than four levels. **What to do:** Move pages deeper than the fourth level up, or merge sections. |
| `DECLARATIVE_CONTAINER_MAX_INVALID` | `layout.container.max` is not a whole number from 1 to 8. **What to do:** Give a number from 1 to 8; `7` suits most sites. |
| `DECLARATIVE_CONTENT_GAP_INVALID` | `layout.content.gap` is not a whole number from 0 to 8. **What to do:** Give `0` for an ordinary article, or a number up to 8 for a landing page. |
| `DECLARATIVE_REQUIRED_REGION_DISABLED` | The main `main` region is turned off. **What to do:** Remove `layout.regions.main.enabled: false`. |
| `DECLARATIVE_LAYOUT_CONFIGURATION_INVALID` | `layout.key` names a layout that is not registered. **What to do:** Give `docara.docs` or a project layout from `design/layouts/`. |
| `DECLARATIVE_SHELL_BRANDING_INVALID` | A dark theme logo is set without the main logo, or the `logo` mode is chosen without a logo file. **What to do:** Give the main logo in the `brand` section. |
## Your own region composition
The regions `layout.regions..sections` are assembled from sections
and blocks.
| Code | Cause and what to do |
| --- | --- |
| `DECLARATIVE_REGION_UNKNOWN` | `layout.regions` names a region that the layout does not have. **What to do:** Use `header`, `sidebar`, `main`, `outline` or `footer`. |
| `DECLARATIVE_REGION_CONFIGURATION_INVALID`, `DECLARATIVE_REGION_SECTION_INVALID`, `DECLARATIVE_REGION_BLOCK_INVALID`, `DECLARATIVE_REGION_ELEMENT_INVALID` | The description of a region, section or block is written incorrectly: not an object, no `id` or `section`, an unknown field. **What to do:** Compare the record with the example in [Your own region composition](https://docara.io/en/settings/layout-and-regions/#your-own-region-composition). |
| `DECLARATIVE_REGION_SECTION_LIMIT_EXCEEDED`, `DECLARATIVE_REGION_BLOCK_LIMIT_EXCEEDED` | A region has more than 8 sections, or a section more than 12 blocks. **What to do:** Merge or remove the extra ones. |
| `DECLARATIVE_SECTION_INSTANCE_ID_DUPLICATED`, `DECLARATIVE_BLOCK_INSTANCE_ID_DUPLICATED`, `DECLARATIVE_DOCUMENT_NODE_ID_DUPLICATED` | Two elements got the same `id`. **What to do:** Give each section and block its own `id`. |
| `DECLARATIVE_DOCUMENT_REGION_MANAGED` | The page itself fills the `main` region; it cannot be described with sections. **What to do:** Remove `sections` from `main`. |
| `DECLARATIVE_SECTION_CAPABILITY_MISMATCH`, `DECLARATIVE_SECTION_REGION_FORBIDDEN` | The section does not suit this region. **What to do:** Put it in the region it is meant for; `docara atlas --json` shows which. |
| `DECLARATIVE_BLOCK_SECTION_FORBIDDEN`, `DECLARATIVE_BLOCK_SLOT_FORBIDDEN`, `DECLARATIVE_REGION_BLOCK_KIND_FORBIDDEN`, `DECLARATIVE_BLOCK_PAYLOAD_MISMATCH` | The block cannot stand in this section or in this place of the section, or its data does not suit its kind. **What to do:** Use `shell.element` or `shell.smart` and compare the fields with the example. |
| `DECLARATIVE_ELEMENT_INVALID`, `DECLARATIVE_ELEMENT_HREF_FORBIDDEN`, `DECLARATIVE_ELEMENT_HREF_INVALID`, `DECLARATIVE_ELEMENT_ARIA_LABEL_INVALID` | A `shell.element` is written incorrectly: `href` is given on something that is not a link, the link does not lead to an address of this site, or the screen reader label is empty. **What to do:** Give `href` only to an `a` element, write the address from the site root and fill in the label. |
| `DECLARATIVE_REGION_SET_PASSPORT_INVALID`, `SET_PASSPORT_PACKAGE_UNKNOWN`, `SET_PASSPORT_INVALID` | A `shell.set-passport` block is written incorrectly, is outside the footer or names a package that is not a component set in `simai-framework.lock.json`; or the set's `set.json` cannot be read or has no title. **What to do:** Put the block in the `footer` region, give the set's name from the lock in `package` and an address from the site root in `history`; if `set.json` is at fault, take the set's package again. |
| `DECLARATIVE_VIEW_UTILITY_NOT_ALLOWED` | `utilities` names a class that is not in the pinned SIMAI Framework version. **What to do:** Use classes from the [Framework utility reference](https://ui.simai.io/). |
| `DECLARATIVE_AUTHOR_EXECUTABLE_SURFACE_FORBIDDEN` | The `layout` settings have a field that looks like a template or code (its name has `template`, `html`, `script`, `style`, `php`, `path` and the like), or a value with `