Custom importer plugin no longer supported?

Created on 10 January 2025, 17 days ago

Problem/Motivation

After the recent update (Commit: 464f5ec98c64), the ImporterDeriver now dynamically generates importers for all content entity types. While this simplifies the general setup, it has introduced a limitation: it is no longer possible to define and use custom importer plugins for specific use cases.

Previously, it was possible to create and use custom importer plugins tailored to specific needs, such as implementing unique import logic for a particular node bundle (e.g., custom_content). Now, the dynamically generated importers override any custom plugins, making them inaccessible without modifying the module.

Steps to reproduce

1. Create a custom entity type import following the documentation https://www.drupal.org/docs/8/modules/csv-importer/create-custom-entity-type-import.

2. Update from composer require 'drupal/csv_importer:^1.16 to 'drupal/csv_importer:^2.0'

3. Attempt to select and use the custom importer for the import process.

3. Observe that the custom plugin is no longer choosable, making it inaccessible.

Proposed resolution

Reintroduce support for defining and selecting custom importer plugins while maintaining the new dynamic generation of importers. Possible approaches:

  • Allow the ImporterDeriver to check for existing custom plugins
  • Provide an override mechanism or configuration to register custom plugins without conflicts.
  • Enhance the documentation to explain how to extend or work around this limitation.

Thank you for your assistance.

💬 Support request
Status

Active

Version

2.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024