Data Consistency Tools
Under normal operation, the Data hooks described on
Parent-Child Relations and IRRE keep col and the
tx_ counter (see Data Model) consistent
automatically as editors work. The two tools on this page exist for
exceptional cases where those values nevertheless become inconsistent,
for example because an external process writes to tt_
outside a normal Grid Elements-aware save or because an edge case
bypasses the expected maintenance behavior. They are corruption-repair
tools for exceptional states, not a routine or scheduled maintenance
step.
Grid Elements Col Pos Fixer
Fixes grid children whose col is no longer -1. Per its own
docblock, this is aimed at the specific case of a TYPO3 Core
major-version upgrade: if Grid Elements' own signed SQL schema
definition for col is not part of the active set a schema
migration compares against during that upgrade, TYPO3 Core's unsigned
definition can be applied to the column instead, which can affect the
negative sentinel values stored there, see
Data Compatibility Across TYPO3 Versions for the schema
mechanism itself. This tool restores the -1 sentinel for any row
whose tx_ relation is still intact.
The fixer does not try to detect which rows are broken. It unconditionally reasserts the sentinel for every row that currently has a container:
UPDATE tt_content SET colPos = -1 WHERE tx_gridelements_container > 0
Grid Elements Number Of Children Fixer
Fixes the maintained tx_ counter described on
Data Model. Per its own docblock, this addresses drift caused by
buggy cut/copy/paste or drag-and-drop behavior in edge cases. For every
gridelements_ container, it counts the container's actual
children directly (tx_) and
writes that count back, replacing whatever value the counter currently
holds.
Running the tools
Both are available as TYPO3 CLI commands and as classic TYPO3 Scheduler task types, so either a CLI or a backend-scheduled workflow can trigger the repair.
| Tool | Console command | Scheduler task class |
|---|---|---|
| Col Pos Fixer | vendor/ | Grid |
| Number Of Children Fixer | vendor/ | Grid |
Neither tool needs to run on a schedule for Grid Elements to function
correctly. Reach for them after a known external interference with
tt_, such as the upgrade scenario described above, or when
the tx_ count or a grid child's col
sentinel is known to be inconsistent and normal backend editing does
not correct it.