Problem/Motivation
Based on the plans being outlined in #2898704: Content Export Support, the earliest implementation steps should tackle stand-alone commands and services, with unit tests, to export most content-based entities. More complex elements may be handled separately, but the bulk of common use-cases should be accounted for with core export services.
Proposed resolution
Implement a dedicated service for export of content. This service will serve as the gateway to all of the export functionality and will be leveraged by both CLI and web interfaces for consistency and reusability.
Remaining tasks
- Research and discuss Serialization API as a solution for export
- Note relevance for refactored import process as well
- Implement single-entity export operations
- Implement batch entity export operations
User interface changes
User-interface changes and exposure of these commands is to be implemented in follow-up tasks.
See #2943912: Content Export Support: CLI Interfaces and #2943914: Content Export Support: Web Interfaces.
API changes
New export services will be implemented to handle export of single entities, and batches of entities.
Data model changes
TBD
Comment | File | Size | Author |
---|---|---|---|
#4 | Screen Shot 2018-02-11 at 18.17.09.png | 120.42 KB | johnwebdev |
#3 | export-process.png | 79.18 KB | slucero |
Comments
Comment #2
sluceroBelow is a cross-post of some of the discussion points between @johndevman and myself in #2898704-7: Content Export Support and #2898704-8: Content Export Support related to this functionality:
Comment #3
sluceroI wanted to attach and expose the previous diagram from @johndevman to make sure it doesn't get lost anywhere. All credit to @johndevman (#2898704-7: Content Export Support).
Comment #4
johnwebdev CreditAttribution: johnwebdev commentedWhen exporting a entity, it is unlikely we are only going to export one entity.
Above we have a simplified illustration on what we could potentially expect when exporting Article 1 and we want to include references.
In this example Content is a Paragraphs field with a Link paragraph which references to a internal URI.
Comment #5
sluceroComment #6
sluceroBased on some conversations at DrupalCon, the first steps here should focus on getting a single entity converted into YAML targeting a sequence of scenarios escalating in complexity from simplest to most complex:
This first pass will focus only on exporting the data relative to a single entity. With this assumed perspective, we can remove the complexity of inter-entity relationships and required processing for content references. This will be a method to produce the content for a single entity to be added to a content file without entirely manual creation, but will assume manual intervention by the developer/content curator to handle more complex elements like content duplication, file creation and reused content references.
Building on this from a centralized export service, an early tool for accessibility to this module through the interface and to lighten the effort of creating content for import, this could be exposed as a local task link for entities, like nodes or taxonomy terms, alongside the existing "edit" and "view" links. I could envision this tab loading the current entity in converted YAML Content format within a text editor field for easy copy and paste into. As an enhancement to this, files and images included in the export could be linked directly in a list below the text field for download and reference in the exported content.
Note that the web UI elements of this are the focus of #2943914: Content Export Support: Web Interfaces and I'll be cross-posting this information into #2943914-4: Content Export Support: Web Interfaces.
Next Steps
Blocking Items