# Data Fixes

> Data-fix handlers for link integrity issues

---

The module provides a set of data-fix handlers accessible from the webtrees [data-fix](https://wiki.genealogy.net/Webtrees_Handbuch/Anleitung_f%C3%BCr_Verwalter#Datenkorrekturen) interface (Control panel → Data fixes → LinkEnhancer). Each handler addresses a specific link integrity issue:

| Fix | What it does |
|-----|-------------|
| **XREF ⇄ UID reference swap** | Converts linkenhancer link targets between XREF and UID form. Direction is selectable (XREF→UID or UID→XREF). Requires the UID index to be built. |
| **Fix `wt=` type letter** | Sets, repairs, or removes the legacy type letter in `wt=<type>@REF@` links. Modes: *set* (add missing type), *repair* (fix wrong type), *remove* (strip type letter). |
| **Report dangling link targets** | *Report-only*: lists linkenhancer links whose target record no longer exists. No changes are made. |
| **Report ambiguous UID targets** | *Report-only*: lists links whose UID target resolves to more than one record. No changes are made. |
| **Report duplicate UIDs in index** | *Report-only*: lists UIDs assigned to multiple records in the UID index. No changes are made. |

Each fix follows the webtrees data-fix workflow: select fix type → preview → apply. The data-fix page also shows the current status of the link and UID indexes, and whether index updates will be deferred to the cron job.
