850

Product support

Get help in the plugin support forum.

Categories

FixTailorImport is an OctoberCMS 4.x plugin that resolves common issues when importing Tailor entries from JSON and CSV files. It automatically fixes missing identifiers, generates readable URL values from the entry title, and restores proper nested tree data for structure sections.

What it fixes

  • assigns an id when it is missing
  • generates slug from title instead of technical values like slug-abc123...
  • rebuilds fullslug automatically after saving
  • populates nest_left, nest_right, and nest_depth for structure entries
  • allows CSV rows without an id column to be created
  • uses random digits for slug conflict suffixes instead of sequential -2, -3
  • helps repair previously imported broken records

This makes imported Tailor entries immediately usable in real projects, without manual cleanup in the database after import.

Installation via Command Line

php artisan plugin:install DMdev.FixTailorImport

FixTailorImport

FixTailorImport helps keep Tailor imports clean, readable, and structurally correct when importing entries from JSON or CSV.

It is especially useful for structure sections, where imported records need valid IDs, readable URLs, and correct nested tree values immediately after import.

Installation

Copy the plugin to:

plugins/dmdev/fixtailorimport/

Then run:

php artisan october:migrate

Features

  • Auto-assigns missing id values
  • Generates readable slug values from title
  • Rebuilds fullslug automatically after saving
  • Populates nest_left, nest_right, and nest_depth for structure entries
  • Supports CSV imports even when the id column is missing
  • Repairs broken records imported before the plugin was installed

Console Commands

tailor:fix-nulls

Repairs previously imported records that may contain:

  • empty or technical slug values
  • invalid nested tree fields
  • empty fullslug values

For structure sections, it rebuilds the tree and restores fullslug across the hierarchy.

php artisan tailor:fix-nulls "Catalog\Category" --dry-run
php artisan tailor:fix-nulls "Catalog\Category"

tailor:fix-structure

Applies configured category-to-parent rules and rebuilds the structure tree.

Use --rebuild-only when you only want to rebuild the nesting without applying mapping rules.

php artisan tailor:fix-structure "Catalog\Category" --dry-run
php artisan tailor:fix-structure "Catalog\Category"
php artisan tailor:fix-structure "Catalog\Category" --rebuild-only

tailor:fix-slugs

Retrospectively replaces technical slug values with readable ones generated from the entry title.

php artisan tailor:fix-slugs --dry-run
php artisan tailor:fix-slugs "Catalog\Category"
php artisan tailor:fix-slugs

Configuration

Configuration for structure mapping is stored in:

plugins/dmdev/fixtailorimport/config/fixtailorimport.php

Structure Rule Options

Parameter Description
category_field Field containing the category value from imported CSV data
parent_resolve Field used to find the parent record
parent Parent record value resolved via parent_resolve; use null for root
set Optional extra attributes to assign during import

How It Works

The plugin does not modify the OctoberCMS core, modules/*, or vendor/*.

It works through standard OctoberCMS extension points and tree rebuild methods:

  • service binding for the import pipeline
  • EntryRecord extension hooks for slug, nesting, and fullslug
  • built-in NestedTree rebuild methods for structure sections
1.0.0

Initial release

Mar 25, 2026