Category Path Repair Report

Fix Category Paths — Functional Description

Repairs OpenCart category hierarchical path mappings. Scans every row in oc_category, validates oc_category_path depth and ancestry, rebuilds corrupt chains from the oc_category_path2 backup when paths exceed twelve levels, and inserts missing terminal self-referencing path rows when the deepest path_id does not match the category's own category_id.

  • Orphan purge — removes invalid category_id = 0 rows from oc_category, oc_category_description, oc_category_path, oc_category_to_layout, and oc_category_to_store before scanning begins.
  • Path validation — flags mismatched path rows, broken parent chains, and cyclic ancestry before corrective actions run.
  • Deep-chain rebuild — when a path chain exceeds twelve levels, corrupt live paths are deleted and rebuilt from oc_category_path2.
  • Terminal path repair — inserts a self-referencing path row when the deepest path_id does not equal the owning category_id.
  • Report table — lists category ID, name, issue found, and corrective action taken; corrected rows are highlighted in green.
No category path errors detected. All paths are healthy!