It would be helpful if the module could support Node Export's hook_node_export_node_alter() to allow exporting paragraph structures along with the node data. Am working on a patch for this.
| Comment | File | Size | Author |
|---|---|---|---|
| #20 | paragraphs-n3100911-20.interdiff.txt | 11.94 KB | damienmckenna |
| #20 | paragraphs-n3100911-20.patch | 29.52 KB | damienmckenna |
Comments
Comment #2
damienmckennaComment #3
damienmckennaThis exports everything fairly well, including nested paragraphs. For the import it doesn't handle nested paragraphs yet.
Comment #4
damienmckennaInitial test coverage on the export.
Comment #5
damienmckennaI have nested paragraphs almost importing correctly, but it's resulting in extra values in the fields.
Comment #6
damienmckennaThis works for one nested level.
Still need to update the tests to track this.
Comment #7
damienmckennaTest coverage.
Still todo: test the import.
Comment #8
damienmckennaTest coverage for import!
Comment #9
damienmckennaImproved testing.
There are three issues:
Comment #10
damienmckennaThis seems to be enough for my needs right now.
Comment #11
damienmckennaFile export support.
Still to do:
Comment #12
damienmckennaComment #13
damienmckennaFile importing ended up being super easy - just run node_export_file_field_import() on the paragraph entity.
Comment #14
damienmckennaMinor coding standards improvements.
Comment #15
gopinath dhayalan commentedHi,
We have applied your patch and getting below error while importing.
Fatal error: Cannot access empty property in webroot\sites\all\modules\contrib\node_export\node_export.module on line 1227
Comment #16
damienmckennaSorry about that I need to do a bit more work on it and add test coverage for the image handling.
Comment #17
damienmckennaThis fixes the image handling - I was able to manually test image export & import using the "Inline Base64" method.
Comment #18
damienmckennaFYI you'll need #2985486: Paragraphs support to make this work.
Comment #19
damienmckennaIt might also help to have #3109786: Improve variable checking on node import too, at the very least it should fix the notices showing in the tests.
Comment #20
damienmckennaTest coverage for the image handling; one minor thing left - test the actual image rendering, I'm not sure what I'm missing but the image itself isn't showing up on the node page.
Comment #21
damienmckennaFYI the tests pass locally because the two node_export patches are needed.
Comment #22
lunazoid commentedI just applied this patch along with the node_export patches #2985486: Paragraphs support and #3109786: Improve variable checking on node import, and so far it's working as expected. I'd like to test it out a bit more before I change the status.
I just hope #2618052: Integration with Paragraphs module doesn't mean this won't be committed, as it requires updates to both modules. Paragraphs are becoming a major method of content creation and being able to export/import nodes with them is rather important.
Comment #23
joseph.olstadTriggered php 7.4.x test
Comment #24
damienmckennaComment #25
bluegeek9 commentedUnfortunately, Drupal 7 is End of Life and no longer supported. We strongly encourage you to upgrade to a supported version of Drupal.