Allow import/export interruption in appropriate events

Created on 15 July 2024, 5 months ago

Problem/Motivation

It would be good to allow event subscribers to prevent actual import or export.
Sample scenario: for an entity that has entity reference fields, content editors want to sync only the "main" entity, leaving referenced entities unchanged (for example, they are not ready to be published)

Proposed resolution

Introduce ContentImportException and ContentExportException classes
Wrap $this->eventDispatcher->dispatch() in try/catch.
Catch ContentImportException/ContentExportException and do not call doImport()/doExport()

Remaining tasks

Write the patch
Backport to 1.4.x

User interface changes

No UI changes

Feature request
Status

Active

Version

2.0

Component

Code

Created by

🇧🇬Bulgaria valthebald Sofia

Live updates comments and jobs are added and updated live.
  • needs backport to 1.x

    The patch should be considered for backport to the 2.x branch. Note: This tag should generally remain even after the backport has been written, approved, and committed.

Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024