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.

Command icon 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

gouli created an issue. See original summary.

gouli’s picture

I have created patch.
The path alias now references to nodes with UUID in a similar way how menu link content references.

gouli’s picture

Status: Active » Needs review
ericvl’s picture

Status: Needs review » Reviewed & tested by the community

Hello 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

blanca.esqueda’s picture

Version: 8.x-2.x-dev » 3.0.x-dev

  • gouli authored 23a0e83 on 3.0.x
    Issue #3179516 by gouli, EricVL, Blanca.Esqueda: Path Alias doesn't...
blanca.esqueda’s picture

Thank you, the patch has been included in 3.0.x-dev

blanca.esqueda’s picture

Status: Reviewed & tested by the community » Fixed
ericvl’s picture

Great, thanks

blanca.esqueda’s picture

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.