Batch content deletion on paragraph type deletion

Created on 25 July 2022, about 3 years ago
Updated 21 July 2025, 13 days ago

Problem/Motivation

Follow up of https://www.drupal.org/project/paragraphs/issues/2764681#comment-14623940
When deleting an existing paragraph type, some content might already exist and should be deleted before the type deletion.
For now this process exists but is not batched, and can lead to time outs and memory limits when too many content have to be deleted.
When this situation happen, then it's simply impossible to delete the paragraph type without messing with the database itself.

Steps to reproduce

  • Create a paragraph type
  • Create 10 000 paragraph content of this type
  • Delete the paragraph type
  • Timeout/memory limit will happen

Proposed resolution

Define a batch process for the content deletion to avoid memory limit and timeouts.

Remaining tasks

Create a patch

User interface changes

A batch process will be launched after clicking on the "Delete X paragraphs" button.

API changes

None

Data model changes

None

🐛 Bug report
Status

Needs work

Version

1.0

Component

Code

Created by

🇫🇷France Renrhaf 📍 Strasbourg 🐦🦜

Live updates comments and jobs are added and updated live.
  • Performance

    It affects performance. It is often combined with the Needs profiling tag.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • First commit to issue fork.
Production build 0.71.5 2024