> For the complete documentation index, see [llms.txt](https://docs.laws.africa/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.laws.africa/how-tos/mark-up/tables/table-errors.md).

# Table errors

The 'Broken table' error will tell you what the system thinks the total rows and columns for the table are.

## Incorrect colspan

### Example 1

![](https://672843079-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LoitfV0OP-HrMLMazq_%2Fuploads%2FyMYrD8xH792cKWPNlgrA%2Fimage.png?alt=media\&token=9fcfbc37-f867-4b54-8919-d356ba3cf7db)

In this example, it says '37 rows and 9 columns'.

A quick count of the top row shows a total of 8 columns: the big one on the left and C1 to C7 on the right. A quick scroll through the table confirms that there aren't more columns later on.

#### Diagnosis

![](https://672843079-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LoitfV0OP-HrMLMazq_%2Fuploads%2FwmzZZgnDJynOwQSUwaaf%2Fimage.png?alt=media\&token=994c45e9-030f-40a8-a466-129b91df5a9a)

The first two rows look good:&#x20;

The first row includes a header cell that spans two rows, and 7 more cells.

In the second row, we count one cell for the heading from the previous row, and the second cell spans 7 columns.

The third row spans 9 columns, though, and we know there are only 8.&#x20;

#### Fixing it

In this case simply replacing the 9 with an 8 will fix the issue.

(It should also be a `TH` and the bold should be removed, but that's for a separate section.)

![](https://672843079-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LoitfV0OP-HrMLMazq_%2Fuploads%2F0S4oEdT0a8lIN9nelr6K%2Fimage.png?alt=media\&token=142e4842-27df-442d-ad8e-c1cf63328416)

Click 'Update', and the error no longer displays:

![](https://672843079-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LoitfV0OP-HrMLMazq_%2Fuploads%2FUOqYN8nix7df93tGn8lA%2Fimage.png?alt=media\&token=f950ec14-dc55-49be-b6c4-bdd7ffbff14f)

### Example 2

![](https://672843079-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LoitfV0OP-HrMLMazq_%2Fuploads%2FF39em5iAMQ9KN3fb3dia%2Fimage.png?alt=media\&token=b28d542b-4fa5-407e-b35f-52e9a64f93ab)

In this example, it says '51 rows and 11 columns'.

From first glance it seems as if the table should have 3 columns (not 11). A quick scroll through the table confirms that there aren't more columns later on.

#### Diagnosis

![](https://672843079-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LoitfV0OP-HrMLMazq_%2Fuploads%2FfQ1AWYoGoj8wVUSqewrU%2Fimage.png?alt=media\&token=d315b515-9f89-4232-bc1f-10191724c7fe)

The first two rows look wrong:

The first row has three cells, but the second cell spans 7 columns and the third cell spans 3 columns.&#x20;

In the second row, The second cell spans 10 columns and there is no third cell.

This colspanning repeats throughout the table, but there are never more than three cells in a row.

#### Fixing it

First, it's important to note that some cells in the table legitimately span columns: some span all three columns, and a few span only the second and third column.

In Edit mode, search for `colspan` and either:&#x20;

* Remove the whole of e.g. `{colspan 7}` or `{colspan 3}`, or
* Replace e.g. `{colspan 11}` with `{colspan 3}`,

as appropriate.

{% hint style="info" %}
You can tell which cells legitimately span columns by looking at how many cells there are in that row:&#x20;

* If there's only one cell, it should have `{colspan 3}`, and
* If there's only two cells, one of them should have `{colspan 2}`,

in a 3-column table.
{% endhint %}

Click 'Update', and the error no longer displays:

![](https://672843079-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LoitfV0OP-HrMLMazq_%2Fuploads%2F2cZIEYjiebrZWXPn1VtT%2Fimage.png?alt=media\&token=3763ea0c-1536-40b7-b7cf-41aea6a09f8d)
