Paragraph entity data are always updating in the import even no changes in the paragraph content

Created on 5 December 2024, 18 days ago

Problem/Motivation

I have used the same DB and configurations in the current environment and target environment. However, the node ID and paragraph ID are different in both environments. So the content imports are referring the uuid value to map the content in the target environment during the import.

If I import the node json file a second time with no changes, it was skipped. That is correct behavior.

If I import the paragraph json file a second time without any changes, it is updated. This is not the expected result. The paragraph import should skip when we import the same json file multiple times.

The paragraph json file data array and the same paragraph entity array in DB are compared and processed for the content import in the target environment. In my case, the current environment paragraph and paragraph target revision ID are different compared to the target environment paragraph ID and target revision ID in the target environment DB.

The import function refers to the 'Changed' attribute value of the exported json file. Then compared the exported 'Changed' attribute time with the target environment node's updated timestamp value in DB.

Steps to reproduce

  1. Setup two Drupal 10.3.0 instances. The instance 1 is a current environment. The instance 2 is a target environment.
  2. The same DB and configuration should be used in instances 1 and 2.
  3. Create a new content type and paragraphs.
  4. Add nested paragraphs as a new field in the content type.
  5. Create new content using the content type.
  6. Export the content, and paragraph using the drush export commands in instance 1.
  7. Import the content and the paragraph json files using the Drush import commands in instance 2.
  8. Log in to instance 2 and manually delete the imported content.
  9. Again, Import the same content and the paragraph json files using the Drush import commands in instance 2. This time, the node will created with a new nid.
  10. Again, Import the same paragraph json file using the Drush import commands in instance 2. This time it should skip. because the paragraph content has already been imported. We haven't modified the paragraph json files.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

2.1

Component

Code

Created by

🇮🇳India manojkumar_g

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

Comments & Activities

Production build 0.71.5 2024