Problem with "Path alias processor" together with translatable entities

Created on 24 January 2024, 11 months ago

Problem/Motivation

I have a problem when using the Path alias processor together with translatable entities. In some cases, this processor is not syncing URL aliases (they are empty, although they are provided on the server).

Steps to reproduce

  1. Create a translatable node on the server.
  2. Create 2 translations (i.e. English and Spanish) for it and fill URL alias for both of them.
  3. Sync English translation on the client (URL alias should be valid here).
  4. Sync Spanish translation on the client (URL alias should be missing here).

I've found a problem in the entity_share/modules/entity_share_client/src/Plugin/EntityShareClient/Processor/PathAliasProcessor.php file in the prepareImportableEntityData method. It doesn't take into consideration translations, it just looks for an entity by its UUID and if it finds it, it unsets $path['pid'] and exits.

And since there's already an entity in English with this UUID, other translations are being treated as existing ones, so there is no URL alias being created for them.

🐛 Bug report
Status

Active

Version

3.0

Component

Entity Share Client

Created by

🇵🇱Poland tivi22

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

Comments & Activities

Production build 0.71.5 2024