Allow to partially export content

Created on 9 January 2025, 3 months ago

Problem/Motivation

By default all dependencies are fully exported. Sometimes it's a huge export when you just want to export a small piece of content e.g. you already exported all dependencies or you don't need them at the moment, and you just wanted to sync one page instead of all dependencies.

The idea is to add a checkbox to export form and an option to drush command that will allow user to fully or partially export the content.

Probably the easiest way will be to exclude all entity reference fields from the export, so when importing these fields will be untouched.

Feature request
Status

Active

Version

1.4

Component

Code

Created by

🇺🇦Ukraine nginex

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

Merge Requests

Comments & Activities

  • Issue created by @nginex
  • First commit to issue fork.
  • 🇮🇳India Supreetam09 Kolkata

    This is something we also needed. In our project, there are some content, for which the dependency tree is so huge that the Export page throws 500 PHP out-of-memory error, even with setting memory_limit to -1

    We implemented the code from the MR. It introduces a new settings key which will be used to identify entity types that will be omitted from the export list for referenced entities. We had to exclude all node entity type references from content (other entity reference dependencies are still there) - and Export page started opening fine.

    Its now exporting importing partially and with the settings, we can control it.

    Although I understand that this is not perfect. We can further fine tune the control. Currently its entity level control - but I can think of more ways like bundle level control or hierarchy level control (like 1st child node reference will be exported but another node referenced to the 1st child i.e. child's child won't be exported).

    For now, I am adding a starting point.

    Let me know your thoughts!

  • Pipeline finished with Failed
    26 days ago
    Total: 1148s
    #445945
  • 🇺🇦Ukraine nginex

    Thanks for the patch, I will check and test it when I get some time. Meanwhile you can also test similar issue but with different solution here

    https://www.drupal.org/project/single_content_sync/issues/3511539#commen... 🐛 Recursion takes too much memory compared to earlier versions (1.4.6 or earlier) Active

  • Pipeline finished with Canceled
    26 days ago
    Total: 126s
    #445962
  • Pipeline finished with Failed
    26 days ago
    Total: 274s
    #445968
  • Pipeline finished with Success
    26 days ago
    Total: 205s
    #445992
  • 🇮🇳India Supreetam09 Kolkata

    Unfortunately the patch from MR does not apply on current stable version 1.4.10 as there's been too many changes in 1.4.x. I am adding a patch only for 1.4.10 release.
    Consider the MR for the dev branch.

  • 🇺🇦Ukraine nginex

    I'm planning to create 1.4.11 during a week, so already merged a few issues

Production build 0.71.5 2024