Skip to content

ComponentInstaller creates always new components on plugin reinstallation #2610

Open
@mitelg

Description

@mitelg

The function createOrUpdate() of the ComponentInstaller class is used in a plugin's install() to create custom shopping world element (as described here https://developers.shopware.com/developers-guide/custom-shopping-world-elements/#registering-a-new-element).

The problem is, each time the plugin is reinstalled, the shopping world element is removed from the shopping world and a new copy of the element is created. This results in multiple copies of the element in database and in shopping worlds designer and the element in the shopping world has to be added again.

The function createOrUpdate() should first check if the element is present in the database and create it only if it isn't.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions