Problem/Motivation
The path alias .yml files do not have reference to Node's UUID, It has reference to the path of the content(say node/20, node/21). This will be problem when the importing environment already has nodes with those IDs
The importer creates new nodes with different IDs. However, the path alias import doesn't know the new Node Ids and doesn't link path alias to correct node.
Any help in this issue will be greatly appreciated.
Steps to reproduce
Spin up two instances and create some contents(nodes) on both instances with Pathauto module enabled. Export changes from instance and then import it to another instances. The new nodes created will have pathauto pointed correctly.
However, when you access the node with path alias it results in page not found. When you access the node with newly created Node id, the pages works fine.
Proposed resolution
I believe instead of using path value(node/20). It would be better to have references to Node's UUID in yml files So, that the context is not lost when importer creates Nodes with new IDs.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | path-alias-doesnt-import-properly-3179516-2.patch | 3.8 KB | gouli |
| pathalias.PNG | 15.06 KB | gouli |
Issue fork content_sync-3179516
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
gouli commentedI have created patch.
The path alias now references to nodes with UUID in a similar way how menu link content references.
Comment #3
gouli commentedComment #4
ericvlHello everybody,
I have tested this issue and with this patch the problem is solved.
The only reference in a path_alias was a nodenumber. Now it has an extra id that references the correct entity.
For my part, this could be merged and released in the new 3.0 version.
Greetings
Eric
Comment #5
blanca.esqueda commentedComment #7
blanca.esqueda commentedThank you, the patch has been included in 3.0.x-dev
Comment #8
blanca.esqueda commentedComment #9
ericvlGreat, thanks
Comment #10
blanca.esqueda commentedChanges to test for pathalias:
https://www.drupal.org/project/content_sync/issues/3049963#comment-14229823