Images are not cloned between sites

Created on 9 April 2025, 15 days ago

Problem/Motivation

When cloning between sites, images are not being clon.

Steps to reproduce

Clone a node with an image or media field between two sites.
The file entity exists on the destination site but the image is broken because the physical file does not exist.

I think it is because of this in ContentExporter.php.

    // Support path field for multiple entity types.
    if ($entity->hasField('path')) {
      $base_fields['url'] = $entity->get('path')->alias;
    }

That leaves the URL for a file entity relative without the full domain etc.

Proposed resolution

I think that needs to exclude file entities or maybe if $base_fields['url'] already exists.

I can do a patch but I'll check for any comment first.

πŸ› Bug report
Status

Active

Version

1.4

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States tetranz

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024