Search by

cpsit / t3import_export

cpsdwenzel

General import and export tool for the TYPO3 CMS

Package info

github.com/dwenzel/t3import_export

Type:typo3-cms-extension

pkg:composer/cpsit/t3import_export

Statistics

Installs: 10 077

Dependents: 1

Suggesters: 0

Stars: 3

Open Issues: 5

3.1.1 2026-11-10 15:05 UTC

README

TYPO3 13.4 PHP 8.4 Tests

The Import & Export extension provides a comprehensive, flexible framework for importing and exporting data in TYPO3 13.4. It supports multiple data formats, sources, and destinations with powerful transformation capabilities through a modular component architecture.

Imports data from different sources into TYPO3 and exports from TYPO3 to different targets. Possible data sources and targets are databases, and files (XML, CSV...). Import and export tasks are described via TypoScript or modern YAML configuration and can be grouped to sets. Tasks can be executed manually via backend module or command line or automatically as a scheduler task.

Support matrix

TYPO3 Branch Latest release Status
13.4 main 3.1.1 maintained
12.4 support/typo3-v12 2.0.3 bugfixes
11.5 support/typo3-v11 1.1.1 bugfixes
9.5, 10.4 none 1.0.5 not maintained
6.2 - 8.7 none 0.14.0 not maintained

See CONTRIBUTING.md for the branching model and the release process.

Table of Contents

📋 Getting Started

🏗️ Core Concepts

🔧 Configuration

🧩 Components

Component Types

💾 Data Sources & Targets

🔌 Services & Utilities

🚀 Execution Methods

🛠️ Development

Overview

The Import & Export extension provides a comprehensive, flexible framework for importing and exporting data in TYPO3 13.4. It supports multiple data formats, sources, and destinations with powerful transformation capabilities through a modular component architecture.

Key Features

  • Multiple Data Formats: CSV, XML, Database, Repository objects
  • Flexible Architecture: Modular component system for data transformation
  • TYPO3 13.4 Ready: Full compatibility with latest TYPO3 LTS
  • Command Line Support: CLI execution for automation and scheduling
  • Backend Integration: User-friendly backend module interface
  • YAML Configuration: Modern configuration format alongside TypoScript
  • Queue System: Asynchronous processing capabilities
  • Multi-language Support: Localization and translation workflows

Installation

Via Composer (Recommended)

composer require cpsit/t3import_export

Activate the extension in the TYPO3 Extension Manager.

For detailed installation instructions, troubleshooting, and environment setup, see Installation Guide.

Quick Start Guide

1. Basic Configuration

Create a simple import task in TypoScript:

module.tx_t3importexport.settings.import.tasks.newsImport {
    label = News Import
    description = Import news from CSV file

    source {
        class = CPSIT\T3importExport\Persistence\DataSourceCSV
        config {
            file = fileadmin/imports/news.csv
            delimiter = ,
            enclosure = "
        }
    }

    preProcessors {
        10 {
            class = CPSIT\T3importExport\Component\PreProcessor\MapFields
            config {
                map {
                    title = headline
                    bodytext = content
                }
            }
        }
    }

    target {
        class = CPSIT\T3importExport\Persistence\DataTargetDB
        config {
            table = tx_news_domain_model_news
        }
    }
}

2. YAML Configuration Alternative

import:
  tasks:
    newsImport:
      label: "News Import"
      description: "Import news from CSV file"
      source:
        class: "CPSIT\\T3importExport\\Persistence\\DataSourceCSV"
        config:
          file: "fileadmin/imports/news.csv"
          delimiter: ","
          enclosure: "\""
      preProcessors:
        - class: "CPSIT\\T3importExport\\Component\\PreProcessor\\MapFields"
          config:
            map:
              title: "headline"
              bodytext: "content"
      target:
        class: "CPSIT\\T3importExport\\Persistence\\DataTargetDB"
        config:
          table: "tx_news_domain_model_news"

3. Execution

Execute via command line:

vendor/bin/typo3 t3import-export:import-task newsImport

Or via YAML configuration:

vendor/bin/typo3 t3import-export:import-set --yaml-config path/to/config.yaml

System Requirements

  • TYPO3: 13.4 LTS
  • PHP: 8.4+
  • Dependencies:
    • symfony/yaml (for YAML configuration)
    • TYPO3 core extensions (extbase, fluid)

Architecture Overview

For detailed architecture information, see Architecture Overview.

Configuration Overview

Configuration can be done via TypoScript or modern YAML format. Both approaches provide the same functionality, with YAML offering better readability and structure for complex configurations.

Tasks and Sets

Tasks

A Task is a single import or export operation with:

  • One data source
  • One data target
  • Optional processing components (Initializers, PreProcessors, Converters, PostProcessors, Finishers)

Sets

A Set is a collection of tasks that are executed sequentially. Sets allow you to:

  • Group related operations
  • Ensure proper execution order
  • Manage complex data workflows

Processing Flow

Each task execution follows this flow:

  1. Initialize: Execute Initializers (e.g., clear tables, prepare data)
  2. Build Queue: Load data from source into processing queue
  3. Process Records: For each record:
    • Apply PreProcessors (transform data)
    • Apply Converters (change format)
    • Apply PostProcessors (enhance objects)
    • Persist to target
  4. Finalize: Execute Finishers (e.g., clear cache, validate results)

Component Types

Initializers

Execute before processing starts. Common uses:

  • Clear target tables
  • Delete specific records
  • Insert default data
  • Update table structures

PreProcessors

Transform raw data before conversion. Common uses:

  • Map field names
  • Transform field values
  • Database lookups
  • Data validation and cleaning

Converters

Change data format. Common uses:

  • Convert arrays to domain objects
  • Generate XML streams
  • Transform data structures

PostProcessors

Enhance processed objects. Common uses:

  • Generate file references
  • Set localization relationships
  • Create URL slugs
  • Handle translations

Finishers

Execute after processing completes. Common uses:

  • Clear TYPO3 caches
  • Validate generated files
  • Move files to final location
  • Send notifications

Backend Module

Access the import/export module in the TYPO3 backend:

  1. Navigate to System > Import/Export
  2. Choose Import or Export module
  3. Select configured tasks or sets
  4. Execute with real-time progress feedback

Command Line Interface

Available commands:

  • t3import-export:import-task <taskId> - Execute single import task
  • t3import-export:import-set <setId> - Execute import set
  • t3import-export:export-set <setId> - Execute export set

Options:

  • --yaml-config <file> - Use YAML configuration file
  • --dry-run - Simulate execution without persisting data

Scheduler Integration

The extension integrates with TYPO3 Scheduler for automated execution:

  1. Create new Scheduler task
  2. Select Import/Export Task type
  3. Configure task or set to execute
  4. Set execution schedule

Configuration Examples

CSV Import with Field Mapping

module.tx_t3importexport.settings.import.tasks.productImport {
    source {
        class = CPSIT\T3importExport\Persistence\DataSourceCSV
        config {
            file = fileadmin/imports/products.csv
            skipLines = 1
            delimiter = ;
        }
    }
    preProcessors {
        10 {
            class = CPSIT\T3importExport\Component\PreProcessor\MapFields
            config {
                map {
                    name = product_name
                    price = product_price
                    description = product_desc
                }
            }
        }
    }
    target {
        class = CPSIT\T3importExport\Persistence\DataTargetDB
        config {
            table = tx_shop_domain_model_product
        }
    }
}

XML Export with Validation

module.tx_t3importexport.settings.export.tasks.newsExport {
    source {
        class = CPSIT\T3importExport\Persistence\DataSourceDB
        config {
            table = tx_news_domain_model_news
            where = hidden = 0
        }
    }
    target {
        class = CPSIT\T3importExport\Persistence\DataTargetXMLStream
        config {
            file = fileadmin/exports/news.xml
            rootElement = news
        }
    }
    finishers {
        10 {
            class = CPSIT\T3importExport\Component\Finisher\ValidateXML
            config {
                schemaFile = fileadmin/schemas/news.xsd
            }
        }
    }
}

Common Use Cases

Content Migration

  • Migrate from legacy CMS systems
  • Update database structures
  • Transform content formats
  • Synchronize multi-site content

Data Integration

  • Import from external APIs
  • Synchronize with ERP systems
  • Process CSV/XML data feeds
  • Integrate with third-party services

Maintenance Operations

  • Bulk content updates
  • Database cleanup
  • Asset management
  • Automated backups

Troubleshooting

Common Issues

  1. Memory Limits: For large datasets, increase PHP memory limit or use queue processing
  2. File Permissions: Ensure TYPO3 can read source files and write to target locations
  3. Database Connections: Verify database credentials for external sources
  4. Component Configuration: Check component configuration syntax and required parameters

Debug Mode

Enable debug output in configuration:

module.tx_t3importexport.settings.debug = 1

Log Files

Check TYPO3 log files for detailed error information:

  • var/log/typo3_*.log
  • Component-specific error messages
  • SQL query logs for database operations

API Documentation

For detailed API documentation, refer to the inline code documentation and the Documentation/UML/ directory containing UML diagrams.

Contributing

Please refer to DEVELOPMENT.md for guidelines on:

  • Setting up development environment
  • Coding standards
  • Testing procedures
  • Contribution workflow

Credits

Thanks for contribution and feedback:

Support

  • Issues: Report bugs and feature requests on GitHub
  • Documentation: This documentation covers all aspects of the extension
  • Community: Join TYPO3 community channels for general support

This extension has been developed at CPS IT GmbH.

For enterprise support and custom development, contact CPS IT GmbH.