Comments

DamienMcKenna created an issue. See original summary.

damienmckenna’s picture

Issue summary: View changes
damienmckenna’s picture

Status: Active » Needs review
StatusFileSize
new4.91 KB

This exports everything fairly well, including nested paragraphs. For the import it doesn't handle nested paragraphs yet.

damienmckenna’s picture

Initial test coverage on the export.

damienmckenna’s picture

I have nested paragraphs almost importing correctly, but it's resulting in extra values in the fields.

damienmckenna’s picture

StatusFileSize
new12.21 KB
new4.41 KB

This works for one nested level.

Still need to update the tests to track this.

damienmckenna’s picture

Test coverage.

Still todo: test the import.

damienmckenna’s picture

StatusFileSize
new17.28 KB
new5.26 KB

Test coverage for import!

damienmckenna’s picture

Improved testing.

There are three issues:

  • It only supports importing one level of nested paragraphs, e.g. node -> paragraph -> paragraph, it doesn't go any deeper.
  • The tests run into a problem with the node/add/node_export form, leading to two notices about the 'files' index, but I'm not sure why; see the @todo comment.
  • File handling in paragraphs hasn't been added.
damienmckenna’s picture

Assigned: damienmckenna » Unassigned

This seems to be enough for my needs right now.

damienmckenna’s picture

Issue summary: View changes
StatusFileSize
new4.95 KB
new22.4 KB

File export support.

Still to do:

  • File importing (-:
  • Test coverage for file exports.
  • Test coverage for file imports.
damienmckenna’s picture

damienmckenna’s picture

File importing ended up being super easy - just run node_export_file_field_import() on the paragraph entity.

damienmckenna’s picture

StatusFileSize
new2.73 KB
new22.91 KB

Minor coding standards improvements.

gopinath dhayalan’s picture

Hi,

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

damienmckenna’s picture

Assigned: Unassigned » damienmckenna

Sorry about that I need to do a bit more work on it and add test coverage for the image handling.

damienmckenna’s picture

StatusFileSize
new1.02 KB
new22.93 KB

This fixes the image handling - I was able to manually test image export & import using the "Inline Base64" method.

damienmckenna’s picture

FYI you'll need #2985486: Paragraphs support to make this work.

damienmckenna’s picture

It 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.

damienmckenna’s picture

StatusFileSize
new29.52 KB
new11.94 KB

Test 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.

damienmckenna’s picture

FYI the tests pass locally because the two node_export patches are needed.

lunazoid’s picture

I 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.

joseph.olstad’s picture

Triggered php 7.4.x test

damienmckenna’s picture

Assigned: damienmckenna » Unassigned
bluegeek9’s picture

Status: Needs review » Closed (outdated)
//www.flaticon.com/free-icons/thank-you Thank you for your contribution!

Unfortunately, Drupal 7 is End of Life and no longer supported. We strongly encourage you to upgrade to a supported version of Drupal.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.