* This may be a bug that should be addressed by profile module (https://www.drupal.org/project/profile).
Problem/Motivation
When using the profile module and exporting a user, there are dependencies made to the profile entities in the user export yml as well as the profile export yml. This causes circular dependencies and when importing the content on a new instance, all of the profiles are assigned to uid 1, breaking the functionality. If you remove all of the profile fields and dependencies from the user export yml the problem goes away.
Steps to reproduce
Install profile module and create a user profile. Populate the content and recursively export the user the profile is associated with.
Proposed resolution
Determine if this module should handle this or assign to profile maintainers.
Issue fork default_content-3180348
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
berdirJust had something like that as well with two regular entity references between nodes. Not sure if we can solve that automatically in a generic way, but I'm OK with adding profile specific logic if we also have a test for it, like the paragraphs integration for example.
Comment #5
mattsqd commentedI've submitted a merge request with tests for this issue. I've tried this out with circular profile references, like in this ticket, as well as others like nodes and terms.
I'm attaching the patch as well.
Comment #6
mattsqd commentedComment #7
mattsqd commentedAdding new patch to allow embedded fields, no matter how deeply nested, to work and update the references instead of needing to delete and re-create.
Comment #8
mattsqd commentedUpdated importer to allow circular dependencies to be fixed on fields like links, not just entity references.
Comment #10
geek-merlinRebased. Due to the broad changes in Importer.php i'm not totally sure but quite confident i resolved the conflicts correctly.