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.

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

drupal-son created an issue. See original summary.

nginex’s picture

Issue tags: +LutskGCW23
mkdok’s picture

Assigned: Unassigned » mkdok

mkdok’s picture

Version: 1.3.7 » 1.3.x-dev
Assigned: mkdok » Unassigned
Status: Active » Needs review

  • b09a3b59 committed on 1.3.x
    Issue #3332663 by nginex: Improve logic, fix bugs.
    

  • nginex committed 582223c4 on 1.3.x authored by mkdok
    Issue #3332663: Avoid importing entity into another website
    
nginex’s picture

Status: Needs review » Fixed

Thanks for the patch, I added a few fixes and improvements.

nginex’s picture

Status: Fixed » Closed (fixed)