Avoid importing entity into another website

Created on 11 January 2023, almost 2 years ago
Updated 29 January 2023, almost 2 years ago

Problem/Motivation

If by mistake, user imports an exported zip file entity into a wrong website (a website with different system.site uuid), the entity is created into the destination website, but breaks (WSOD) on any entity's operation.

Steps to reproduce

  1. Install the module into 2 different websites (not just different environments of the same website)
  2. On website A, export a node of a content type not existing into website B
  3. On website B, import the exported node from website A
  4. The node imported gets created
  5. View, Edit, Delete the created node breaks the website B

Proposed resolution

Avoid importing an exported entity into a different website based on the system.site. uuid configuration value.
Additionally validate the entity bundle exists.

πŸ› Bug report
Status

Fixed

Version

1.3

Component

Code

Created by

πŸ‡¦πŸ‡·Argentina drupal-son

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024